Python Twisted proxy - how to intercept packets
问题 I'm trying to print out the body of a HTTP response using Python. Here is my code sofar: 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(8080, ProxyFactory()) reactor.run() When I connect my browser to localhost:8080, I can see that all my requests are being directed through the Python proxy running locally. But how do I 1