This uses mitmproxy, which can proxy both HTTP and HTTPS.

$ mitmproxy --mode reverse:http://localhost:8000