pac-proxy-agent
Advanced tools
Comparing version
@@ -179,3 +179,12 @@ "use strict"; | ||
// Direct connection to the destination endpoint | ||
socket = secureEndpoint ? tls.connect(opts) : net.connect(opts); | ||
if (secureEndpoint) { | ||
const servername = opts.servername || opts.host; | ||
socket = tls.connect({ | ||
...opts, | ||
servername: (!servername || net.isIP(servername)) ? undefined : servername, | ||
}); | ||
} | ||
else { | ||
socket = net.connect(opts); | ||
} | ||
} | ||
@@ -182,0 +191,0 @@ else if (type === 'SOCKS' || type === 'SOCKS5') { |
@@ -179,3 +179,12 @@ "use strict"; | ||
// Direct connection to the destination endpoint | ||
socket = secureEndpoint ? tls.connect(opts) : net.connect(opts); | ||
if (secureEndpoint) { | ||
const servername = opts.servername || opts.host; | ||
socket = tls.connect({ | ||
...opts, | ||
servername: (!servername || net.isIP(servername)) ? undefined : servername, | ||
}); | ||
} | ||
else { | ||
socket = net.connect(opts); | ||
} | ||
} | ||
@@ -182,0 +191,0 @@ else if (type === 'SOCKS' || type === 'SOCKS5') { |
{ | ||
"name": "pac-proxy-agent", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "A PAC file proxy `http.Agent` implementation for HTTP", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
33097
2.74%546
3.41%