From b78a2abe1e6aefdd497b77626a2bcff997b82bd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E5=A3=B0?= Date: Wed, 30 Oct 2024 09:35:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E5=B1=80=E4=BB=A3=E7=90=86=E6=B1=A0?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8E=92=E9=99=A4=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 使用NO_PROXY环境变量排除全局代理池列表 --- jdCookie.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jdCookie.js b/jdCookie.js index 96e3460..b4d2450 100644 --- a/jdCookie.js +++ b/jdCookie.js @@ -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依赖,才能启用代理!`);