Problem Description
Option allow_hosts option breaks https for mitmdump/mitmproxy.
Steps to reproduce the behavior:
Assuming that certificates are installed for mitmproxy: https://docs.mitmproxy.org/stable/concepts-certificates/
When running mitmdump/mitmproxy without "allow_hosts" option, then https works correctly, both for proxy localhost address and target address:
curl --proxy https://localhost:8080/ https://my-service-url
However, when I start mitmdump/mitmproxy with "allow_hosts" command-line option, then https stops working and I have to use http for proxy localhost OR for target address:
curl --proxy http://localhost:8080/ https://my-service-url
also vice-versa works (but not both proxy and target can have https):
curl --proxy https://localhost:8080/ http://my-service-url
Conclusion: "allow_hosts" option should not affect the usage of https.
System Information
"mitmproxy --version" here:
Mitmproxy: 11.1.0
Python: 3.12.7
OpenSSL: OpenSSL 3.4.0 22 Oct 2024
Platform: macOS-15.2-arm64-arm-64bit
Problem Description
Option allow_hosts option breaks https for mitmdump/mitmproxy.
Steps to reproduce the behavior:
Assuming that certificates are installed for mitmproxy: https://docs.mitmproxy.org/stable/concepts-certificates/
When running mitmdump/mitmproxy without "allow_hosts" option, then https works correctly, both for proxy localhost address and target address:
curl --proxy https://localhost:8080/ https://my-service-urlHowever, when I start mitmdump/mitmproxy with "allow_hosts" command-line option, then https stops working and I have to use http for proxy localhost OR for target address:
curl --proxy http://localhost:8080/ https://my-service-urlalso vice-versa works (but not both proxy and target can have https):
curl --proxy https://localhost:8080/ http://my-service-urlConclusion: "allow_hosts" option should not affect the usage of https.
System Information
"mitmproxy --version" here: