Sounds like you're more concerned with outbound connections. Checkout
these (I've only played briefly with the first):
http://socksipy.sourceforge.net/
http://sourceforge.net/projects/pysocks/

Discussion here: 
http://stackoverflow.com/questions/2537726/using-urllib2-with-socks-proxy

Unless I'm missing something, and the socks proxy stuff isn't just
outbound connections.

On Oct 18, 8:28 am, Massimo Di Pierro <massimo.dipie...@gmail.com>
wrote:
> Interesting problem. I assume you are working the web server level.
> That means Rocket.
>
> If that is correct, you should contact the author of Rocket:
>
> https://launchpad.net/rocket
>
> look into gluon/rocket.py and the logic to handle SSL. There is a
> single socket and a it is wrapped into SSL. Hope this helps.
>
> Keep me posted about your project. I am interested.
>
> massimo
>
> On Oct 18, 3:59 am, Arturo Filastò <a...@baculo.org> wrote:
>
>
>
>
>
>
>
> > I am interested in having all connections made by web2py run through a
> > SOCKS4a proxy (in this specific case Tor).
>
> > What is the best way to do so? Is there some function that is always
> > used by web2py for network connections that I can go and patch?
>
> > It is also very important that the connections made by web2py don't
> > leak (e.x. DNS queries).
>
> > Thanks for the tips.

Reply via email to