Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Ross <alros@microsoft.com>2021-09-22 14:45:58 +0300
committerGitHub <noreply@github.com>2021-09-22 14:45:58 +0300
commit7f6ab5485bbc008386c4386d08766667e155244e (patch)
tree7b7abd333f4120b602122b239bcdbec0918d3d88
parentd02c71b85859b6427d8556bb7d058e0b07b248d6 (diff)
Fix tunnel remote host (#133584)1.60.2
Fixes microsoft/vscode-remote-release#5613
-rw-r--r--src/vs/platform/remote/node/tunnelService.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vs/platform/remote/node/tunnelService.ts b/src/vs/platform/remote/node/tunnelService.ts
index 11babe41f36..205582c16da 100644
--- a/src/vs/platform/remote/node/tunnelService.ts
+++ b/src/vs/platform/remote/node/tunnelService.ts
@@ -56,7 +56,7 @@ class NodeRemoteTunnel extends Disposable implements RemoteTunnel {
this._server.on('error', this._errorListener);
this.tunnelRemotePort = tunnelRemotePort;
- this.tunnelRemoteHost = (isLocalhost(tunnelRemoteHost) || isAllInterfaces(tunnelRemoteHost)) ? 'localhost' : tunnelRemoteHost;
+ this.tunnelRemoteHost = tunnelRemoteHost;
}
public override async dispose(): Promise<void> {
@@ -98,7 +98,8 @@ class NodeRemoteTunnel extends Disposable implements RemoteTunnel {
// pause reading on the socket until we have a chance to forward its data
localSocket.pause();
- const protocol = await connectRemoteAgentTunnel(this._options, this.tunnelRemoteHost, this.tunnelRemotePort);
+ const tunnelRemoteHost = (isLocalhost(this.tunnelRemoteHost) || isAllInterfaces(this.tunnelRemoteHost)) ? 'localhost' : this.tunnelRemoteHost;
+ const protocol = await connectRemoteAgentTunnel(this._options, tunnelRemoteHost, this.tunnelRemotePort);
const remoteSocket = (<NodeSocket>protocol.getSocket()).socket;
const dataChunk = protocol.readEntireBuffer();
protocol.dispose();