1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-24 02:53:43 +03:00

Add description to ssh port forwarding

This commit is contained in:
highfredo 2021-11-19 20:17:08 +01:00
parent 700aae3ab0
commit 2922df08f4
4 changed files with 16 additions and 7 deletions

View File

@ -44,6 +44,7 @@ export interface ForwardedPortConfig {
port: number
targetAddress: string
targetPort: number
description: string
}
export const ALGORITHM_BLACKLIST = [

View File

@ -1,15 +1,21 @@
.list-group.mb-3
.list-group-item.d-flex.align-items-center(*ngFor='let fw of model')
strong(*ngIf='fw.type === PortForwardType.Local') Local
strong(*ngIf='fw.type === PortForwardType.Remote') Remote
strong(*ngIf='fw.type === PortForwardType.Dynamic') Dynamic
.ml-3 {{fw.host}}:{{fw.port}}
.ml-2 →
.ml-2(*ngIf='fw.type !== PortForwardType.Dynamic') {{fw.targetAddress}}:{{fw.targetPort}}
.ml-2(*ngIf='fw.type === PortForwardType.Dynamic') SOCKS proxy
div
span {{fw.description}}
.ms-2.d-flex.align-items-center
strong(*ngIf='fw.type === PortForwardType.Local') Local
strong(*ngIf='fw.type === PortForwardType.Remote') Remote
strong(*ngIf='fw.type === PortForwardType.Dynamic') Dynamic
.ml-3 {{fw.host}}:{{fw.port}}
.ml-2 →
.ml-2(*ngIf='fw.type !== PortForwardType.Dynamic') {{fw.targetAddress}}:{{fw.targetPort}}
.ml-2(*ngIf='fw.type === PortForwardType.Dynamic') SOCKS proxy
button.btn.btn-link.hover-reveal.ml-auto((click)='remove(fw)')
i.fas.fa-trash-alt
.input-group.mb-2
input.form-control(type='text', placeholder='Description', [(ngModel)]='newForward.description')
.input-group.mb-2(*ngIf='newForward.type === PortForwardType.Dynamic')
input.form-control(type='text', [(ngModel)]='newForward.host')
.input-group-append

View File

@ -26,6 +26,7 @@ export class SSHPortForwardingConfigComponent {
port: 8000,
targetAddress: '127.0.0.1',
targetPort: 80,
description: '',
}
}

View File

@ -9,6 +9,7 @@ export class ForwardedPort implements ForwardedPortConfig {
port: number
targetAddress: string
targetPort: number
description: string
private listener: Server|null = null