Skip to content

Instantly share code, notes, and snippets.

@jagtesh
Forked from ithinkihaveacat/twisted_proxy.py
Created October 1, 2011 08:28
Show Gist options
  • Save jagtesh/1255761 to your computer and use it in GitHub Desktop.
Save jagtesh/1255761 to your computer and use it in GitHub Desktop.
# Do not name this twisted.py or Python's loader will get
# confused!
from twisted.web import proxy, http
from twisted.internet import reactor
from twisted.python import log
import sys
# log.startLogging(sys.stdout)
class ProxyFactory(http.HTTPFactory):
protocol = proxy.Proxy
reactor.listenTCP(8083, ProxyFactory())
reactor.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment