The requests library is not working while the global proxy is enabled #5331
Replies: 2 comments 1 reply
-
I believe SSL_CERT_FILE=<path_to_mitmproxy_ca> https_proxy=https://127.0.0.1:8080 python3 my_script.py |
Beta Was this translation helpful? Give feedback.
-
You are blocking the |
Beta Was this translation helpful? Give feedback.
-
Problem Description
Once the Windows "Use a proxy server" option is enabled,
![image](https://user-images.githubusercontent.com/73934386/167235088-bcc11ae8-e8db-44d8-b7ce-e73802fe60a2.png)
requests library in my addon does not work.
Example1:
However, when I disable the "Use a proxy server" option(which means traffic will not pass through mitmproxy),
Example2:
If I want to send a request every time mitmproxy catch a request to 'github.com'("Use a proxy server" is enabled):
Example3:
And this blocks mitmproxy and my browser.
However, if I add
timeout=5
tor = requests.get('https://mitmproxy.org/')
, this example turns into example 2 above.Similar issue on github:
#4572
Similar issues on stackoverflow:
https://stackoverflow.com/questions/66089365/requests-library-does-not-perform-http-requests-inside-mitmproxy
https://stackoverflow.com/questions/55066451/mtmproxy-http-get-request-in-script
https://stackoverflow.com/questions/66089365/requests-library-does-not-perform-http-requests-inside-mitmproxy
System Information
Mitmproxy: 8.0.0
Python: 3.9.7
OpenSSL: OpenSSL 1.1.1n 15 Mar 2022
Platform: Windows-10-10.0.19044-SP0
Beta Was this translation helpful? Give feedback.
All reactions