File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
packages/https-proxy-agent/src Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " https-proxy-agent " : patch
3+ ---
4+
5+ Support SNI for proxy servers
Original file line number Diff line number Diff line change @@ -91,7 +91,11 @@ export class HttpsProxyAgent<Uri extends string> extends Agent {
9191 let socket : net . Socket ;
9292 if ( proxy . protocol === 'https:' ) {
9393 debug ( 'Creating `tls.Socket`: %o' , this . connectOpts ) ;
94- socket = tls . connect ( this . connectOpts ) ;
94+ const servername = this . connectOpts . servername || this . connectOpts . host ;
95+ socket = tls . connect ( {
96+ ...this . connectOpts ,
97+ servername : servername && net . isIP ( servername ) ? undefined : servername
98+ } ) ;
9599 } else {
96100 debug ( 'Creating `net.Socket`: %o' , this . connectOpts ) ;
97101 socket = net . connect ( this . connectOpts ) ;
You can’t perform that action at this time.
0 commit comments