About
This is a Tcl implementation of a server conversant in a minimal subset of HTTP/1.1 and a client conversant in a minimal subset of SOCKS4a. The purpose is to convert HTTP requests received into SOCKS-tunneled connections via a specified SOCKS server.
SOCKS4a is supported exclusively mostly out of laziness, but it has the advantage that there's no risk of leaking DNS if you're using Tor or somesuch.
Installation
Make sure Tcl is installed. Developed with Tcl 8.6.
A Dockerfile is included. As of 2018-11-05, the resulting image is 10MB.
Usage
Run hypersocks.tcl with tclsh. No command-line arguments are supported.
The following environment variables are used for configuration:
SOCKSHOST- the hostname or IP of the SOCKS proxy to connect to- default: localhost
SOCKPORT- the port of the SOCKS proxy to connect to- default: 1080
LISTENPORT- the port to listen on for HTTP proxy clients- default: 3128