mirror of
https://github.com/Eugeny/tabby.git
synced 2025-03-31 15:50:28 +08:00
commit
69dd2993af
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user