Skip to content

Commit

Permalink
Merge branch 'main' into fmeschbe/update-ssh2
Browse files Browse the repository at this point in the history
* main:
  chore: remove warning from ts about IE stuff
  fix: deprecated term.setOption
  fix: update xterm.js fixes billchurch#261
  chore: update dev deps
  chore: update docs
  bump version 0.4.4
  chore: prep for 0.4.4 release
  chore: prep for 0.4.4 release
  docs: docker run billchurch/webssh2 for direct testing (billchurch#269)
  fix: dockerignore (billchurch#272)
  chore: bump version 0.4.3
  docs: update changelog
  docs: update docs for ssh.term and sshterm options (billchurch#265)
  • Loading branch information
fmeschbe committed Dec 12, 2021
2 parents da77def + 55b6dc4 commit fbf5e35
Show file tree
Hide file tree
Showing 10 changed files with 8,466 additions and 16,340 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.git
.cache
node_modules
app/node_modules
13 changes: 13 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
# Change Log
## 0.4.4 [20211209]
### Fixes
- Add ./node_modules to .dockerignore [#240](../../issues/240) thanks @UncleSamSwiss
- validator to 13.7.0 [to mitigate potential Regular Expression Denial of Service (ReDoS)](https://snyk.io/vuln/SNYK-JS-VALIDATOR-1090600)
- cidr-matcher should be [re-installed to pickup >[email protected] due to prototype pollution vulnerability](https://snyk.io/vuln/SNYK-JS-JSONSCHEMA-1920922)
- Update xterm.js to 4.15.0 [#261](../../issues/261)
- Replace deprecated term.setOptions with term.options
### Changes
- update README.md for additional Docker methods thanks @Utopiah

## 0.4.3 [20211019]
- update dependencies
- ssh2 to 1.4.0 [to mitigate potential command injection in windows](https://snyk.io/vuln/SNYK-JS-SSH2-1656673)
## 0.4.2 [20210813]
### changes
- update dependencies
Expand Down
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ Alternatively if you don't want to rebuild, mount the config at runtime:
```bash
docker run --name webssh2 -d -p 2222:2222 -v `pwd`/app/config.json:/usr/src/config.json webssh2
```

Alternatively if you don't want to build either and mount the config at runtime relying on the community image :

```bash
docker run --name webssh2 -d -p 2222:2222 -v `pwd`/app/config.json:/usr/src/config.json billchurch/webssh2
```

<ignoreend>

# Options
Expand All @@ -78,6 +84,8 @@ docker run --name webssh2 -d -p 2222:2222 -v `pwd`/app/config.json:/usr/src/conf

* **header=** - _string_ - optional header to display on page

* **sshterm=** - _string_ - optional specify terminal emulation to use, defaults to `ssh.term` in `config.json` or `vt100` if that is null

* **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
Expand Down Expand Up @@ -115,7 +123,7 @@ docker run --name webssh2 -d -p 2222:2222 -v `pwd`/app/config.json:/usr/src/conf

* **ssh.port** - _integer_ - Specify SSH port to connect to, defaults to `22`

* **ssh.term** - _string_ - Specify terminal emulation to use, defaults to `xterm-color`
* **ssh.term** - _string_ - Specify terminal emulation to use, defaults to `vt100` if null

* **ssh.readyTimeout** - _integer_ - How long (in milliseconds) to wait for the SSH handshake to complete. **Default:** 20000.

Expand Down
2 changes: 1 addition & 1 deletion app/.snyk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.19.0
version: v1.22.0
ignore: {}
patch: {}
2 changes: 1 addition & 1 deletion app/client/public/webssh2.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion app/client/public/webssh2.bundle.js.LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*!
* Font Awesome Free 5.15.3 by @fontawesome - https://fontawesome.com
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
*/
4 changes: 4 additions & 0 deletions app/client/public/webssh2.css
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@
text-decoration: underline;
}

.xterm-strikethrough {
text-decoration: line-through;
}

body, html {
font-family: helvetica, sans-serif, arial;
font-size: 1em;
Expand Down
16 changes: 12 additions & 4 deletions app/client/src/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import { FitAddon } from 'xterm-addon-fit';
import { library, dom } from '@fortawesome/fontawesome-svg-core';
import { faBars, faClipboard, faDownload, faKey, faCog } from '@fortawesome/free-solid-svg-icons';

// for Internet Explorer compatibility... i know gross...
declare global {
interface Navigator {
msSaveBlob?: (blob: any, defaultName?: string) => boolean
msSaveOrOpenBlob?: (blob: any, defaultName?: string) => boolean
}
}

library.add(faBars, faClipboard, faDownload, faKey, faCog);
dom.watch();

Expand Down Expand Up @@ -174,10 +182,10 @@ socket.on('connect', () => {
socket.on(
'setTerminalOpts',
(data: { cursorBlink: any; scrollback: any; tabStopWidth: any; bellStyle: any }) => {
term.setOption('cursorBlink', data.cursorBlink);
term.setOption('scrollback', data.scrollback);
term.setOption('tabStopWidth', data.tabStopWidth);
term.setOption('bellStyle', data.bellStyle);
term.options.cursorBlink = data.cursorBlink;
term.options.scrollback = data.scrollback;
term.options.tabStopWidth = data.tabStopWidth;
term.options.bellStyle = data.bellStyle;
}
);

Expand Down
Loading

0 comments on commit fbf5e35

Please sign in to comment.