How to install the local proxy certificates?

By default, aitm will try ot install the proxy certificates in the system it runs. However, if you work on a dual system, such as Windows WSL, follow these steps to install it on Windows.

Windows Steps

Get the path

  • On Windows:
dos
aitm service env | jq -r '.SSL_CERT_FILE'
  • On Wsl
bash
wslpath -w "$(aitm service env | jq -r '.SSL_CERT_FILE')"

Install it

dos
certutil -addstore -f "ROOT" \\wsl.localhost\Debian\home\user\.mitmproxy\mitmproxy-ca-cert.pem
txt
ROOT "Trusted Root Certification Authorities" Signature matches Public Key Certificate "mitmproxy" added to store. CertUtil: -addstore command completed successfully.