1
0
mirror of https://github.com/6dylan6/jdpro.git synced 2025-07-16 01:23:08 +08:00

全局代理池增加排除列表

使用NO_PROXY环境变量排除全局代理池列表
This commit is contained in:
云声
2024-10-30 09:35:57 +08:00
committed by GitHub
parent cb13a21ef9
commit b78a2abe1e

View File

@ -78,6 +78,9 @@ if (process.env.DP_POOL) {
try {
require("global-agent/bootstrap");
global.GLOBAL_AGENT.HTTP_PROXY = process.env.DP_POOL;
if (process.env.NO_PROXY) {
global.GLOBAL_AGENT.NO_PROXY = process.env.NO_PROXY;
}}
console.log(`\n---------------使用代理池模式---------------\n`);
} catch {
throw new Error(`请安装global-agent依赖才能启用代理`);