mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-07 21:10:00 +00:00
add ssh compression option (#10396)
This commit is contained in:
parent
4a5087afc1
commit
020372c902
@ -6,6 +6,7 @@ export const supportedAlgorithms = {
|
||||
[SSHAlgorithmType.HOSTKEY]: russh.getSupportedKeyTypes().filter(x => x !== 'none'),
|
||||
[SSHAlgorithmType.CIPHER]: russh.getSupportedCiphers().filter(x => x !== 'clear'),
|
||||
[SSHAlgorithmType.HMAC]: russh.getSupportedMACs().filter(x => x !== 'none'),
|
||||
[SSHAlgorithmType.COMPRESSION]: russh.getSupportedCompressionAlgorithms().reverse(),
|
||||
}
|
||||
|
||||
export const defaultAlgorithms = {
|
||||
@ -42,4 +43,9 @@ export const defaultAlgorithms = {
|
||||
'hmac-sha1-etm@openssh.com',
|
||||
'hmac-sha1',
|
||||
],
|
||||
[SSHAlgorithmType.COMPRESSION]: [
|
||||
'zlib@openssh.com',
|
||||
'zlib',
|
||||
'none',
|
||||
],
|
||||
}
|
||||
|
@ -5,6 +5,8 @@ export enum SSHAlgorithmType {
|
||||
KEX = 'kex',
|
||||
CIPHER = 'cipher',
|
||||
HOSTKEY = 'serverHostKey',
|
||||
COMPRESSION = 'compression',
|
||||
|
||||
}
|
||||
|
||||
export interface SSHProfile extends ConnectableTerminalProfile {
|
||||
|
@ -286,6 +286,12 @@ ul.nav-tabs(ngbNav, #nav='ngbNav')
|
||||
div(*ngFor='let alg of supportedAlgorithms.serverHostKey')
|
||||
checkbox([text]='alg', [(ngModel)]='algorithms.serverHostKey[alg]')
|
||||
|
||||
.form-line.align-items-start
|
||||
.header
|
||||
.title Compression
|
||||
.w-75
|
||||
div(*ngFor='let alg of supportedAlgorithms.compression')
|
||||
checkbox([text]='alg', [(ngModel)]='algorithms.compression[alg]')
|
||||
li(ngbNavItem)
|
||||
a(ngbNavLink, translate) Colors
|
||||
ng-template(ngbNavContent)
|
||||
|
@ -107,7 +107,7 @@ export class SSHProfileSettingsComponent {
|
||||
this.profile.options.algorithms![k] = Object.entries(this.algorithms[k])
|
||||
.filter(([_, v]) => !!v)
|
||||
.map(([key, _]) => key)
|
||||
this.profile.options.algorithms![k].sort()
|
||||
if(k !== SSHAlgorithmType.COMPRESSION) { this.profile.options.algorithms![k].sort() }
|
||||
}
|
||||
|
||||
if (this.connectionMode !== 'jumpHost') {
|
||||
|
@ -55,7 +55,7 @@ export class SSHProfilesService extends QuickConnectProfileProvider<SSHProfile>
|
||||
super()
|
||||
for (const k of Object.values(SSHAlgorithmType)) {
|
||||
this.configDefaults.options.algorithms[k] = [...defaultAlgorithms[k]]
|
||||
this.configDefaults.options.algorithms[k].sort()
|
||||
if (k !== SSHAlgorithmType.COMPRESSION) { this.configDefaults.options.algorithms[k].sort() }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,6 +315,7 @@ export class SSHSession {
|
||||
kex: this.profile.options.algorithms?.[SSHAlgorithmType.KEX]?.filter(x => supportedAlgorithms[SSHAlgorithmType.KEX].includes(x)),
|
||||
mac: this.profile.options.algorithms?.[SSHAlgorithmType.HMAC]?.filter(x => supportedAlgorithms[SSHAlgorithmType.HMAC].includes(x)),
|
||||
key: this.profile.options.algorithms?.[SSHAlgorithmType.HOSTKEY]?.filter(x => supportedAlgorithms[SSHAlgorithmType.HOSTKEY].includes(x)),
|
||||
compression: this.profile.options.algorithms?.[SSHAlgorithmType.COMPRESSION]?.filter(x => supportedAlgorithms[SSHAlgorithmType.COMPRESSION].includes(x)),
|
||||
},
|
||||
keepaliveIntervalSeconds: Math.round((this.profile.options.keepaliveInterval ?? 15000) / 1000),
|
||||
keepaliveCountMax: this.profile.options.keepaliveCountMax,
|
||||
|
Loading…
x
Reference in New Issue
Block a user