mirror of
https://github.com/Eugeny/tabby
synced 2025-03-04 23:27:19 +00:00
SSH Lag Fix
This commit is contained in:
parent
223d8549ad
commit
fa9ee756d2
2 changed files with 10 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue