[Twisted-Python] recommended starting point for http debugging/logging proxy.

Gelonida gelonida at gmail.com
Thu Oct 7 15:48:41 EDT 2010


Can anybody recommend  a good starting point for a twisted http proxy,
or comment on the links that I'll mention lateron in this post?

I'd like to use a ddebugging it for playing/debugging/filtering

Initially I'd just like to log all requests.

lateron I'd like to save certain responses on the disk.

Please note:
Im familiar with python and http / html in general.

I'm not experienced with twisted, but thought, that this might be a good
example / excuseto learn a little.

I found following links and wondered what you could recommend:

http://defrang.com/python mentions a HTTP Debugging Proxy

http://wiki.python.org/moin/Twisted-Examples has following example, but
I dont't know where to hook in:

I found one twisted example for a web proxy, but it was so simple, that
I don''t have any idea of where to hook in.

from twisted.web import proxy, http
from twisted.internet import reactor
from twisted.python import log
import sys

class ProxyFactory(http.HTTPFactory):
    protocol = proxy.Proxy

reactor.listenTCP(8080, ProxyFactory())



seems also interesting

More information about the Twisted-Python mailing list