Implement SSH port forwarding and improve jump host UI
Port Forwarding (new): - Add PortForward model with local/remote direction, bind/dest addresses - Implement ForwardManager in sshclient/portforward.go with full bidirectional tunnel support for both local and remote forwarding - Integrate ForwardManager into SSH client lifecycle (auto-start on connect, clean shutdown on close) - Add session manager methods: ListPortForwards, StartPortForward, StopPortForward with event emission - Add API surface: ListPortForwards, StartPortForward, StopPortForward - Add validation for port-forward rules in ValidateSSHConfig - Add port forwarding section to profile editor with direction, bind/dest host/port, label, and enable toggle - Add frontend event handling for forward:started/stopped/error - Style port-forward rows with charcoal card design matching jump hosts Jump Host UI improvements: - Add private key path field to jump host editor rows - Collect privateKeyPath in form value collection - Restyle jump host rows as two-line cards with clear field grouping
This commit is contained in:
Vendored
+6
@@ -47,6 +47,8 @@ export function ListFavourites():Promise<Array<models.Profile>>;
|
||||
|
||||
export function ListKnownHosts():Promise<Array<models.KnownHost>>;
|
||||
|
||||
export function ListPortForwards(arg1:string):Promise<Array<models.PortForward>>;
|
||||
|
||||
export function ListProfiles():Promise<Array<models.Profile>>;
|
||||
|
||||
export function ListProfilesByFolder(arg1:string):Promise<Array<models.Profile>>;
|
||||
@@ -91,6 +93,10 @@ export function SetFavourite(arg1:string,arg2:boolean):Promise<void>;
|
||||
|
||||
export function SetProfileSecret(arg1:string,arg2:string,arg3:string):Promise<void>;
|
||||
|
||||
export function StartPortForward(arg1:string,arg2:models.PortForward):Promise<void>;
|
||||
|
||||
export function StopPortForward(arg1:string,arg2:string):Promise<void>;
|
||||
|
||||
export function TestConnection(arg1:string,arg2:number):Promise<Record<string, any>>;
|
||||
|
||||
export function UnlockSecretStore(arg1:string):Promise<void>;
|
||||
|
||||
@@ -90,6 +90,10 @@ export function ListKnownHosts() {
|
||||
return window['go']['api']['Service']['ListKnownHosts']();
|
||||
}
|
||||
|
||||
export function ListPortForwards(arg1) {
|
||||
return window['go']['api']['Service']['ListPortForwards'](arg1);
|
||||
}
|
||||
|
||||
export function ListProfiles() {
|
||||
return window['go']['api']['Service']['ListProfiles']();
|
||||
}
|
||||
@@ -178,6 +182,14 @@ export function SetProfileSecret(arg1, arg2, arg3) {
|
||||
return window['go']['api']['Service']['SetProfileSecret'](arg1, arg2, arg3);
|
||||
}
|
||||
|
||||
export function StartPortForward(arg1, arg2) {
|
||||
return window['go']['api']['Service']['StartPortForward'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function StopPortForward(arg1, arg2) {
|
||||
return window['go']['api']['Service']['StopPortForward'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function TestConnection(arg1, arg2) {
|
||||
return window['go']['api']['Service']['TestConnection'](arg1, arg2);
|
||||
}
|
||||
|
||||
@@ -209,6 +209,32 @@ export namespace models {
|
||||
this.format = source["format"];
|
||||
}
|
||||
}
|
||||
export class PortForward {
|
||||
id: string;
|
||||
direction: string;
|
||||
bindHost: string;
|
||||
bindPort: number;
|
||||
destHost: string;
|
||||
destPort: number;
|
||||
enabled: boolean;
|
||||
label: string;
|
||||
|
||||
static createFrom(source: any = {}) {
|
||||
return new PortForward(source);
|
||||
}
|
||||
|
||||
constructor(source: any = {}) {
|
||||
if ('string' === typeof source) source = JSON.parse(source);
|
||||
this.id = source["id"];
|
||||
this.direction = source["direction"];
|
||||
this.bindHost = source["bindHost"];
|
||||
this.bindPort = source["bindPort"];
|
||||
this.destHost = source["destHost"];
|
||||
this.destPort = source["destPort"];
|
||||
this.enabled = source["enabled"];
|
||||
this.label = source["label"];
|
||||
}
|
||||
}
|
||||
export class RAWConfig {
|
||||
autoReconnect: boolean;
|
||||
lineEnding: string;
|
||||
@@ -282,6 +308,7 @@ export namespace models {
|
||||
keepaliveCountMax: number;
|
||||
compression: boolean;
|
||||
jumpHosts: JumpHost[];
|
||||
portForwards: PortForward[];
|
||||
startupCommand: string;
|
||||
envVars: Record<string, string>;
|
||||
|
||||
@@ -301,6 +328,7 @@ export namespace models {
|
||||
this.keepaliveCountMax = source["keepaliveCountMax"];
|
||||
this.compression = source["compression"];
|
||||
this.jumpHosts = this.convertValues(source["jumpHosts"], JumpHost);
|
||||
this.portForwards = this.convertValues(source["portForwards"], PortForward);
|
||||
this.startupCommand = source["startupCommand"];
|
||||
this.envVars = source["envVars"];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user