Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to support SNI #14

Closed
xiaoshimimi opened this issue Jun 24, 2016 · 0 comments
Closed

Need to support SNI #14

xiaoshimimi opened this issue Jun 24, 2016 · 0 comments

Comments

@xiaoshimimi
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant