export type ProxyResolution = { kind: 'direct'; } | { kind: 'proxy'; proxy: URL; } | { kind: 'unusable'; variable: string; value: string; reason: string; }; export declare function resolveProxyForUrl(url: URL, env?: NodeJS.ProcessEnv, npmConfigProxy?: boolean): ProxyResolution; /** * The proxy `env` configures for `protocol`, before any `no_proxy` exclusion: * `_proxy`, falling back to `all_proxy`, normalized as the probe * would use it (a value with no scheme takes the target's protocol). With * `npmConfigProxy`, `npm_config__proxy` comes first and * `npm_config_proxy` sits between the two. */ export declare function resolveProxyForProtocol(protocol: string, env?: NodeJS.ProcessEnv, npmConfigProxy?: boolean): ProxyResolution; /** * The `no_proxy` entries `env` configures (`npm_config_no_proxy` first with * `npmConfigProxy`), lowercased and with the empty entries a separator run * leaves dropped. Each entry excludes hosts on its own, so their order carries * no meaning. */ export declare function noProxyEntries(env: NodeJS.ProcessEnv, npmConfigProxy?: boolean): string[]; export declare function withoutCredentials(value: string): string;