The env-var contract
Cordon terminates TLS locally, which requires the calling process to:- Send HTTP(S) traffic through
http://127.0.0.1:<cordon-port>, and - Trust the cordon CA so the terminated TLS handshakes validate.
| Variable | Value | Why |
|---|---|---|
HTTPS_PROXY / HTTP_PROXY | http://127.0.0.1:<port> | Most HTTP clients honor these. <port> comes from listen in cordon.toml. |
https_proxy / http_proxy | same | lowercase variants — required by a handful of tools (curl on some distros, wget, some Python libs). |
NODE_EXTRA_CA_CERTS | absolute path to ca-cert.pem | Node.js-specific. Node expects a raw cert, not a bundle. |
SSL_CERT_FILE | absolute path to combined-ca.pem | Used by OpenSSL, curl, Go. These vars replace the default trust store, so they need a bundle (system CAs + cordon CA) — a raw cert alone would lose every other trust anchor. |
REQUESTS_CA_BUNDLE | same combined bundle | Python requests library. |
CURL_CA_BUNDLE | same combined bundle | curl. |
combined-ca.pem) is generated at setup time by concatenating your system CA trust store with the cordon CA.
Getting the values
You don’t derive these by hand.cordon env prints them for the current scope’s cordon.toml:
cordon env for the full command reference (fish, dotenv, and json formats, and the --scope flag).
Applying them
Pick whichever fits your workflow.Current shell (bash / zsh)
fish
direnv (.envrc)
direnv allow after adding. Traffic from commands run in that directory flows through cordon.
mise (.mise.toml)
_.file = ".mise.cordon.env" in your .mise.toml.
dotenv (.env)
Programmatic / CI
jq or parse with your language’s JSON library.
Verifying it works
With the env vars exported and cordon running (cordon start), make a request to a host you’ve configured a route for:
SSL_CERT_FILE is set and points at combined-ca.pem, not ca-cert.pem.
Run cordon doctor if anything feels off.
When to use which scope
cordon env(default,--scope project) reads./cordon.toml. Use this when you have a per-project setup.cordon env --scope userreads~/.config/cordon/cordon.toml. Use this for a user-wide cordon instance shared across projects.