Friday, June 27, 2008

Simple SOCKS4 proxy in Python

If you need a SOCKS4 proxy for a custom port you can simply write it in a few python lines.


from twisted.internet import reactor
from twisted.protocols import socks

from twisted.internet.protocol import Factory

factory = Factory()
factory.protocol = socks.SOCKSv4

reactor.listenTCP(9999, factory)
reactor.run()

No comments: