adding readyTimeout option, updating packages

adding readyTimeout option, updating packages
This commit is contained in:
billchurch 2017-08-21 09:21:52 -04:00
parent 458747d64e
commit d849f7432e
15 changed files with 1477 additions and 1123 deletions

View file

@ -1,12 +1,27 @@
# Change Log # Change Log
## [0.1.2] 2017-07-31 ## [0.1.2] 2017-07-31
### Added
- ssh.readyTimeout option in config.json (time in ms, default 20000, 20sec)
### Changed ### Changed
- Updated xterm.js to 2.8.1 from 2.6.0 - Updated xterm.js to 2.9.2 from 2.6.0
- See https://github.com/sourcelair/xterm.js/releases/tag/2.9.2
- See https://github.com/sourcelair/xterm.js/releases/tag/2.9.1
- See https://github.com/sourcelair/xterm.js/releases/tag/2.9.0
- See https://github.com/sourcelair/xterm.js/releases/tag/2.8.1 - See https://github.com/sourcelair/xterm.js/releases/tag/2.8.1
- See https://github.com/sourcelair/xterm.js/releases/tag/2.8.0 - See https://github.com/sourcelair/xterm.js/releases/tag/2.8.0
- See https://github.com/sourcelair/xterm.js/releases/tag/2.7.0 - See https://github.com/sourcelair/xterm.js/releases/tag/2.7.0
- Updated ssh2 to 0.5.5 to keep current, no fixes impacting WebSSH2 - Updated ssh2 to 0.5.5 to keep current, no fixes impacting WebSSH2
- ssh-streams to 0.1.19 from 0.1.16 - ssh-streams to 0.1.19 from 0.1.16
- Updated validator.js to 8.0.0, no fixes impacting WebSSH2
- https://github.com/chriso/validator.js/releases/tag/8.0.0
- Updated Express to 4.15.4, no fixes impacting WebSSH2
- https://github.com/expressjs/express/releases/tag/4.15.4
- Updated Express-session to 1.15.5, no fixes impacting WebSSH2
- https://github.com/expressjs/session/releases/tag/v1.15.5
- Updated Debug to 3.0.0, no fixes impacting WebSSH2
- https://github.com/visionmedia/debug/releases/tag/3.0.0
- Running in strict mode ('use strict';)
## [0.1.1] 2017-06-03 ## [0.1.1] 2017-06-03
### Added ### Added

View file

@ -31,6 +31,8 @@ You will be prompted for credentials to use on the SSH server via HTTP Basic aut
* **headerBackground=** - _string_ - optional background color of header to display on page * **headerBackground=** - _string_ - optional background color of header to display on page
* **readyTimeout=** - _integer_ - How long (in milliseconds) to wait for the SSH handshake to complete. **Default:** 20000. **Enforced Values:** Min: 1, Max: 300000
## Headers ## Headers
* **allowreplay** - _boolean_ - Allow use of password replay feature, example `allowreplay: true` * **allowreplay** - _boolean_ - Allow use of password replay feature, example `allowreplay: true`
@ -52,6 +54,8 @@ You will be prompted for credentials to use on the SSH server via HTTP Basic aut
* **ssh.term** - _string_ - Specify terminal emulation to use, defaults to `xterm-color` * **ssh.term** - _string_ - Specify terminal emulation to use, defaults to `xterm-color`
* **ssh.readyTimeout - _integer_ - How long (in milliseconds) to wait for the SSH handshake to complete. **Default:** 20000.
* **useminified** - _boolean_ - Choose between ./public/client-full.htm (false/non-minified) or ./public/client-min.htm (true/minified js), defaults to false (non-minified version) * **useminified** - _boolean_ - Choose between ./public/client-full.htm (false/non-minified) or ./public/client-min.htm (true/minified js), defaults to false (non-minified version)
* **header.text** - _string_ - Specify header text, defaults to `My Header` but may also be set to `null`. When set to `null` no header bar will be displayed on the client. * **header.text** - _string_ - Specify header text, defaults to `My Header` but may also be set to `null`. When set to `null` no header bar will be displayed on the client.

4
app.js
View file

