[Twisted-Python] Using HTTP proxies to circumvnet firewalls

Itamar Shtull-Trauring twisted at itamarst.org
Fri May 31 19:28:57 EDT 2002


Apparently, HTTP proxies have a command CONNECT, that lets you open a 
TCP/IP connection to an arbitrary host and port. This is intended for 
HTTPS. Now, most proxies probably limit this to 443 only, HTTPS port.

So, presumably all those clients like ICQ that let you run over HTTP 
proxy - they use this, and have a ICQ server running on port 443. Thus 
allowing people to use it behind corporate firewalls.

So, we need a HTTPProxy transport that will do this automatically for 
clients, along with a SOCKSv4 transport and eventually a SOCKSv5 transport.

proxy = HTTPProxier("proxy.isp.net", 8080)
proxy.clientTCP("www.example.com", 443, myProtocolInstance)
# cool, huh?





More information about the Twisted-Python mailing list