mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
testResolver: fix for tunnel server
This commit is contained in:
parent
b6f19ccf3f
commit
67bf6577b4
|
@ -352,8 +352,9 @@ function tunnelFactory(tunnelOptions: vscode.TunnelOptions): Promise<vscode.Tunn
|
||||||
remoteSocket.pipe(proxySocket);
|
remoteSocket.pipe(proxySocket);
|
||||||
proxySocket.pipe(remoteSocket);
|
proxySocket.pipe(remoteSocket);
|
||||||
});
|
});
|
||||||
proxyServer.listen(tunnelOptions.localAddressPort === undefined ? 0 : tunnelOptions.localAddressPort + 1, () => {
|
proxyServer.listen(tunnelOptions.localAddressPort === undefined ? 0 : tunnelOptions.localAddressPort, () => {
|
||||||
const localPort = (<net.AddressInfo>proxyServer.address()).port;
|
const localPort = (<net.AddressInfo>proxyServer.address()).port;
|
||||||
|
console.log(`New tunnel server: Remote ${tunnelOptions.remoteAddress.port} -> local ${localPort}`);
|
||||||
const tunnel = newTunnel({ host: 'localhost', port: localPort });
|
const tunnel = newTunnel({ host: 'localhost', port: localPort });
|
||||||
res(tunnel);
|
res(tunnel);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue