This integration proxies traffic from tools running inside Cursor, not Cursor’s own AI calls. Cursor authenticates with its backend (
*.cursor.sh) via your Cursor subscription — that traffic passes through Cordon as a transparent tunnel and doesn’t need credential injection.Automated setup
The fastest way to get started:- Generates CA certificates (if not already present)
- Creates a scaffold
cordon.yaml - Configures Cursor’s
settings.jsonwithhttp.proxyand terminal environment variables
settings.json is backed up to settings.json.cordon.bak before any changes are made.
Global setup with background service
To install cordon as a background service that starts automatically:Remove the setup
What gets configured
Cordon writes to Cursor’s VS Code-stylesettings.json:
| Setting | Purpose |
|---|---|
http.proxy | Routes extension and VS Code HTTP traffic through Cordon |
terminal.integrated.env.osx (or .linux) | Sets HTTPS_PROXY, HTTP_PROXY, NODE_EXTRA_CA_CERTS for integrated terminal sessions |
Adding routes
After setup, editcordon.yaml to add routes for the APIs your tools call. Example for OpenAI:
Verifying the setup
To test from Cursor’s integrated terminal without runningcordon trust, pass the CA cert directly to curl:
cordon.yaml under tls.ca_cert_path. If Cordon is running with a matching route, the dummy token is stripped and replaced with the real credential.
How it works
Cursor is built on VS Code (Electron/Node.js). The integration uses two complementary mechanisms:http.proxy tells VS Code’s built-in proxy agent to route HTTP requests through Cordon. This covers extensions that use VS Code’s HTTP utilities, marketplace requests, and other VS Code-layer traffic.
terminal.integrated.env.osx (or .linux) sets proxy environment variables for integrated terminal sessions. CLI tools, scripts, and processes launched from Cursor’s terminal pick up HTTPS_PROXY and HTTP_PROXY automatically.
NODE_EXTRA_CA_CERTS is set in the terminal environment so Node.js tools trust Cordon’s CA certificate. For extensions and the main Cursor process to trust the CA, run cordon trust to add it to the system trust store.
Cordon only MITMs connections to hosts with matching routes. All other traffic passes through as a transparent CONNECT tunnel — the upstream server’s real certificate is presented to the client, and no CA configuration is needed for those connections.
Workflow
Once configured, the workflow is:- Start cordon:
cordon start(or use the background service) - Open Cursor as usual
- Terminal commands and extensions that call configured API hosts get credentials injected transparently
- No real API keys in your terminal history, env vars, or extension configs
Troubleshooting
Certificate errors in terminal
If you seeSSL certificate problem: unable to get local issuer certificate from curl or similar tools:
- Quick fix: Pass the CA cert directly:
curl --cacert /path/to/ca-cert.pem ... - Permanent fix: Run
cordon trustto add the CA to the system trust store
cordon.yaml under tls.ca_cert_path.
Extensions not routing through proxy
Verifyhttp.proxy is set in Cursor’s settings:
http.proxy. They would need HTTPS_PROXY set in the process environment, which requires either cordon trust + launching Cursor from a shell with the var set, or the extension to read VS Code’s proxy configuration.
Terminal not picking up proxy vars
Open a new terminal tab in Cursor after running setup — existing terminals won’t pick up the newterminal.integrated.env settings. Verify:
Proxy not running
New routes not taking effect
Cordon resolves routes and secrets at startup. If you add or change routes incordon.yaml, restart the proxy:
401 Unauthorized errors
- Verify the secret is stored:
cordon secret set <route-name> --config /path/to/cordon.yaml - Check the auth type: OpenAI uses
type: bearer, Anthropic usestype: api_keywithheader_name: x-api-key - Restart cordon: Secrets are resolved at startup — if you changed a secret, restart the proxy