mirror of
https://github.com/Eugeny/tabby.git
synced 2024-09-11 13:13:59 +03:00
SSH Lag Fix
This commit is contained in:
parent
223d8549ad
commit
fa9ee756d2
@ -1,4 +1,12 @@
|
|||||||
|
import 'ssh2';
|
||||||
const nodeCrypto = require('crypto')
|
const nodeCrypto = require('crypto')
|
||||||
const browserDH = require('diffie-hellman/browser')
|
const browserDH = require('diffie-hellman/browser')
|
||||||
nodeCrypto.createDiffieHellmanGroup = browserDH.createDiffieHellmanGroup
|
nodeCrypto.createDiffieHellmanGroup = browserDH.createDiffieHellmanGroup
|
||||||
nodeCrypto.createDiffieHellman = browserDH.createDiffieHellman
|
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) => {
|
const resultPromise: Promise<void> = new Promise(async (resolve, reject) => {
|
||||||
ssh.on('ready', () => {
|
ssh.on('ready', () => {
|
||||||
connected = true
|
connected = true
|
||||||
|
// Fix SSH Lagging
|
||||||
|
ssh.setNoDelay(true);
|
||||||
if (this.savedPassword) {
|
if (this.savedPassword) {
|
||||||
this.passwordStorage.savePassword(this.profile, this.savedPassword)
|
this.passwordStorage.savePassword(this.profile, this.savedPassword)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user