To inject credentials into HTTPS requests, cordon performs TLS man-in-the-middle (MITM) for hosts with matching routes. This is the same technique used by tools like mitmproxy and Charles Proxy. Unmatched HTTPS traffic is not decrypted. It passes through as a transparent CONNECT tunnel, so the upstream server’s real certificate is presented to the client.Documentation Index
Fetch the complete documentation index at: https://docs.codezero.io/llms.txt
Use this file to discover all available pages before exploring further.
How it works
- Your app sends a
CONNECTrequest to the proxy for the target host - Cordon responds with
200 Connection Established - Cordon generates a certificate for the target hostname, signed by the local CA
- Your app establishes a TLS connection with cordon (trusting the local CA)
- Cordon establishes a separate TLS connection with the upstream API (using the system trust store)
- Cordon can now strip and replace auth headers before forwarding the request
CA certificate setup
Thecordon setup command generates CA certificates automatically:
cordon.toml stores absolute paths to the generated CA files. Use the real paths from your generated config; see Scopes for certificate storage locations.
Trusting the CA
Your system and tools need to trust the CA certificate for HTTPS interception to work without certificate errors.System trust store
- Use
cordon envor the generic tool guide for the standard proxy and CA bundle variables. - Use the SDK compatibility guide for runtime-specific details such as Node.js, Java, Ruby, PHP, curl, and wget.
Troubleshooting certificate errors
Certificate failures usually mean the calling process either is not using Cordon’s CA configuration or is using the raw CA cert where it needs the combined bundle. Use the same source of truth for all manual setups:NODE_EXTRA_CA_CERTSpoints toca-cert.pemfor Node.js.SSL_CERT_FILE,REQUESTS_CA_BUNDLE, andCURL_CA_BUNDLEpoint tocombined-ca.pem, notca-cert.pem.cordon trusthas been run for tools that use the system trust store.- Runtime-specific proxy handling is covered in SDK Compatibility.
Security considerations
- The CA private key is stored on disk with
0600permissions (owner-only read/write) - The CA certificate must be explicitly trusted — cordon never modifies trust stores without user action
- Per-host certificates include
SubjectAltName: DNS:<hostname>as required by modern TLS clients - The downstream connection (app to cordon) uses the local CA; the upstream connection (cordon to API) uses the system trust store — these are never mixed