Skip to content

Commit b49baa2

Browse files
committed
upgrade https-proxy-agent
1 parent 1c4b902 commit b49baa2

4 files changed

Lines changed: 38 additions & 11 deletions

File tree

lib/install.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ function place_binary(uri, targetDir, opts, callback) {
5555
process.env.npm_config_proxy;
5656
let agent;
5757
if (proxyUrl) {
58-
const ProxyAgent = require('https-proxy-agent');
59-
agent = new ProxyAgent(proxyUrl);
58+
const { HttpsProxyAgent } = require('https-proxy-agent');
59+
agent = new HttpsProxyAgent(proxyUrl);
6060
log.http('download', 'proxy agent configured using: "%s"', proxyUrl);
6161
}
6262

package-lock.json

Lines changed: 33 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"dependencies": {
2626
"detect-libc": "^2.0.0",
27-
"https-proxy-agent": "^5.0.0",
27+
"https-proxy-agent": "^7.0.5",
2828
"node-fetch": "^2.6.7",
2929
"nopt": "^7.2.1",
3030
"npmlog": "^7.0.1",

test/proxy-bcrypt.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const { createUnzip } = require('zlib');
66
const os = require('os');
77

88
const tar = require('tar-fs');
9-
const Agent = require('https-proxy-agent');
9+
const { HttpsProxyAgent } = require('https-proxy-agent');
1010
const fetch = require('node-fetch');
1111
const { rimraf } = require('rimraf');
1212

@@ -44,7 +44,7 @@ test('setup proxy server', (t) => {
4444
proxy.startServer({ port: proxyPort });
4545
process.env.https_proxy = process.env.http_proxy = proxyServer;
4646

47-
options.agent = new Agent(proxyServer);
47+
options.agent = new HttpsProxyAgent(proxyServer);
4848

4949
// make sure the download directory deleted then create an empty one
5050
rimraf(downloadDir).then(() => {

0 commit comments

Comments
 (0)