Pass the desired remote host in ITunnelConnectionStartParams
This commit is contained in:
parent
c8209aff4c
commit
be7046f091
2 changed files with 4 additions and 3 deletions
|
@ -354,6 +354,7 @@ async function doConnectRemoteAgentExtensionHost(options: ISimpleConnectionOptio
|
|||
}
|
||||
|
||||
export interface ITunnelConnectionStartParams {
|
||||
host: string;
|
||||
port: number;
|
||||
}
|
||||
|
||||
|
@ -427,9 +428,9 @@ export async function connectRemoteAgentExtensionHost(options: IConnectionOption
|
|||
}
|
||||
}
|
||||
|
||||
export async function connectRemoteAgentTunnel(options: IConnectionOptions, tunnelRemotePort: number): Promise<PersistentProtocol> {
|
||||
export async function connectRemoteAgentTunnel(options: IConnectionOptions, tunnelRemoteHost: string, tunnelRemotePort: number): Promise<PersistentProtocol> {
|
||||
const simpleOptions = await resolveConnectionOptions(options, generateUuid(), null);
|
||||
const protocol = await doConnectRemoteAgentTunnel(simpleOptions, { port: tunnelRemotePort }, CancellationToken.None);
|
||||
const protocol = await doConnectRemoteAgentTunnel(simpleOptions, { host: tunnelRemoteHost, port: tunnelRemotePort }, CancellationToken.None);
|
||||
return protocol;
|
||||
}
|
||||
|
||||
|
|
|
@ -98,7 +98,7 @@ 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.tunnelRemotePort);
|
||||
const protocol = await connectRemoteAgentTunnel(this._options, this.tunnelRemoteHost, this.tunnelRemotePort);
|
||||
const remoteSocket = (<NodeSocket>protocol.getSocket()).socket;
|
||||
const dataChunk = protocol.readEntireBuffer();
|
||||
protocol.dispose();
|
||||
|
|
Loading…
Reference in a new issue