diff --git a/.gitignore b/.gitignore
index d04c8a2..7770eb1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,9 @@ logs
*.log
npm-debug.log*
+# Editor preference files
+*.sublime-*
+
# Runtime data
pids
*.pid
diff --git a/ChangeLog.md b/ChangeLog.md
index f7f9bd7..71546a9 100644
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,4 +1,18 @@
# Change Log
+## [0.1.1] 2017-06-03
+### Added
+- `serverlog.client` and `serverlog.server` options added to `config.json` to enable logging of client commands to server log (only client portion implemented at this time)
+- morgan express middleware for logging
+### Changed
+- Updated socket.io to 1.7.4
+- continued refactoring, breaking up `index.js`
+- revised error handling methods
+- revised session termination methods
+### Fixed
+### Removed
+- color console decorations from `util/index.js`
+- SanatizeHeaders function from `util/index.js`
+
## [0.1.0] 2017-05-27
### Added
- This ChangeLog.md file
@@ -6,7 +20,7 @@
- Snyk, Bithound, Travis CI
- Cross platform improvements (path mappings)
- Session fixup between Express and Socket.io
-- Session secret settings in config.json
+- Session secret settings in `config.json`
- env variable `DEBUG=ssh2` will put the `ssh2` module into debug mode
- env variable `DEBUG=WebSSH2` will output additional debug messages for functions
and events in the application (not including the ssh2 module debug)
@@ -19,7 +33,7 @@ and events in the application (not including the ssh2 module debug)
- error handling in public/client.js
- moved socket.io operations to their own file /socket/index.js, more changes like this to come (./socket/index.js)
- all session based variables are now under the req.session.ssh property or socket.request.ssh (./index.js)
-- moved SSH algorithms to config.json and defined as a session variable (..session.ssh.algorithms)
+- moved SSH algorithms to `config.json` and defined as a session variable (..session.ssh.algorithms)
-- prep for future feature to define algorithms in header or some other method to enable separate ciphers per host
- minified and combined all js files to a single js in `./public/webssh2.min.js` also included a sourcemap `./public/webssh2.min.js` which maps to `./public/webssh2.js` for easier troubleshooting.
- combined all css files to a single css in `./public/webssh2.css`
@@ -28,7 +42,7 @@ and events in the application (not including the ssh2 module debug)
- sourcemaps of all minified code (in /public/src and /public/src/js)
- renamed `client.htm` to `client-full.htm`
- created `client-min.htm` to serve minified javascript
-- if header.text is null in config.json and header is not defined as a get parameter the Header will not be displayed. Both of these must be null / undefined and not specified as get parameters.
+- if header.text is null in `config.json` and header is not defined as a get parameter the Header will not be displayed. Both of these must be null / undefined and not specified as get parameters.
### Fixed
- Multiple errors may overwrite status bar which would cause confusion as to what originally caused the error. Example, ssh server disconnects which prompts a cascade of events (conn.on('end'), socket.on('disconnect'), conn.on('close')) and the original reason (conn.on('end')) would be lost and the user would erroneously receive a WEBSOCKET error as the last event to fire would be the websocket connection closing from the app.
diff --git a/README.md b/README.md
index e5c067e..2dab1fd 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
# WebSSH2 [](https://badge.fury.io/gh/billchurch%2FWebSSH2) [](https://travis-ci.org/billchurch/WebSSH2) [](https://snyk.io/test/github/billchurch/webssh2) [](https://www.bithound.io/github/billchurch/WebSSH2) [](https://www.bithound.io/github/billchurch/WebSSH2/master/dependencies/npm) [](https://nodesecurity.io/orgs/billchurch/projects/b0a0d9df-1340-43ef-9736-ef983c057764)
Web SSH Client using ssh2, socket.io, xterm.js, and express
-Bare bones example of using SSH2 as a client on a host to proxy a Websocket / Socket.io connection to a SSH2 server.
+Bare bones example of using SSH2 as a client on a host to proxy a Websocket / Socket.io connection to a SSH2 server.
@@ -29,7 +29,7 @@ You will be prompted for credentials to use on the SSH server via HTTP Basic aut
* **header=** - _string_ - optional header to display on page
-* **headerBackground=** - _string_ - optional background color of header to display on page
+* **headerBackground=** - _string_ - optional background color of header to display on page
## Headers
@@ -62,7 +62,7 @@ You will be prompted for credentials to use on the SSH server via HTTP Basic aut
* **session.secret** - _string_ - Secret key for cookie encryption. You should change this in production.
-* **options.challengeButton** - _boolean_ - Challenge button. This option, which is still under development, allows the user to resend the password to the server (in cases of step-up authentication for things like `sudo` or a router `enable` command.
+* **options.challengeButton** - _boolean_ - Challenge button. This option, which is still under development, allows the user to resend the password to the server (in cases of step-up authentication for things like `sudo` or a router `enable` command.
* **algorithms** - _object_ - This option allows you to explicitly override the default transport layer algorithms used for the connection. Each value must be an array of valid algorithms for that category. The order of the algorithms in the arrays are important, with the most favorable being first. Valid keys:
@@ -152,6 +152,11 @@ You will be prompted for credentials to use on the SSH server via HTTP Basic aut
* zlib@openssh.com
* zlib
+* **serverlog.client** - _boolean_ - Enables client command logging on server log (console.log). Very simple at this point, buffers data from client until it receives a line-feed then dumps buffer to console.log with session information for tracking. Will capture anything send from client, including passwords, so use for testing only... Default: false. Example:
+ * _serverlog.client: GcZDThwA4UahDiKO2gkMYd7YPIfVAEFW/mnf0NUugLMFRHhsWAAAA host: 192.168.99.80 command: ls -lat_
+
+* **serverlog.server** - _boolean_ - not implemented, default: false.
+
# Experimental client-side logging
Clicking `Start logging` on the status bar will log all data to the client. A `Download log` option will appear after starting the logging. You may download at any time to the client. You may stop logging at any time my pressing the `Logging - STOP LOG`. Note that clicking the `Start logging` option again will cause the current log to be overwritten, so be sure to download first.
@@ -162,4 +167,4 @@ http://localhost:2222/ssh/host/192.168.1.1?port=2244&header=My%20Header&color=re
# Tips
* If you want to add custom JavaScript to the browser client you can either modify `./public/client-(full|min).html` and add a **