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 1/3] =?UTF-8?q?=E5=85=A8=E5=B1=80=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E6=B1=A0=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依赖,才能启用代理!`); From 9b4ef9d439285bfb69ebce2cd7423a6cdddff8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E5=A3=B0?= Date: Fri, 1 Nov 2024 08:22:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A4=9A=E4=B8=AA=E5=A4=A7=E6=8B=AC?= =?UTF-8?q?=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jdCookie.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jdCookie.js b/jdCookie.js index b4d2450..33857db 100644 --- a/jdCookie.js +++ b/jdCookie.js @@ -80,7 +80,7 @@ if (process.env.DP_POOL) { 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依赖,才能启用代理!`); From 34184d4e818eee22f31752b82d360fc3cf80aff7 Mon Sep 17 00:00:00 2001 From: 6dylan6 <86815944+6dylan6@users.noreply.github.com> Date: Mon, 4 Nov 2024 23:39:10 +0800 Subject: [PATCH 3/3] Update jdCookie.js --- jdCookie.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/jdCookie.js b/jdCookie.js index 33857db..cbebeea 100644 --- a/jdCookie.js +++ b/jdCookie.js @@ -78,9 +78,7 @@ 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; - } + global.GLOBAL_AGENT.NO_PROXY = '127.0.0.1,localhost'; console.log(`\n---------------使用代理池模式---------------\n`); } catch { throw new Error(`请安装global-agent依赖,才能启用代理!`);