1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-08-15 23:40:32 +03:00

Merge pull request #9768 from Vadhvis/master

SSH Lag Fix
This commit is contained in:
Eugene 2024-07-09 11:45:27 +02:00 committed by GitHub
commit 69dd2993af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -1,4 +1,12 @@
import 'ssh2'
const nodeCrypto = require('crypto')
const browserDH = require('diffie-hellman/browser')
nodeCrypto.createDiffieHellmanGroup = browserDH.createDiffieHellmanGroup
nodeCrypto.createDiffieHellman = browserDH.createDiffieHellman
// Declare function missing from @types
declare module 'ssh2' {
interface Client {
setNoDelay: (enable?: boolean) => this
}
}

View File

@ -218,6 +218,8 @@ export class SSHSession {
const resultPromise: Promise<void> = new Promise(async (resolve, reject) => {
ssh.on('ready', () => {
connected = true
// Fix SSH Lagging
ssh.setNoDelay(true)
if (this.savedPassword) {
this.passwordStorage.savePassword(this.profile, this.savedPassword)
}