diff --git a/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js b/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js index e3bbfe632c454..978af031baf3a 100644 --- a/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js +++ b/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js @@ -81,7 +81,11 @@ class HttpsProxyAgent extends agent_base_1.Agent { let socket; if (proxy.protocol === 'https:') { debug('Creating `tls.Socket`: %o', this.connectOpts); - socket = tls.connect(this.connectOpts); + const servername = this.connectOpts.servername || this.connectOpts.host; + socket = tls.connect({ + ...this.connectOpts, + servername: servername && net.isIP(servername) ? undefined : servername + }); } else { debug('Creating `net.Socket`: %o', this.connectOpts); diff --git a/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js index a28f1d811805f..d3f506f941306 100644 --- a/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js +++ b/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js @@ -47,7 +47,10 @@ function parseProxyResponse(socket) { read(); return; } - const headerParts = buffered.slice(0, endOfHeaders).toString('ascii').split('\r\n'); + const headerParts = buffered + .slice(0, endOfHeaders) + .toString('ascii') + .split('\r\n'); const firstLine = headerParts.shift(); if (!firstLine) { socket.destroy(); diff --git a/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json b/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json index fc5f988d3b02b..07c04f82a9c3a 100644 --- a/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json +++ b/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json @@ -1,6 +1,6 @@ { "name": "https-proxy-agent", - "version": "7.0.1", + "version": "7.0.2", "description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS", "main": "./dist/index.js", "types": "./dist/index.d.ts", diff --git a/package-lock.json b/package-lock.json index bf787663eadb7..3578fb5d3ef23 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2420,9 +2420,9 @@ } }, "node_modules/@npmcli/agent/node_modules/https-proxy-agent": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.1.tgz", - "integrity": "sha512-Eun8zV0kcYS1g19r78osiQLEFIRspRUDd9tIfBCTBPBeMieF/EsJNL8VI3xOIdYRDEkjQnqOYPsZ2DsWsVsFwQ==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "inBundle": true, "dependencies": { "agent-base": "^7.0.2",