Alex
Alex

Reputation: 44405

How to allow firefox to connect to webpage through mitmproxy?

I have installed mitmproxy (macOS Mojave) to monitor the complete traffic through a browser. However, the browser stops connecting to various webpages and give a warning

Did Not Connect: Potential Security Issue

I am not able to go ahead. How can I disable this block? How can I continue browsing as an exception?

Or is there a different tool to monitor network traffic that is easier to handle?

Upvotes: 9

Views: 10507

Answers (1)

Robert
Robert

Reputation: 42798

You need to make Firefox trust the root-CA certificate generated and used by Mitmproxy.

To do so open the Firefox preferences -> Privacy & Security

Then scroll down to the end of the page and click the Button "View Certificates..."

Select the Tab "Authorities" and click on the Button "Import".

If the file selector dialog select the file ~/.mitmproxy/mitmproxy-ca-cert.cer. When Firefox asks about for what purpose the certificate should be trusted select "for websites".

Once the certificate has been installed Firefox trusts Mitmproxy and you can browse the web through Mitmproxy. If some pages still not work you have to clear the Firefox cache to remove the HTTP Strict Transport Security (HSTS) pinned certificates.

Upvotes: 17

Related Questions