| 76242 | if (!process) { |
| 76243 | return void 0; |
| 76244 | } |
| 76245 | const httpsProxy = getEnvironmentValue(HTTPS_PROXY); |
| 76246 | const allProxy = getEnvironmentValue(ALL_PROXY); |
| 76247 | const httpProxy = getEnvironmentValue(HTTP_PROXY); |
| 76248 | return httpsProxy || allProxy || httpProxy; |
| 76249 | } |
| 76250 | function isBypassed(uri, noProxyList, bypassedMap) { |
| 76251 | if (noProxyList.length === 0) { |
| 76252 | return false; |
| 76253 | } |
| 76254 | const host = new URL(uri).hostname; |
| 76255 | if (bypassedMap === null || bypassedMap === void 0 ? void 0 : bypassedMap.has(host)) { |
| 76256 | return bypassedMap.get(host); |
| 76257 | } |
| 76258 | let isBypassedFlag = false; |
| 76259 | for (const pattern of noProxyList) { |
| 76260 | if (pattern[0] === ".") { |
| 76261 | if (host.endsWith(pattern)) { |
| 76262 | isBypassedFlag = true; |
| 76263 | } else { |
| 76264 | if (host.length === pattern.length - 1 && host === pattern.slice(1)) { |
| 76265 | isBypassedFlag = true; |
| 76266 | } |
| 76267 | } |
| 76268 | } else { |
| 76269 | if (host === pattern) { |
| 76270 | isBypassedFlag = true; |
| 76271 | } |
| 76272 | } |
| 76273 | } |