Merge branch 'master' into greenkeeper/ssh2-0.6.1

This commit is contained in:
Bill Church 2018-05-10 11:00:16 -04:00 committed by GitHub
commit 00f59bf967
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 32 additions and 11 deletions

View file

@ -1,13 +1,24 @@
# Change Log # Change Log
## [0.2.3] 2018-02-TBD ## [0.2.3] 2018-05-TBD
### Added ### Added
- Browser title window now changes with xterm escape sequences (see http://tldp.org/HOWTO/Xterm-Title-3.html) - Browser title window now changes with xterm escape sequences (see http://tldp.org/HOWTO/Xterm-Title-3.html)
- Added bellStyle options - Added bellStyle options
- `GET var`: **bellStyle** - _string_ - Style of terminal bell: ("sound"|"none"). **Default:** "sound". **Enforced Values:** "sound", "none" - `GET var`: **bellStyle** - _string_ - Style of terminal bell: ("sound"|"none"). **Default:** "sound". **Enforced Values:** "sound", "none"
- `config.json`: **terminal.bellStyle** - _string_ - Style of terminal bell: (sound|none). **Default:** "sound". - `config.json`: **terminal.bellStyle** - _string_ - Style of terminal bell: (sound|none). **Default:** "sound".
- webpack-cli 2.1.3
- ajv 6.5.0
### Changed ### Changed
- Updated xterm.js to 3.1.0 - Updated xterm.js to 3.1.0
- https://github.com/xtermjs/xterm.js/releases/tag/3.1.0 - https://github.com/xtermjs/xterm.js/releases/tag/3.1.0
- Updated dev dependancies
- style-loader to 0.2.1
- standard to 11.0.0
- webpack to 4.8.1
- extract-text-webpack-plugin to 4.0.0-beta.0
- validator to 10.0.0
- url-loader to 1.0.1
- rebuilt /client with updated webpack and plugins
### Fixed ### Fixed
- ESC]0; is now removed from log files when using the browser-side logging feature - ESC]0; is now removed from log files when using the browser-side logging feature

View file

