Skip to content

Commit

Permalink
deps: https-proxy-agent@7.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
wraithgar committed Dec 12, 2024
1 parent a598b7b commit 3b2951a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 14 deletions.
21 changes: 13 additions & 8 deletions node_modules/https-proxy-agent/dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ const agent_base_1 = require("agent-base");
const url_1 = require("url");
const parse_proxy_response_1 = require("./parse-proxy-response");
const debug = (0, debug_1.default)('https-proxy-agent');
const setServernameFromNonIpHost = (options) => {
if (options.servername === undefined &&
options.host &&
!net.isIP(options.host)) {
return {
...options,
servername: options.host,
};
}
return options;
};
/**
* The `HttpsProxyAgent` implements an HTTP Agent subclass that connects to
* the specified "HTTP(s) proxy server" in order to proxy HTTPS requests.
Expand Down Expand Up @@ -82,11 +93,7 @@ class HttpsProxyAgent extends agent_base_1.Agent {
let socket;
if (proxy.protocol === 'https:') {
debug('Creating `tls.Socket`: %o', this.connectOpts);
const servername = this.connectOpts.servername || this.connectOpts.host;
socket = tls.connect({
...this.connectOpts,
servername,
});
socket = tls.connect(setServernameFromNonIpHost(this.connectOpts));
}
else {
debug('Creating `net.Socket`: %o', this.connectOpts);
Expand Down Expand Up @@ -122,11 +129,9 @@ class HttpsProxyAgent extends agent_base_1.Agent {
// The proxy is connecting to a TLS server, so upgrade
// this socket connection to a TLS connection.
debug('Upgrading socket connection to TLS');
const servername = opts.servername || opts.host;
return tls.connect({
...omit(opts, 'host', 'path', 'port'),
...omit(setServernameFromNonIpHost(opts), 'host', 'path', 'port'),
socket,
servername,
});
}
return socket;
Expand Down
4 changes: 2 additions & 2 deletions node_modules/https-proxy-agent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "https-proxy-agent",
"version": "7.0.5",
"version": "7.0.6",
"description": "An HTTP(s) proxy `http.Agent` implementation for HTTPS",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand All @@ -21,7 +21,7 @@
"author": "Nathan Rajlich <nathan@tootallnate.net> (http://n8.io/)",
"license": "MIT",
"dependencies": {
"agent-base": "^7.0.2",
"agent-base": "^7.1.2",
"debug": "4"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -9095,13 +9095,13 @@
}
},
"node_modules/https-proxy-agent": {
"version": "7.0.5",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz",
"integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==",
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
"integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
"inBundle": true,
"license": "MIT",
"dependencies": {
"agent-base": "^7.0.2",
"agent-base": "^7.1.2",
"debug": "4"
},
"engines": {
Expand Down

0 comments on commit 3b2951a

Please sign in to comment.