Fix tunnel remote host (#133584) · microsoft/vscode@7f6ab54 (original) (raw)
File tree
1 file changed
lines changed
- src/vs/platform/remote/node
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -56,7 +56,7 @@ class NodeRemoteTunnel extends Disposable implements RemoteTunnel { | ||
56 | 56 | this._server.on('error', this._errorListener); |
57 | 57 | |
58 | 58 | this.tunnelRemotePort = tunnelRemotePort; |
59 | -this.tunnelRemoteHost = (isLocalhost(tunnelRemoteHost) | | |
59 | +this.tunnelRemoteHost = tunnelRemoteHost; | |
60 | 60 | } |
61 | 61 | |
62 | 62 | public override async dispose(): Promise<void> { |
@@ -98,7 +98,8 @@ class NodeRemoteTunnel extends Disposable implements RemoteTunnel { | ||
98 | 98 | // pause reading on the socket until we have a chance to forward its data |
99 | 99 | localSocket.pause(); |
100 | 100 | |
101 | -const protocol = await connectRemoteAgentTunnel(this._options, this.tunnelRemoteHost, this.tunnelRemotePort); | |
101 | +const tunnelRemoteHost = (isLocalhost(this.tunnelRemoteHost) | | |
102 | +const protocol = await connectRemoteAgentTunnel(this._options, tunnelRemoteHost, this.tunnelRemotePort); | |
102 | 103 | const remoteSocket = (<NodeSocket>protocol.getSocket()).socket; |
103 | 104 | const dataChunk = protocol.readEntireBuffer(); |
104 | 105 | protocol.dispose(); |