From f9c24a4a840d3b0cf19799af08946b1ec615827e Mon Sep 17 00:00:00 2001 From: Jannis R Date: Fri, 7 Jul 2023 19:33:06 +0200 Subject: [PATCH] https-proxy-agent@7 --- lib/request.js | 8 +++----- package.json | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/request.js b/lib/request.js index b269c73c8..95284457a 100644 --- a/lib/request.js +++ b/lib/request.js @@ -24,11 +24,9 @@ const plainAgent = new HttpsAgent({ let getAgent = () => plainAgent if (proxyAddress) { - // todo: this doesn't honor `keepAlive: true` - // related: - // - https://github.com/TooTallNate/node-https-proxy-agent/pull/112 - // - https://github.com/TooTallNate/node-agent-base/issues/5 - const agent = new ProxyAgent(proxyAddress) + const agent = new ProxyAgent(proxyAddress, { + keepAlive: true, + }) getAgent = () => agent } else if (localAddresses) { const agents = process.env.LOCAL_ADDRESS.split(',') diff --git a/package.json b/package.json index 21bbb1f00..bef96b420 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "cross-fetch": "^3.1.5", "google-polyline": "^1.0.3", "gps-distance": "0.0.4", - "https-proxy-agent": "^5.0.0", + "https-proxy-agent": "^7.0.0", "lodash": "^4.17.5", "luxon": "^3.1.1", "object-scan": "^13.0.0",