I'm looking for a library that i can use to run a proxy server.
It should provide the ability to modify the request headers and body before dispatching to the target host and the response headers and body before dispatching to the client, the modification function should work even on https protocol(by decoding the connection and sending the modified response with a self generated certificate that the clients should trust in their browsers).
These functions are available in http debugging tools like Fiddler (with it's fiddlerscript scripting) but I'm looking for a python solution, also the library should be tailored to production proxy server and not testing and debugging purposes.