Update checked-in dependencies

This commit is contained in:
github-actions[bot]
2025-04-02 12:43:14 +00:00
parent 4b72bef651
commit dbb232a3d8
1389 changed files with 209949 additions and 542 deletions

View File

@@ -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.
@@ -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);
@@ -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;