Forward HTTPS to HTTP in Parallels VM


#1

Hello,

I’ve setup mitmproxy on my Mac with the proxy configured on the network interface as well as an iOS device with the certs trusted on both. I am trying to test the app locally and make calls to the API (iOS device -> Mac -> VM Guest) in a Parallels VM. The app uses ATS/SSL to access the API, but the API is not setup with SSL. I would like to use mitmproxy to serve the secure endpoints rather than setup nginx forwarding and an SSL chain or self signed cert. It seems like this should be possible.

Parallels is running on my Mac with port 9999 forwarding to a VM guest running the API. I am able to access http://localhost:9999 from my Mac and it loads properly. However, I am trying to setup https so that I can access https://localhost:9999 on my Mac and have mitmproxy forward the secure host to the non-secure guest VM.

I realize that there might be some python involved and was wondering how to best approach this or if someone has created any documentation.

Thank you in advance,
Tom