HTTPS intercepting proxy for local development. Generates an ephemeral CA, launches Chrome with it pre-trusted, and routes Node/Python/Go/Rust traffic through it — no system keychain changes, no manual cert installs.
npm install -g one-click-proxy# Start proxy with Chrome
ocp start --browser
# In another terminal, configure your shell
eval "$(ocp env --lang node)"
# All HTTPS traffic from that shell now flows through the proxy
curl https://example.com # interceptedStart the proxy server.
ocp start # port 8080
ocp start -p 3128 # custom port
ocp start --browser # launch Chrome with proxy pre-configured
ocp start --log # print traffic to stdout
ocp start --log-filter '*.api.com' # filter logged traffic by URL glob
ocp start --log-file traffic.har # write HAR file
ocp start --rules '[{"action":"mock-response","match":"https://api.example.com/health","status":200,"body":"{\"ok\":true}"}]'Print shell export commands for proxy env vars. Pipe into eval to configure the current shell.
eval "$(ocp env)" # generic HTTP_PROXY / HTTPS_PROXY
eval "$(ocp env --lang node)" # + NODE_EXTRA_CA_CERTS
eval "$(ocp env --lang python)" # + SSL_CERT_FILE / REQUESTS_CA_BUNDLE
eval "$(ocp env --lang go)" # + GOFLAGS (Linux) or instructions (macOS)
eval "$(ocp env --lang rust)" # + SSL_CERT_FILESpawn a subshell with proxy env vars already set.
ocp shell # generic
ocp shell --lang python # Python-specific vars includedRules are passed as a JSON array via --rules. First match wins. Supported actions:
| Action | Description |
|---|---|
passthrough |
Forward request unmodified |
mock-response |
Return a fixed response |
map-local |
Serve a local file |
map-remote |
Forward to a different host |
modify-request |
Rewrite request headers before forwarding |
modify-response |
Rewrite response headers/status after forwarding |
- Ephemeral CA — generates a temporary certificate authority on each run (via mockttp)
-
Chrome trust — uses
--ignore-certificate-errors-spki-listto trust the CA without touching the system keychain -
Lockfile IPC — writes
$TMPDIR/ocp-lock.jsonsoocp envandocp shellcan discover the running instance - Clean shutdown — LIFO cleanup manager stops proxy, removes lockfile, and deletes temp CA on exit
MIT