Socks4a now with Asynchronous hostname resolution
| Newsgroups | gmane.comp.python.twisted.bugs |
|---|---|
| Message-ID | <[email protected]> |
New submission from lorph <None>:
A short while ago I implemented the socks4a feature. It used a blocking gethostbyname to resolve hostnames which was a fast and easy update.
With this new slightly longer fix, the gethostbyname is replaced with reactor.resolve so it will not be blocking anymore. I have also updated the unit with help from Exarkun.
If you would like an easy way to test it on Firefox, here is how to do it.
Run this code:
{{{
from twisted.internet import reactor
from twisted.protocols.socks import SOCKSv4Factory
class SOCKSFactory(SOCKSv4Factory):
def __init__(self):
SOCKSv4Factory.__init__(self, '')
reactor.listenTCP(1080, SOCKSFactory())
reactor.run()
}}}
In Firefox, go to "about:config" and set "network.proxy.socks_remote_dns" to true. Then set the Firefox socks proxy to localhost:1080. This is also used in other programs such as utorrent.
----------
Type : enhancement
Component: core
Keywords : socks protocols
Priority : normal
Nosy :
----------
http://twistedmatrix.com/trac/ticket/3920