@ -50,7 +50,9 @@ app.get('/ssh/host/:host?', function (req, res, next) {
serverlog: { serverlog: {
client: config.serverlog.client || false, client: config.serverlog.client || false,
server: config.serverlog.server || false server: config.serverlog.server || false
} },
readyTimeout: (validator.isInt(req.query.readyTimeout + '', {min: 1, max: 300000}) &&
req.query.readyTimeout) || config.ssh.readyTimeout
} }
req.session.ssh.header.name && validator.escape(req.session.ssh.header.name) req.session.ssh.header.name && validator.escape(req.session.ssh.header.name)
req.session.ssh.header.background && req.session.ssh.header.background &&

View file

@ -10,7 +10,8 @@
"ssh": { "ssh": {
"host": null, "host": null,
"port": 22, "port": 22,
"term": "xterm-color" "term": "xterm-color",
"readyTimeout": 20000
}, },
"useminified": false, "useminified": false,
"header": { "header": {

View file

@ -4,6 +4,7 @@
* Bill Church - https://github.com/billchurch/WebSSH2 - May 2017 * Bill Church - https://github.com/billchurch/WebSSH2 - May 2017
* *
*/ */
'use strict'
var config = require('./app').config var config = require('./app').config
var server = require('./app').server var server = require('./app').server

View file

@ -29,14 +29,14 @@
"dependencies": { "dependencies": {
"basic-auth": "^1.1.0", "basic-auth": "^1.1.0",
"colors": "^1.1.2", "colors": "^1.1.2",
"debug": "^2.6.8", "debug": "^3.0.0",
"express": "^4.15.3", "express": "^4.15.4",
"express-session": "^1.15.3", "express-session": "^1.15.5",
"morgan": "^1.8.2", "morgan": "^1.8.2",
"read-config": "^1.6.0", "read-config": "^1.6.0",
"socket.io": "^1.7.4", "socket.io": "^1.7.4",
"ssh2": "^0.5.5", "ssh2": "^0.5.5",
"validator": "^7.0.0" "validator": "^8.0.0"
}, },
"scripts": { "scripts": {
"start": "node index", "start": "node index",
@ -54,9 +54,9 @@
"grunt-contrib-uglify": "^3.0.1", "grunt-contrib-uglify": "^3.0.1",
"nodemon": "^1.11.0", "nodemon": "^1.11.0",
"snazzy": "^7.0.0", "snazzy": "^7.0.0",
"snyk": "^1.30.1", "snyk": "^1.39.1",
"standard": "^10.0.2", "standard": "^10.0.3",
"xterm": "^2.8.1" "xterm": "^2.9.2"
}, },
"standard": { "standard": {
"ignore": [ "ignore": [

View file

@ -89,53 +89,40 @@
text-decoration: none; text-decoration: none;
} }
.terminal.focus:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor { .terminal .terminal-cursor {
background-color: #fff; position: relative;
color: #000;
} }
.terminal:not(.focus) .terminal-cursor { .terminal:not(.focus) .terminal-cursor {
outline: 1px solid #fff; outline: 1px solid #fff;
outline-offset: -1px; outline-offset: -1px;
background-color: transparent;
} }
.terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus.xterm-cursor-blink-on .terminal-cursor { .terminal.xterm-cursor-style-block.focus:not(.xterm-cursor-blink-on) .terminal-cursor {
background-color: transparent; background-color: #fff;
color: inherit; color: #000;
} }
.terminal.xterm-cursor-style-bar .terminal-cursor, .terminal.focus.xterm-cursor-style-bar:not(.xterm-cursor-blink-on) .terminal-cursor::before,
.terminal.xterm-cursor-style-underline .terminal-cursor { .terminal.focus.xterm-cursor-style-underline:not(.xterm-cursor-blink-on) .terminal-cursor::before {
position: relative; content: '';
}
.terminal.xterm-cursor-style-bar .terminal-cursor::before,
.terminal.xterm-cursor-style-underline .terminal-cursor::before {
content: "";
display: block;
position: absolute; position: absolute;
background-color: #fff; background-color: #fff;
} }
.terminal.xterm-cursor-style-bar .terminal-cursor::before {
.terminal.focus.xterm-cursor-style-bar:not(.xterm-cursor-blink-on) .terminal-cursor::before {
top: 0; top: 0;
bottom: 0;
left: 0; left: 0;
bottom: 0;
width: 1px; width: 1px;
} }
.terminal.xterm-cursor-style-underline .terminal-cursor::before {
.terminal.focus.xterm-cursor-style-underline:not(.xterm-cursor-blink-on) .terminal-cursor::before {
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 1px; height: 1px;
} }
.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before,
.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before {
background-color: transparent;
}
.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,
.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before {
background-color: #fff;
}
.terminal .composition-view { .terminal .composition-view {
background: #000; background: #000;
@ -217,6 +204,10 @@
text-decoration: blink; text-decoration: blink;
} }
.terminal .xterm-blink.xterm-underline {
text-decoration: blink underline;
}
.terminal .xterm-hidden { .terminal .xterm-hidden {
visibility: hidden; visibility: hidden;
} }

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -214,53 +214,40 @@ a.toggleLog {
text-decoration: none; text-decoration: none;
} }
.terminal.focus:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor { .terminal .terminal-cursor {
background-color: #fff; position: relative;
color: #000;
} }
.terminal:not(.focus) .terminal-cursor { .terminal:not(.focus) .terminal-cursor {
outline: 1px solid #fff; outline: 1px solid #fff;
outline-offset: -1px; outline-offset: -1px;
background-color: transparent;
} }
.terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus.xterm-cursor-blink-on .terminal-cursor { .terminal.xterm-cursor-style-block.focus:not(.xterm-cursor-blink-on) .terminal-cursor {
background-color: transparent; background-color: #fff;
color: inherit; color: #000;
} }
.terminal.xterm-cursor-style-bar .terminal-cursor, .terminal.focus.xterm-cursor-style-bar:not(.xterm-cursor-blink-on) .terminal-cursor::before,
.terminal.xterm-cursor-style-underline .terminal-cursor { .terminal.focus.xterm-cursor-style-underline:not(.xterm-cursor-blink-on) .terminal-cursor::before {
position: relative; content: '';
}
.terminal.xterm-cursor-style-bar .terminal-cursor::before,
.terminal.xterm-cursor-style-underline .terminal-cursor::before {
content: "";
display: block;
position: absolute; position: absolute;
background-color: #fff; background-color: #fff;
} }
.terminal.xterm-cursor-style-bar .terminal-cursor::before {
.terminal.focus.xterm-cursor-style-bar:not(.xterm-cursor-blink-on) .terminal-cursor::before {
top: 0; top: 0;
bottom: 0;
left: 0; left: 0;
bottom: 0;
width: 1px; width: 1px;
} }
.terminal.xterm-cursor-style-underline .terminal-cursor::before {
.terminal.focus.xterm-cursor-style-underline:not(.xterm-cursor-blink-on) .terminal-cursor::before {
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
height: 1px; height: 1px;
} }
.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before,
.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink.xterm-cursor-blink-on .terminal-cursor::before {
background-color: transparent;
}
.terminal.xterm-cursor-style-bar.focus.xterm-cursor-blink .terminal-cursor::before,
.terminal.xterm-cursor-style-underline.focus.xterm-cursor-blink .terminal-cursor::before {
background-color: #fff;
}
.terminal .composition-view { .terminal .composition-view {
background: #000; background: #000;
@ -342,6 +329,10 @@ a.toggleLog {
text-decoration: blink; text-decoration: blink;
} }
.terminal .xterm-blink.xterm-underline {
text-decoration: blink underline;
}
.terminal .xterm-hidden { .terminal .xterm-hidden {
visibility: hidden; visibility: hidden;
} }

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -108,6 +108,7 @@ module.exports = function socket (socket) {
password: socket.request.session.userpassword, password: socket.request.session.userpassword,
tryKeyboard: true, tryKeyboard: true,
algorithms: socket.request.session.ssh.algorithms, algorithms: socket.request.session.ssh.algorithms,
readyTimeout: socket.request.session.ssh.readyTimeout,
debug: debug('ssh2') debug: debug('ssh2')
}) })
} else { } else {