I have been trying to get mitmproxy to work on my macOS sierra and unable to do so.
brew install mitmproxy.mitmproxy on the terminal it starts the application. mitm.it. It shows: If you can see this, traffic is not passing through mitmproxy.~./mitmproxy folder for a clean run. Restarted mitmproxy. The new cert's are created. ~./mitmproxy to the Keychain Access. For files with password entered nothing and continued. In the end Keychain Access gives me the results:
An error has occurred. Unable to import an item.
The contents of this item cannot be retrieved.
Still I see an entry for mitmproxy certs in Keychain access with the following error with it:
This root certificate is not trusted
Use System defaults to Always trust. The above error of not getting trusted get's removed. mitmproxy. No logs if I go to some website. mitm.it shows the same error. Mitmproxy version: 2.0.2 (release version)
Python version: 3.6.1
Platform: Darwin-16.5.0-x86_64-i386-64bit
SSL version: OpenSSL 1.1.0e 16 Feb 2017
Mac version: 10.12.4 ('', '', '') x86_64
Read the documentation again more closely in case that I might have missed something. In the Quick Setup it's mentioned
```
start mitmproxy and configure your target device with the correct proxy settings.
````
How does one configure my device with correct proxy settings?
Followup:
I found this article:
https://medium.com/@maxgreenwald/mitmproxy-your-d-i-y-private-eye-864c08f84736
And according to the article's suggestions configured Chrome's proxy to port 8080. Now I am able to see the traffic in mitmproxy logs. Though if I still go to mitm.it I get the same error of traffic not passing through mitmproxy.
You have to change you browser's proxy settings.
Enable the HTTP proxy, and set it to localhost with port 8080.
Also, I think you have to make sure that there is no "Bypass proxy for these hosts" setting for localhost or 127.0.0.1.
Thanks for the detailed report. While it's easy to classify this as a layer 8 error, I think we should ultimately have better docs for this. Or - as Charles and Fiddler do it (I think) - capture the local machine by default.
I'm closing this anyway, as there's nothing immediately actionable for us in here. We'll handle this in the issue linked above though, thanks again for the report!
Another answer: I forgot to turn off my adblock VPN :/
Most helpful comment
Another answer: I forgot to turn off my adblock VPN :/