Is there easy way chain couple of mitmproxies and usual HTTP proxy in such a way that first mitmproxy converts HTTPS traffic to HTTP, passes it to usual HTTP proxy which in turn passes it to second mitmproxy which converts it back to HTTPS and sends it to server?
I tried to use --mode upstream
option, but it doesn't convert HTTPS requests to HTTP.
I have scripts for second part, like tls_passthrough.py, but not sure how to do first part.
Or maybe I'm doing something stupid and I just can somehow "chain" HTTP proxy from script in transparent mode, i.e. using something like CGI interface?
What I want to do is some processing on HTTPS traffic which is not possible* to do directly in python scripts.
*Of course it is possible to do anything, but rewriting existing app to python doesn't seem as easy way...