Installation & Setup
Install & Run
-
Install dependencies
ProxyServer has only two npm dependencies:
ws(WebSockets) andnode-forge(TLS certificate generation).npm install -
Start the server
node server.jsYou'll see:
=== HTTPS MITM Setup === CA certificate: /path/to/ProxyServer/certs/ca.crt === ProxyServer Ready === Proxy: http://localhost:9080 Dashboard: http://localhost:9081 -
Open the dashboard
Navigate to
http://localhost:9081in any browser. You'll see the traffic list (empty) and a status bar showing "Connected". -
Send traffic through the proxy
Configure any HTTP client to use
localhost:9080as its proxy and make requests. They'll appear in the dashboard in real time.
Custom Ports
Use environment variables to change the default ports:
# Use port 7070 for proxy and 7071 for dashboard
PROXY_PORT=7070 DASHBOARD_PORT=7071 node server.js
Configuring HTTP Clients
curl
The -x flag tells curl to use a proxy:
# Simple GET request
curl -x http://localhost:9080 http://httpbin.org/get
# POST with JSON body
curl -x http://localhost:9080 \
-X POST http://httpbin.org/post \
-H "Content-Type: application/json" \
-d '{"user": "admin", "action": "login"}'
# HTTPS (requires trusting the CA certificate first — see below)
curl -x http://localhost:9080 https://httpbin.org/get
macOS System Proxy
Configure all HTTP traffic from your Mac to route through the proxy:
# Enable HTTP proxy on Wi-Fi
networksetup -setwebproxy Wi-Fi localhost 9080
# Enable HTTPS proxy (requires CA trust)
networksetup -setsecurewebproxy Wi-Fi localhost 9080
# Disable when done
networksetup -setwebproxystate Wi-Fi off
networksetup -setsecurewebproxystate Wi-Fi off
Firefox
Firefox has its own proxy settings separate from the OS:
- Open Settings > General > scroll to Network Settings
- Click Settings...
- Select Manual proxy configuration
- HTTP Proxy:
localhost, Port:9080 - Check "Also use this proxy for HTTPS"
- Click OK
Chrome
Chrome uses your operating system's proxy settings. On macOS, configure the system proxy as shown above. On Linux:
# Launch Chrome with a specific proxy
google-chrome --proxy-server="http://localhost:9080"
iOS / Android
Mobile devices can use the proxy if they're on the same network:
- Find your computer's local IP address (e.g.,
192.168.1.42) - On the mobile device, go to Wi-Fi settings > proxy > Manual
- Set Server:
192.168.1.42, Port:9080 - For HTTPS: install the CA certificate on the device (see certificates guide)
HTTPS Setup (Quick Version)
On first run, ProxyServer generates a root CA certificate at certs/ca.crt. Trust it once to enable HTTPS interception:
# macOS — add to system keychain (Chrome uses this automatically)
sudo security add-trusted-cert -d -r trustRoot \
-k /Library/Keychains/System.keychain certs/ca.crt
# Firefox — must import separately
# Preferences → Privacy & Security → Certificates → View Certificates → Import
For a full explanation of why this is needed and how it works, read the TLS & Certificates guide.
Verifying Everything Works
| Test | Command | Expected |
|---|---|---|
| HTTP request | curl -x http://localhost:9080 http://httpbin.org/get |
Response returned; entry appears in dashboard |
| POST with body | curl -x http://localhost:9080 -X POST -d '{"a":1}' -H "Content-Type: application/json" http://httpbin.org/post |
Request body visible in dashboard detail panel |
| HTTPS request | curl -x http://localhost:9080 https://httpbin.org/get |
Decrypted content visible (after CA trust) |
| Dashboard status | Open http://localhost:9081 |
Status bar shows "Connected", request count updates |