To inject credentials into HTTPS requests, cordon performs TLS man-in-the-middle (MITM) using a locally-generated CA certificate. This is the same technique used by tools like mitmproxy and Charles Proxy.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 read and modify the request before forwarding it
CA certificate setup
Thecordon setup command generates CA certificates automatically:
~/.config/cordon/projects/<namespace>/certs/. cordon.toml stores absolute paths to those files. Use the real paths from your generated config (below uses the same /path/to/... placeholder style as elsewhere in these docs):
Trusting the CA
Your system and tools need to trust the CA certificate for HTTPS interception to work without certificate errors.System trust store
curl,wget- Go, Rust, Python, Ruby, C#/.NET applications
gh(GitHub CLI)- Most CLI tools
Node.js
Node.js does not use the system trust store. You must set an environment variable:Java
Java uses its own trust store (cacerts):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