implement global keep alive option
keepaliveInterval in config.json. time in ms, 0=disable
This commit is contained in:
parent
c6f6daeaf6
commit
2d725e9fe0
3 changed files with 5 additions and 2 deletions
3
app.js
3
app.js
|
@ -54,7 +54,8 @@ app.get('/ssh/host/:host?', function (req, res, next) {
|
|||
},
|
||||
readyTimeout: (validator.isInt(req.query.readyTimeout + '', {min: 1, max: 300000}) &&
|
||||
req.query.readyTimeout) || config.ssh.readyTimeout,
|
||||
verify: config.verify || false
|
||||
verify: config.verify || false,
|
||||
keepaliveInterval: config.keepaliveInterval || 0
|
||||
}
|
||||
if (req.session.ssh.header.name) validator.escape(req.session.ssh.header.name)
|
||||
if (req.session.ssh.header.background) validator.escape(req.session.ssh.header.background)
|
||||
|
|
|
@ -59,5 +59,6 @@
|
|||
"server": false // not yet implemented
|
||||
},
|
||||
"accesslog": false, // http style access logging to console.log
|
||||
"verify": false // verification of host key hashes, see hostkeyhashes.json
|
||||
"verify": false, // verification of host key hashes, see hostkeyhashes.json
|
||||
"keepaliveInterval": 0 // value in milliseconds, 0 = disable
|
||||
}
|
||||
|
|
|
@ -130,6 +130,7 @@ module.exports = function socket (socket) {
|
|||
return (noverify = true)
|
||||
}
|
||||
},
|
||||
keepaliveInterval: socket.request.session.ssh.keepaliveInterval,
|
||||
debug: debug('ssh2')
|
||||
})
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue