Hey guys! I work with iOS apps testing and usually use Charles to mock json requests. However, now I’m trying to automate some of my tests, so I’m using Mitmproxy to write some python scripts and mock the json requests based on the request URL. But for my surprise, my request URL do not appear on the mitmproxy log. My IP is not v6 and I generated the needed pem file to access my url request. I copied my pem file to the root folder of mitmproxy, but I still can’t see my GET request on mitmproxy, even though it shows properly on Charles.
mhils thanks for your reply. I set my client certificates but command line, but the request that needs them do not complete the handshake. In addition, several other domains do not complete the handshake either. When I use the same certificate in Charles, the request completes with 200 code response.
I was able to handle the issue creating a folder named “ca” on the mitmproxy root folder and renaming my client certificate as “mitmproxy-ca.pem”. After that, I set the cadir to the “ca” folder, so every time a certificate is required, my own certificate is considered as the root mitmproxy certificate and used. I actually do not believe this is the correct approach, since I might want to use multiple client certificates, but for now it is handling the case.
Thanks for looking into this. I think you are confusing the term “client certificate”. The error messages in your screenshot above show that your client does not trust mitmproxy’s server certificate. The client certificate is what the client would use itself to authenticate itself to the server. You can pass both custom client and normal/server certificates to mitmproxy: http://docs.mitmproxy.org/en/stable/certinstall.html