File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -189,12 +189,16 @@ export function getProxiedConnection(
189
189
if ( parsedTarget === null ) {
190
190
return Promise . resolve < ProxyConnectionResult > ( { } ) ;
191
191
}
192
+ const targetHostPost = splitHostPort ( parsedTarget . path ) ;
193
+ if ( targetHostPost === null ) {
194
+ return Promise . resolve < ProxyConnectionResult > ( { } ) ;
195
+ }
192
196
const options : http . RequestOptions = {
193
197
method : 'CONNECT' ,
194
- path : parsedTarget . path ,
198
+ path : targetHostPost . host + ':' + ( targetHostPost . port != null ? targetHostPost . port : '443' ) ,
195
199
} ;
196
200
const headers : http . OutgoingHttpHeaders = {
197
- Host : parsedTarget . path ,
201
+ Host : targetHostPost . host + ':' + ( targetHostPost . port != null ? targetHostPost . port : '443' ) ,
198
202
} ;
199
203
// Connect to the subchannel address as a proxy
200
204
if ( isTcpSubchannelAddress ( address ) ) {
You can’t perform that action at this time.
0 commit comments