Configure FORWARD/TUNNEL mode for proxies. #703
Unanswered
karpetrosyan
asked this question in
Q&A
Replies: 2 comments 4 replies
-
This is how to reproduce the problem. $ mitmweb
Web server listening at http://127.0.0.1:8081/ import httpcore
pool = httpcore.HTTPProxy(proxy_url='http://127.0.0.1:8080')
resp = pool.request("GET", "https://www.google.com")
print(resp)
# tunneling: httpcore.ConnectError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:992)
# forwarding: <Response [200]> |
Beta Was this translation helpful? Give feedback.
4 replies
-
I believe we should add something like "proxy_mode," which was removed from httpx in encode/httpx#1795. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Regarding the proxies, i have two questions.
create_connection
method looks like this?When using mitmproxy I must perform some magic in the "httpcore" source code to enable HTTPS forwarding because I can't use tunneling, which will attempt to upgrade the stream to tls, when the proxy server for analyzing the HTTPS traffic is running on localhost.
Of course, by adding a self-signed certificate to my mitmproxy, I can fix these issues, but why can't we just make it configurable?
Beta Was this translation helpful? Give feedback.
All reactions