How to allow firefox to connect to webpage through mitmproxy?
Asked Answered
T

1

9

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?

Trinh answered 8/6, 2020 at 12:10 Comment(0)
R
15

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.

Retain answered 10/6, 2020 at 12:19 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.