MITMProxy
mitmproxy
is a free and open source interactive HTTPS proxy. It is a
swiss-army knife for debugging, testing, privacy measurements, and penetration
testing. It can be used to intercept, inspect, modify and replay web traffic
such as HTTP/1, HTTP/2, WebSockets, or any other SSL/TLS-protected protocols.
Set-up⚑
- Install
mitmproxy
. This will give you an executable of the same name. - Execute the binary. This will create a default
https
proxy server.
Enable HTTPS (in Arch Linux)⚑
- After installing mitmproxy run it in a terminal session and quit. This will
create the necessaries certificates files at
~/.mitmproxy
. - Extract the certificate to
.crt
format:openssl x509 -in ~/.mitmproxy/mitmproxy-ca.pem -inform PEM -out ca.crt
- Trust the certificate into CA:
sudo trust anchor ca.crt
- Run the
mitmproxy
again - Open another terminal session and set the proxy:
export http_proxy='http://localhost:8080' export https_proxy='http://localhost:8080'
- Run a curl to an https site and it should work:
curl https://www.google.com