Type Alias ProxyOptions

Source
Expand description

Upstream proxy configuration.

Two shorthands sidestep the discriminated-union noise for the common cases:

  • "none" — disable proxy resolution entirely.
  • "system" — honor HTTP_PROXY / HTTPS_PROXY / NO_PROXY from env.

Use the object form for explicit URIs, headers, or basic-auth credentials.

type ProxyOptions = 
    | "none"
    | "system"
    | { type: "system" }
    | {
        auth?: ProxyAuth;
        headers?: Record<string, string | string[]>;
        type: "custom";
        uri: string;
    }