Skip to main content
httpmon generates a CA certificate the first time it runs. To intercept HTTPS traffic, your system must trust this certificate. The certificate is stored at ~/.httpmon/mitmproxy-ca-cert.pem.

Automatic installation

The simplest approach. Run httpmon with --install-ca and it handles everything.
sudo httpmon --install-ca
This works on both macOS and Linux. It generates the CA certificate if it does not exist yet and adds it to your system trust store.

Manual installation

If you prefer to install the certificate yourself, use the platform-specific instructions below.
Add the certificate to the system keychain.
sudo security add-trusted-cert -d -r trustRoot \
  -k /Library/Keychains/System.keychain \
  ~/.httpmon/mitmproxy-ca-cert.pem

Firefox

Firefox uses its own certificate trust store and does not use the system store. You need to import the certificate manually.
  1. Open Firefox and go to Settings.
  2. Search for Certificates and click View Certificates.
  3. Select the Authorities tab and click Import.
  4. Select ~/.httpmon/mitmproxy-ca-cert.pem.
  5. Check Trust this CA to identify websites and click OK.

Certificate location

The CA certificate and key are stored in ~/.httpmon/.
FilePurpose
~/.httpmon/mitmproxy-ca-cert.pemCA certificate (share this to trust the proxy)
~/.httpmon/mitmproxy-ca.pemCA private key (keep this secret)