mirror of
https://github.com/github/codeql-action.git
synced 2026-01-03 13:10:06 +08:00
Update checked-in dependencies
This commit is contained in:
21
node_modules/https-proxy-agent/dist/index.js
generated
vendored
21
node_modules/https-proxy-agent/dist/index.js
generated
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user