@ -8,6 +8,14 @@ A bare bones example of an HTML5 web-based terminal emulator and SSH client. We
<img width="600" height="340" alt="WebSSH2 v0.2.0 demo" src="https://github.com/billchurch/WebSSH2/raw/master/screenshots/demo-800.gif"> <img width="600" height="340" alt="WebSSH2 v0.2.0 demo" src="https://github.com/billchurch/WebSSH2/raw/master/screenshots/demo-800.gif">
# Requirements
Node v6.x or above. If using <v6.x you should be able to run by replacing the "read-config" package to @1 like this (after a clone):
`npm install --save read-config@1
`
Just keep in mind that there is no intention to ensure compatability with Node < v6.x
# Instructions # Instructions
To install: To install:

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
.xterm{font-family:courier-new,courier,monospace;font-feature-settings:"liga" 0;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:10}.xterm .xterm-helper-textarea{position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm .xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm:not(.enable-mouse-events){cursor:text}body,html{font-family:helvetica,sans-serif;font-size:1em;color:#111;background-color:#000;color:#f0f0f0;height:100%;margin:0}#header{color:#f0f0f0;background-color:green;width:100%;border-color:#fff;border-style:none none solid;border-width:1px;text-align:center;flex:0 1 auto;z-index:99;height:19px;display:none}.box{display:block;height:100%}#terminal-container{display:block;width:calc(1 - 1 px);margin:0 auto;padding:2px;height:calc(100% - 19px)}#terminal-container .terminal{background-color:#000;color:#fafafa;padding:2px;height:calc(100% - 19px)}#terminal-container .terminal:focus .terminal-cursor{background-color:#fafafa}#bottomdiv{position:fixed;left:0;bottom:0;width:100%;background-color:#323232;border-color:#fff;border-style:solid none none;border-width:1px;z-index:99;height:19px}#footer{padding-left:5px;padding-right:5px;border-style:none none none solid}#footer,#status{display:inline-block;color:#f0f0f0;background-color:#323232;border-color:#fff;border-width:1px;text-align:left}#status{padding-right:10px;border-style:none solid}#menu,#status{padding-left:10px;z-index:100}#menu{display:inline-block;font-size:16px;color:#fff}#menu:hover .dropup-content{display:block}#credentialsBtn,#logBtn{color:#000}.dropup{position:relative;display:inline-block;cursor:pointer}.dropup-content{display:none;position:absolute;background-color:#f1f1f1;font-size:16px;min-width:160px;bottom:18px;z-index:101}.dropup-content a{color:#777;padding:12px 16px;text-decoration:none;display:block}.dropup-content a:hover{background-color:#ccc}.dropup:click .dropup-content,.dropup:hover .dropup-content{display:block}.dropup:hover .dropbtn{background-color:#3e8e41} .xterm{font-family:courier-new,courier,monospace;font-feature-settings:"liga" 0;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:10}.xterm .xterm-helper-textarea{position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-10;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm:not(.enable-mouse-events){cursor:text}.xterm .xterm-accessibility,.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:100;color:transparent}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-cursor-pointer{cursor:pointer}body,html{font-family:helvetica,sans-serif;font-size:1em;color:#111;background-color:#000;color:#f0f0f0;height:100%;margin:0}#header{color:#f0f0f0;background-color:green;width:100%;border-color:#fff;border-style:none none solid;border-width:1px;text-align:center;flex:0 1 auto;z-index:99;height:19px;display:none}.box{display:block;height:100%}#terminal-container{display:block;width:calc(1 - 1 px);margin:0 auto;padding:2px;height:calc(100% - 19px)}#terminal-container .terminal{background-color:#000;color:#fafafa;padding:2px;height:calc(100% - 19px)}#terminal-container .terminal:focus .terminal-cursor{background-color:#fafafa}#bottomdiv{position:fixed;left:0;bottom:0;width:100%;background-color:#323232;border-color:#fff;border-style:solid none none;border-width:1px;z-index:99;height:19px}#footer{padding-left:5px;padding-right:5px;border-style:none none none solid}#footer,#status{display:inline-block;color:#f0f0f0;background-color:#323232;border-color:#fff;border-width:1px;text-align:left}#status{padding-right:10px;border-style:none solid}#menu,#status{padding-left:10px;z-index:100}#menu{display:inline-block;font-size:16px;color:#fff}#menu:hover .dropup-content{display:block}#credentialsBtn,#logBtn{color:#000}.dropup{position:relative;display:inline-block;cursor:pointer}.dropup-content{display:none;position:absolute;background-color:#f1f1f1;font-size:16px;min-width:160px;bottom:18px;z-index:101}.dropup-content a{color:#777;padding:12px 16px;text-decoration:none;display:block}.dropup-content a:hover{background-color:#ccc}.dropup:click .dropup-content,.dropup:hover .dropup-content{display:block}.dropup:hover .dropbtn{background-color:#3e8e41}

View file

@ -37,7 +37,7 @@
"read-config": "^2.0.0", "read-config": "^2.0.0",
"socket.io": "^2.0.4", "socket.io": "^2.0.4",
"ssh2": "^0.6.1", "ssh2": "^0.6.1",
"validator": "^9.0.0" "validator": "^10.1.0"
}, },
"scripts": { "scripts": {
"start": "node index.js", "start": "node index.js",
@ -51,21 +51,23 @@
"devDependencies": { "devDependencies": {
"@fortawesome/fontawesome": "^1.1.3", "@fortawesome/fontawesome": "^1.1.3",
"@fortawesome/fontawesome-free-solid": "^5.0.6", "@fortawesome/fontawesome-free-solid": "^5.0.6",
"ajv": "^6.5.0",
"bithound": "^1.7.0", "bithound": "^1.7.0",
"clean-webpack-plugin": "^0.1.18", "clean-webpack-plugin": "^0.1.18",
"copy-webpack-plugin": "^4.3.1", "copy-webpack-plugin": "^4.3.1",
"css-loader": "^0.28.9", "css-loader": "^0.28.9",
"extract-text-webpack-plugin": "^3.0.2", "extract-text-webpack-plugin": "^4.0.0-beta.0",
"file-loader": "^1.1.6", "file-loader": "^1.1.6",
"nodemon": "^1.11.0", "nodemon": "^1.11.0",
"postcss-discard-comments": "^2.0.4", "postcss-discard-comments": "^2.0.4",
"snazzy": "^7.0.0", "snazzy": "^7.0.0",
"snyk": "^1.39.1", "snyk": "^1.39.1",
"standard": "^10.0.3", "standard": "^11.0.0",
"style-loader": "^0.20.1", "style-loader": "^0.21.0",
"uglifyjs-webpack-plugin": "^1.1.8", "uglifyjs-webpack-plugin": "^1.1.8",
"url-loader": "^0.6.2", "url-loader": "^1.0.1",
"webpack": "^3.10.0", "webpack": "^4.8.1",
"webpack-cli": "^2.1.3",
"webpack-merge": "^4.1.1", "webpack-merge": "^4.1.1",
"webpack-stream": "^4.0.0", "webpack-stream": "^4.0.0",
"xterm": "^3.1.0" "xterm": "^3.1.0"

View file

@ -24,7 +24,7 @@ module.exports = function socket (socket) {
termRows = rows termRows = rows
}) })
conn.on('banner', function connOnBanner (data) { conn.on('banner', function connOnBanner (data) {
// need to convert to cr/lf for proper formatting // need to convert to cr/lf for proper formatting
data = data.replace(/\r?\n/g, '\r\n') data = data.replace(/\r?\n/g, '\r\n')
socket.emit('data', data.toString('utf-8')) socket.emit('data', data.toString('utf-8'))
}) })

View file

@ -12,7 +12,7 @@ exports.basicAuth = function basicAuth (req, res, next) {
req.session.userpassword = myAuth.pass req.session.userpassword = myAuth.pass
debug('myAuth.name: ' + myAuth.name.yellow.bold.underline + debug('myAuth.name: ' + myAuth.name.yellow.bold.underline +
' and password ' + ((myAuth.pass) ? 'exists'.yellow.bold.underline ' and password ' + ((myAuth.pass) ? 'exists'.yellow.bold.underline
: 'is blank'.underline.red.bold)) : 'is blank'.underline.red.bold))
next() next()
} else { } else {
res.statusCode = 401 res.statusCode = 401