Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > pytunnel 0.21 and urllib3.py

Reply
Thread Tools

pytunnel 0.21 and urllib3.py

 
 
john
Guest
Posts: n/a
 
      08-08-2003
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/...el/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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
if and and vs if and,and titi VHDL 4 03-11-2007 05:23 AM
urllib(2) and https blues? try pytunnel for python tunnelling john Python 1 08-01-2003 08:08 AM



Advertisments