pytunnel 0.21 and urllib3.py

john pyguy30@yahoo.com
8 Aug 2003 14:22:06 -0700


pytunnel has been further updated with .netrc support and a automatic
shutdown of the standalone process after it's been idle.

As an example, I've also just started a wrapper for urllib2.py, for
lack of a better name, I've called it urllib3.py.  It ultimately calls
urllib2.py to do the heavy lifting but first sets up up a tunnel (via
by pytunnel).

You would use it like:

import urllib3
print urllib3.urlopen('https://login.yahoo.com/',ssl='proxy_server').read()

The ssl option tells urllib3 to setup a tunnel with proxy_server.


Both programs are at:

http://savannah.nongnu.org/download/pytunnel/urllib3.py
http://savannah.nongnu.org/download/pytunnel/pytunnel.py


What is pytunnel?

Pytunnel is a program that tunnels TCP/IP through another server like
a proxy.
A typical use would be to tunnel through an http proxy. Pytunnel
supports basic
http proxy authentication. Pytunnel allows your software to connect to
the local tunnel rather than connecting to the remote server directly.
 For example, if doing SSL, instead connecting to the webhost on port
443 you connect to localhost using the locally determined port.

Pytunnel makes use of several technologies asyncore, threads, and
non-blocking sockets w\a custom recv_all to take advantage of that.
The tunnel has no knowledge of the protocol being tunneled through it,
instead, it keeps the tunnel alive as long as any bit of data, now
matter how tiny, comes across it. Once the data stops after a user
defined timeout, tunnel shuts down.

This program can be either used as a library or standalone tunnel.


john