Enable more than just localhost for port forwarding providers

Part of #81388
This commit is contained in:
Alex Ross
2019-12-18 10:14:36 +01:00
parent c7ab68cc80
commit 8e2b3047eb
11 changed files with 187 additions and 133 deletions

View File

@@ -22,15 +22,15 @@ export class MainThreadTunnelService implements MainThreadTunnelServiceShape {
}
async $openTunnel(tunnelOptions: TunnelOptions): Promise<TunnelDto | undefined> {
const tunnel = await this.remoteExplorerService.forward(tunnelOptions.remote.port, tunnelOptions.localPort, tunnelOptions.name);
const tunnel = await this.remoteExplorerService.forward(tunnelOptions.remote, tunnelOptions.localPort, tunnelOptions.name);
if (tunnel) {
return TunnelDto.fromServiceTunnel(tunnel);
}
return undefined;
}
async $closeTunnel(remotePort: number): Promise<void> {
return this.remoteExplorerService.close(remotePort);
async $closeTunnel(remote: { host: string, port: number }): Promise<void> {
return this.remoteExplorerService.close(remote);
}
async $registerCandidateFinder(): Promise<void> {