While I'm using https-proxy-agent to send request, if the request option set servername (which might not the same as host) https-proxy-agent will ignore my servername, this will cause the certificate error.
if (opts.secureEndpoint) {
// since the proxy is connecting to an SSL server, we have
// to upgrade this socket connection to an SSL connection
debug('upgrading proxy-connected socket to TLS connection: %o', opts.host);
opts.socket = socket;
**opts.servername = opts.host;**
opts.host = null;
opts.hostname = null;
opts.port = null;
sock = tls.connect(opts);
}
Could you please change this part to:
opts.servername = opts.servername?opts.servername:opts.host;
so that it can support SNI?
While I'm using https-proxy-agent to send request, if the request option set servername (which might not the same as host) https-proxy-agent will ignore my servername, this will cause the certificate error.
Could you please change this part to:
opts.servername = opts.servername?opts.servername:opts.host;so that it can support SNI?