Skip to content

Commit 2b8f43b

Browse files
yuecchenTooTallNate
authored andcommitted
support SNI
Fixes TooTallNate#14. Closes TooTallNate#15.
1 parent 6c50a9a commit 2b8f43b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ HttpsProxyAgent.prototype.callback = function connect (req, opts, fn) {
135135
// to upgrade this socket connection to an SSL connection
136136
debug('upgrading proxy-connected socket to TLS connection: %o', opts.host);
137137
opts.socket = socket;
138-
opts.servername = opts.host;
138+
opts.servername = opts.servername?opts.servername:opts.host;
139139
opts.host = null;
140140
opts.hostname = null;
141141
opts.port = null;

0 commit comments

Comments
 (0)