HTTPS_PROXY / HTTP_PROXY environment variables. Some languages and SDKs use custom HTTP implementations or different proxy mechanisms that need additional configuration.
Compatibility matrix
| Language / Runtime | SDK / Library | Works with env vars? | Workaround |
|---|---|---|---|
| CLI | curl | Partial | HTTP: only lowercase http_proxy. HTTPS: both cases work. (see below) |
| CLI | wget | Partial | Only reads lowercase http_proxy and https_proxy (see below) |
| Go | net/http | Yes | None needed |
| Rust | reqwest | Yes | None needed |
| Python | requests | Yes | None needed |
| Python | httpx | Yes | None needed |
| Python | urllib | Yes | None needed |
| Ruby | net/http | Partial | HTTP: prefers lowercase http_proxy. HTTPS: not supported via env vars (see below) |
| C# / .NET | HttpClient | Yes | None needed |
| Java | java.net.http | No | Uses JVM system properties (see below) |
| PHP | curl_init() | Partial | HTTP: only lowercase http_proxy. HTTPS: both cases work. (see below) |
| PHP | Guzzle | Yes (CLI only) | Reads uppercase HTTP_PROXY in CLI mode |
| Node.js | undici.fetch() | Yes (with register) | --import @c6o/cordon/register |
| Node.js | built-in fetch | Yes (with register) | --import @c6o/cordon/register |
| Node.js | node-fetch | No | Use http-proxy-agent package |
| Node.js | axios | Yes (with helper) | @c6o/cordon/axios |
| Node.js | got | Yes | Respects env vars natively |
Language-specific notes
curl
Thecurl CLI uses libcurl, which deliberately ignores uppercase HTTP_PROXY as a security measure against the httpoxy vulnerability (CVE-2016-5385) — only lowercase http_proxy is read. For HTTPS requests, both HTTPS_PROXY and https_proxy are accepted (the httpoxy attack vector does not apply to HTTPS).
wget
wget has its own HTTP implementation (it does not use libcurl). It only reads lowercase environment variables for both protocols: http_proxy and https_proxy. Uppercase variants (HTTP_PROXY, HTTPS_PROXY) are ignored entirely.
Java
Java’s built-injava.net.http.HttpClient does not read HTTP_PROXY or HTTPS_PROXY environment variables. Instead, it uses JVM system properties:
PHP
PHP’scurl_init() uses libcurl. For HTTP requests, it deliberately ignores uppercase HTTP_PROXY as a security measure against the httpoxy vulnerability (CVE-2016-5385) — only lowercase http_proxy is read. For HTTPS requests, both HTTPS_PROXY and https_proxy are accepted.
Guzzle (the most popular PHP HTTP client) handles this differently — it reads uppercase HTTP_PROXY at the application layer and explicitly sets CURLOPT_PROXY, but only in CLI mode (PHP_SAPI === 'cli'). In web/CGI contexts, Guzzle ignores HTTP_PROXY for the same httpoxy security reasons.
Ruby
Ruby’snet/http only supports proxy env vars for HTTP requests. It prefers the lowercase form http_proxy and will warn when uppercase HTTP_PROXY is used:
net/http does not automatically read HTTPS_PROXY or https_proxy from the environment. HTTPS proxy support requires explicit configuration in code:
Streaming support
Cordon streams response bodies through without buffering, so SSE (Server-Sent Events) and chunked transfer encoding responses work correctly. This is critical for AI API integrations that usestream: true — tokens are forwarded to the client as they arrive from the upstream API, with no added latency.
AI / LLM SDKs
The major AI SDKs use customfetch implementations and do not respect HTTPS_PROXY env vars or undici’s global dispatcher on their own. However, @c6o/cordon/register patches globalThis.fetch to inject a proxy dispatcher transparently — no code changes needed.
Automatic (recommended)
Add the register import to your Node.js entry point:globalThis.fetch internally.
Manual (if register import is not an option)
Both the Anthropic and OpenAI SDKs support explicit proxy configuration viafetchOptions.dispatcher:
Both the Anthropic and OpenAI SDKs are generated by Stainless, which acquires
globalThis.fetch at client constructor time. Any other Stainless-generated SDK (e.g., Cloudflare, Lithic, Modern Treasury) will work the same way with @c6o/cordon/register — no code changes needed.Other AI SDKs
| SDK | Status |
|---|---|
| Vercel AI SDK | Not yet tested |
| LangChain.js | Not yet tested |
| Google Generative AI | Not yet tested |
| AWS Bedrock | Not yet tested |
| Cohere | Not yet tested |
| Mistral | Not yet tested |
We’re actively testing more SDKs. If you’ve tested one not listed here, let us know.
Node.js register import
The@c6o/cordon/register import patches globalThis.fetch to inject a proxy dispatcher into all outbound requests. It also sets undici’s global dispatcher for code that uses undici.fetch() directly.
NODE_OPTIONS:
globalThis.fetch, undici.fetch(), and fetch-based SDKs like Anthropic and OpenAI. Libraries with their own HTTP stack still need their own integration path: axios has @c6o/cordon/axios, while clients like node-fetch still require explicit proxy-agent configuration.