Skip to content

Commit

Permalink
adding readyTimeout option, updating packages
Browse files Browse the repository at this point in the history
adding readyTimeout option, updating packages
  • Loading branch information
billchurch committed Aug 21, 2017
1 parent 458747d commit d849f74
Show file tree
Hide file tree
Showing 15 changed files with 1,477 additions and 1,123 deletions.
17 changes: 16 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,27 @@
# Change Log
## [0.1.2] 2017-07-31
### Added
- ssh.readyTimeout option in config.json (time in ms, default 20000, 20sec)
### 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.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
- 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
### Added
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

* **readyTimeout=** - _integer_ - How long (in milliseconds) to wait for the SSH handshake to complete. **Default:** 20000. **Enforced Values:** Min: 1, Max: 300000

## Headers

* **allowreplay** - _boolean_ - Allow use of password replay feature, example `allowreplay: true`
Expand All @@ -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.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)

* **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.
Expand Down
4 changes: 3 additions & 1 deletion app.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ app.get('/ssh/host/:host?', function (req, res, next) {
serverlog: {
client: config.serverlog.client || 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.background &&
Expand Down
3 changes: 2 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"ssh": {
"host": null,
"port": 22,
"term": "xterm-color"
"term": "xterm-color",
"readyTimeout": 20000
},
"useminified": false,
"header": {
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Bill Church - https://github.com/billchurch/WebSSH2 - May 2017
*
*/
'use strict'

var config = require('./app').config
var server = require('./app').server
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
"dependencies": {
"basic-auth": "^1.1.0",
"colors": "^1.1.2",
"debug": "^2.6.8",
"express": "^4.15.3",
"express-session": "^1.15.3",
"debug": "^3.0.0",
"express": "^4.15.4",
"express-session": "^1.15.5",
"morgan": "^1.8.2",
"read-config": "^1.6.0",
"socket.io": "^1.7.4",
"ssh2": "^0.5.5",
"validator": "^7.0.0"
"validator": "^8.0.0"
},
"scripts": {
"start": "node index",
Expand All @@ -54,9 +54,9 @@
"grunt-contrib-uglify": "^3.0.1",
"nodemon": "^1.11.0",
"snazzy": "^7.0.0",
"snyk": "^1.30.1",
"standard": "^10.0.2",
"xterm": "^2.8.1"
"snyk": "^1.39.1",
"standard": "^10.0.3",
"xterm": "^2.9.2"
},
"standard": {
"ignore": [
Expand Down
43 changes: 17 additions & 26 deletions public/src/css/xterm.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,53 +89,40 @@
text-decoration: none;
}

.terminal.focus:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar) .terminal-cursor {
background-color: #fff;
color: #000;
.terminal .terminal-cursor {
position: relative;
}

.terminal:not(.focus) .terminal-cursor {
outline: 1px solid #fff;
outline-offset: -1px;
background-color: transparent;
}

.terminal:not(.xterm-cursor-style-underline):not(.xterm-cursor-style-bar).focus.xterm-cursor-blink-on .terminal-cursor {
background-color: transparent;
color: inherit;
.terminal.xterm-cursor-style-block.focus:not(.xterm-cursor-blink-on) .terminal-cursor {
background-color: #fff;
color: #000;
}

.terminal.xterm-cursor-style-bar .terminal-cursor,
.terminal.xterm-cursor-style-underline .terminal-cursor {
position: relative;
}
.terminal.xterm-cursor-style-bar .terminal-cursor::before,
.terminal.xterm-cursor-style-underline .terminal-cursor::before {
content: "";
display: block;
.terminal.focus.xterm-cursor-style-bar:not(.xterm-cursor-blink-on) .terminal-cursor::before,
.terminal.focus.xterm-cursor-style-underline:not(.xterm-cursor-blink-on) .terminal-cursor::before {
content: '';
position: absolute;
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;
bottom: 0;
left: 0;
bottom: 0;
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;
left: 0;
right: 0;
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 {
background: #000;
Expand Down Expand Up @@ -217,6 +204,10 @@
text-decoration: blink;
}

.terminal .xterm-blink.xterm-underline {
text-decoration: blink underline;
}

.terminal .xterm-hidden {
visibility: hidden;
}
Expand Down
Loading

0 comments on commit d849f74

Please sign in to comment.