Skip to main content
Cordon works transparently with any HTTP client that respects the HTTPS_PROXY environment variable. Some SDKs use custom HTTP implementations that need additional configuration.

Compatibility matrix

SDK / LibraryWorks with env vars?Workaround
curl, wgetYesNone needed
Go net/httpYesNone needed
Rust reqwestYesNone needed
Python requestsYesNone needed
Python httpxYesNone needed
Ruby net/httpYesNone needed
undici.fetch()Yes (with register)--import @c6o/cordon/register
Node built-in fetchPartialSet env vars + register import
node-fetchNoUse http-proxy-agent package
axiosNoConfigure proxy option
gotYesRespects env vars natively

AI / LLM SDKs

The major AI SDKs use custom fetch implementations and do not respect HTTPS_PROXY env vars or undici’s global dispatcher. They require explicit proxy configuration.

Anthropic SDK

import Anthropic from '@anthropic-ai/sdk';
import * as undici from 'undici';

const client = new Anthropic({
  fetchOptions: {
    dispatcher: new undici.ProxyAgent('http://127.0.0.1:6790'),
  },
});

OpenAI SDK

import OpenAI from 'openai';
import * as undici from 'undici';

const client = new OpenAI({
  fetchOptions: {
    dispatcher: new undici.ProxyAgent('http://127.0.0.1:6790'),
  },
});
Both the Anthropic and OpenAI SDKs are built on the same underlying SDK generator (Stainless), which is why their proxy configuration is identical.

Other AI SDKs

SDKStatus
Vercel AI SDKNot yet tested
LangChain.jsNot yet tested
Google Generative AINot yet tested
AWS BedrockNot yet tested
CohereNot yet tested
MistralNot yet tested
We’re actively testing more SDKs. If you’ve tested one not listed here, let us know.

Node.js register import

For Node.js applications that use fetch (built-in or undici), the @c6o/cordon/register import patches the global dispatcher to respect proxy env vars:
node --import @c6o/cordon/register your-app.js
Or via NODE_OPTIONS:
NODE_OPTIONS="--import @c6o/cordon/register" npm run dev
This works for applications using globalThis.fetch or undici.fetch(). It does not work for libraries that bring their own HTTP stack (like node-fetch, axios, or the AI SDKs listed above).