Content-Length: 437621 | pFad | https://github.com/npm/cli/commit/3b2951a3ba1521b9866d9b33960aa3307d4f31dd

E3 deps: https-proxy-agent@7.0.6 · npm/cli@3b2951a · GitHub
Skip to content

Commit 3b2951a

Browse files
committed
deps: https-proxy-agent@7.0.6
1 parent a598b7b commit 3b2951a

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

node_modules/https-proxy-agent/dist/index.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ const agent_base_1 = require("agent-base");
3535
const url_1 = require("url");
3636
const parse_proxy_response_1 = require("./parse-proxy-response");
3737
const debug = (0, debug_1.default)('https-proxy-agent');
38+
const setServernameFromNonIpHost = (options) => {
39+
if (options.servername === undefined &&
40+
options.host &&
41+
!net.isIP(options.host)) {
42+
return {
43+
...options,
44+
servername: options.host,
45+
};
46+
}
47+
return options;
48+
};
3849
/**
3950
* The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
4051
* the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
@@ -82,11 +93,7 @@ class HttpsProxyAgent extends agent_base_1.Agent {
8293
let socket;
8394
if (proxy.protocol === 'https:') {
8495
debug('Creating `tls.Socket`: %o', this.connectOpts);
85-
const servername = this.connectOpts.servername || this.connectOpts.host;
86-
socket = tls.connect({
87-
...this.connectOpts,
88-
servername,
89-
});
96+
socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));
9097
}
9198
else {
9299
debug('Creating `net.Socket`: %o', this.connectOpts);
@@ -122,11 +129,9 @@ class HttpsProxyAgent extends agent_base_1.Agent {
122129
// The proxy is connecting to a TLS server, so upgrade
123130
// this socket connection to a TLS connection.
124131
debug('Upgrading socket connection to TLS');
125-
const servername = opts.servername || opts.host;
126132
return tls.connect({
127-
...omit(opts, 'host', 'path', 'port'),
133+
...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'),
128134
socket,
129-
servername,
130135
});
131136
}
132137
return socket;

node_modules/https-proxy-agent/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "https-proxy-agent",
3-
"version": "7.0.5",
3+
"version": "7.0.6",
44
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
55
"main": "./dist/index.js",
66
"types": "./dist/index.d.ts",
@@ -21,7 +21,7 @@
2121
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
2222
"license": "MIT",
2323
"dependencies": {
24-
"agent-base": "^7.0.2",
24+
"agent-base": "^7.1.2",
2525
"debug": "4"
2626
},
2727
"devDependencies": {

package-lock.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9095,13 +9095,13 @@
90959095
}
90969096
},
90979097
"node_modules/https-proxy-agent": {
9098-
"version": "7.0.5",
9099-
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz",
9100-
"integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==",
9098+
"version": "7.0.6",
9099+
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
9100+
"integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
91019101
"inBundle": true,
91029102
"license": "MIT",
91039103
"dependencies": {
9104-
"agent-base": "^7.0.2",
9104+
"agent-base": "^7.1.2",
91059105
"debug": "4"
91069106
},
91079107
"engines": {

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/npm/cli/commit/3b2951a3ba1521b9866d9b33960aa3307d4f31dd

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy