Skip to content

Commit 7f6ab54

Browse files
authored
Fix tunnel remote host (#133584)
Fixes microsoft/vscode-remote-release#5613
1 parent d02c71b commit 7f6ab54

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/vs/platform/remote/node/tunnelService.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class NodeRemoteTunnel extends Disposable implements RemoteTunnel {
5656
this._server.on('error', this._errorListener);
5757

5858
this.tunnelRemotePort = tunnelRemotePort;
59-
this.tunnelRemoteHost = (isLocalhost(tunnelRemoteHost) || isAllInterfaces(tunnelRemoteHost)) ? 'localhost' : tunnelRemoteHost;
59+
this.tunnelRemoteHost = tunnelRemoteHost;
6060
}
6161

6262
public override async dispose(): Promise<void> {
@@ -98,7 +98,8 @@ class NodeRemoteTunnel extends Disposable implements RemoteTunnel {
9898
// pause reading on the socket until we have a chance to forward its data
9999
localSocket.pause();
100100

101-
const protocol = await connectRemoteAgentTunnel(this._options, this.tunnelRemoteHost, this.tunnelRemotePort);
101+
const tunnelRemoteHost = (isLocalhost(this.tunnelRemoteHost) || isAllInterfaces(this.tunnelRemoteHost)) ? 'localhost' : this.tunnelRemoteHost;
102+
const protocol = await connectRemoteAgentTunnel(this._options, tunnelRemoteHost, this.tunnelRemotePort);
102103
const remoteSocket = (<NodeSocket>protocol.getSocket()).socket;
103104
const dataChunk = protocol.readEntireBuffer();
104105
protocol.dispose();

0 commit comments

Comments
 (0)