def makeService(config): if config["interface"] != "127.0.0.1": print print "WARNING:" print " You have chosen to listen on a non-local interface." print " This may allow intruders to access your local network" print " if you run this on a firewall." print t = socks.SOCKSv4Factory(config['log']) portno = int(config['port']) return internet.TCPServer(portno, t, interface=config['interface'])
#! /usr/bin/python from twisted.internet import reactor from twisted.protocols import socks #from twisted.protocols.socks import SOCKSv4Factory #import socks if '__main__' == __name__: reactor.listenTCP(1080, socks.SOCKSv4Factory("./socks.log")) #reactor.listenTCP(1080,socks.SOCKSv4Factory("./socks.log")) reactor.run()