* Resolve the effective http/https proxy URLs: the scheme-specific * `HTTP_PROXY`/`HTTPS_PROXY` (ignoring a SOCKS-scheme value), falling back to an * http-scheme `ALL_PROXY` catch-all. `undefined` for a scheme with no usable * value.
(env: Env)
| 70 | * value. |
| 71 | */ |
| 72 | function resolveHttpProxyUrls(env: Env): { httpProxy?: string; httpsProxy?: string } { |
| 73 | const allProxy = httpSchemeValue(firstNonBlank(env, ['all_proxy', 'ALL_PROXY'])); |
| 74 | return { |
| 75 | httpProxy: httpSchemeValue(firstNonBlank(env, ['http_proxy', 'HTTP_PROXY'])) ?? allProxy, |
| 76 | httpsProxy: httpSchemeValue(firstNonBlank(env, ['https_proxy', 'HTTPS_PROXY'])) ?? allProxy, |
| 77 | }; |
| 78 | } |
| 79 | |
| 80 | /** |
| 81 | * Resolve a SOCKS proxy from the environment, or `undefined` if none. A SOCKS |
no test coverage detected