Automatic Setup
1-click to capture HTTP/HTPS traffic from NodeJS, Ruby and Python
1. Problems
Proxyman could not capture HTTP/HTTPS traffic from the following setup:
NodeJS: Axios, got, superagent, fetch, and node-fetch
Python: http, https, aiohttp, requests
Ruby: http, net/http, net/htps, faraday, and httparty, fastlane
ElectronJS
cURL
It's a known issue since NodeJS, Python, Ruby, and cURL which are executed from the Terminal app, don't respect the system HTTP Proxy. Thus, there is no traffic on Proxyman.
You have to read through the Technical Documentation of each library and manually config:
The HTTP Proxy
Trust a self-signed certificate
=> Time-consuming and error-prone ❌
2. Solution: Automatic Setup
Benefit:
✅ 1-click to automatically set up HTTP Proxy & Certificate on a variety of dev environments
Capture HTTP(s) traffic from NodeJS, Python, Ruby, Terminal or Web Browser, etc
Safe. Work on your current session, not affect your OS
How to use:
Open Proxyman -> Setup Menu -> Automatic Setup
Click on "Open New Terminal"
Accept the Apple Script permission prompt if needed
The New Terminal app is launched -> You can start your Backend Server, or Run scripts => Proxyman automatically captures all traffic.
Done ✅
Notes:
Only the pre-configured Terminal app is able to capture HTTP traffic out of the box. If you would like to use your own Terminal app (e.g. iTerm2, Hyper, etc), please use the Manual Setup.
It's totally safe because it runs on your current session. It doesn't alter your System Config.
ElectronJS
Open the Automatic Terminal
Use this command line:
Support Libraries:
Proxyman (with Automatic Setup) can work out of the box with the following network libraries.
NodeJS: axios, fetch (v18+), node-fetch, got, https, and superagent
ElectronJS app
cURL without --proxy flag
It's completely SAFE since the change only affects your current Terminal Session. It doesn't alter your bash_profile or zshrc file.
3. Advanced: How does it work?
As soon as you click on the "Open New Terminal" button, Proxyman would perform a series of automatic actions:
Use AppleScript to start the Terminal app.
With the new Terminal app, it starts running this command line:
proxyman_env_automatic_setup.sh is a bash script that defines new Variable Environments that helps Proxyman.
For example:
HTTP_PROXY & HTTPS_PROXY env
PATH
RUBYLIB
PYTHONPATH
NODE_OPTIONS
GLOBAL_AGENT_HTTP_PROXY
NodeJS:
Proxyman prepends a new Node directory into the $PATH env.
Monkey-patching the node with a global-agent package, which supports HTTP Proxy for axios, and fetch out of the box
Ruby:
Override the $RUBYLIB to Proxyman app
Patching all common libraries, such as http, net/http and net/https, etc -> Set HTTP Proxy and trust Proxyman self-signed certificate.
Python:
Override $PYTHONPATH to Proxyman app
Patching all common library, such as aiohttp, httplib, http.client -> Set HTTP Proxy and trust Proxyman self-signed certificate.
4. Troubleshooting
See the Troubleshooting page
Last updated