pytunnel 0.21 and urllib3.py

J

john

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top