[web2py] Re: SOCKsify all connections from web2py server

2014-10-17 Thread www.diazluis.com
greetings. 
I am also interested in being able to run directly on the server rocket 
tor. 
I wonder if he did it?


El martes, 18 de octubre de 2011 18:09:57 UTC-4:30, Arturo Filastò escribió:
>
> Yes, you are correct I am worried about outbound connections. Like 
> connecting to SMTP etc. 
>
> Is there a central location that I should patch in web2py to reroute 
> all *outbound* connections through a proxy. 
>
> I am aware of how to use python with a SOCKS proxy, but I would like 
> to know where I should inside of web2py to make sure nobody connects 
> to the internet without going through the proxy. 
>
>
> - Art. 
>
>
> On Oct 18, 5:06 pm, Dragonfyre13  wrote: 
> > 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-p... 
> > 
> > Unless I'm missing something, and the socks proxy stuff isn't just 
> > outbound connections. 
> > 
> > On Oct 18, 8:28 am, Massimo Di Pierro  
> > 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ò  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.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: SOCKsify all connections from web2py server

2011-10-29 Thread Massimo Di Pierro
Can you send a diff of your version of web2py? Perhaps we can create a
hook so that you do not neet to maintain a fork.

On Oct 29, 4:38 pm, Arturo Filastò  wrote:
> Just wanted to update you on our progress.
>
> We have wrapped the modules that we use ourselves with 
> socksipy:http://web2py.com/examples/static/epydoc/web2py.gluon.shell-module.htmlhttps://code.google.com/p/socksipy-branch/
>
> However we would like to have make also our DNS requests go through a
> special DNS server that is listening on localhost (the Tor DNS
> server). Our idea is therefore to rewrite the socket.gethostbyname
> method and override the default socket in all of gluon.
>
> Does this seem to be a good option?
>
> Currently the only way we have figured out to do to this is ship our
> own custom version of web2py, however is there is a better way to do
> this all suggestions are welcome.
>
> - Art.


[web2py] Re: SOCKsify all connections from web2py server

2011-10-29 Thread Arturo Filastò
Just wanted to update you on our progress.

We have wrapped the modules that we use ourselves with socksipy:
http://web2py.com/examples/static/epydoc/web2py.gluon.shell-module.html
https://code.google.com/p/socksipy-branch/

However we would like to have make also our DNS requests go through a
special DNS server that is listening on localhost (the Tor DNS
server). Our idea is therefore to rewrite the socket.gethostbyname
method and override the default socket in all of gluon.

Does this seem to be a good option?

Currently the only way we have figured out to do to this is ship our
own custom version of web2py, however is there is a better way to do
this all suggestions are welcome.

- Art.


[web2py] Re: SOCKsify all connections from web2py server

2011-10-18 Thread Arturo Filastò
Yes, you are correct I am worried about outbound connections. Like
connecting to SMTP etc.

Is there a central location that I should patch in web2py to reroute
all *outbound* connections through a proxy.

I am aware of how to use python with a SOCKS proxy, but I would like
to know where I should inside of web2py to make sure nobody connects
to the internet without going through the proxy.


- Art.


On Oct 18, 5:06 pm, Dragonfyre13  wrote:
> 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-p...
>
> Unless I'm missing something, and the socks proxy stuff isn't just
> outbound connections.
>
> On Oct 18, 8:28 am, Massimo Di Pierro 
> 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ò  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.


[web2py] Re: SOCKsify all connections from web2py server

2011-10-18 Thread Dragonfyre13
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 
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ò  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.


[web2py] Re: SOCKsify all connections from web2py server

2011-10-18 Thread Massimo Di Pierro
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ò  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.


[web2py] Re: SOCKsify all connections from web2py server

2011-10-18 Thread Arturo Filastò
More details on what exactly I am trying to solve can be found here:
https://github.com/globaleaks/GlobaLeaks/issues/90.

- Art.

On Oct 18, 10:59 am, Arturo Filastò  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.