Comment on page
Capture HTTP/HTTPS traffic from Python with Proxyman
Proxyman v4.7.0 or later can capture HTTP/HTTPS traffic from Python with 1-click.
- 1-click solution: No need to manually set HTTP Proxy config or trust the self-signed certificate.
- Support many Python libraries: request, http.client, urllib3, httpx and aiohttp
- 1.Open Proxyman -> Setup Menu -> Automatic Setup
- 2.Click on "Open New Terminal"
- 3.Accept the Apple Script permission prompt if needed
- 4.The New Terminal app is launched -> You can start your Python Backend Server, or Run scripts => Proxyman automatically captures all traffic.
- 5.Done ✅
Capture NodeJS Traffic with Proxyman
Please check out the Automatic Setup page:
- Add Certificate:
$ python3 script.py add
- Remove Certificate
$ python3 script.py remove
By default, Python on macOS doesn't trust Proxyman self-signed certificates. As a result, you might encounter SSL Error if you try to intercept HTTPS traffic.
If you would like to intercept HTTPS Traffic from your Python script, you have to explicitly tell Python to use the Proxyman Root Certificate at
Please follow the guideline:
$ export SSL_CERT_FILE=~/.proxyman/proxyman-ca.pem
$ export REQUESTS_CA_BUNDLE=~/.proxyman/proxyman-ca.pem
$ echo "export REQUESTS_CA_BUNDLE=~/.proxyman/proxyman-ca.pem" >> ~/.bash_profile ; source ~/.bash_profile
If you don't use Proxyman, please revert the change by commenting out:
# export REQUESTS_CA_BUNDLE=~/.proxyman/proxyman-ca.pem