Dev (#296)
* chore: update ssh2 and development deps * feat: take LISTEN, PORT, and other env vars #294 * chore: rebuild client files * docs: update readme * chore: bump version * chore: setup gpg for dev container
This commit is contained in:
parent
0bbc99a1ba
commit
206d725663
8 changed files with 3023 additions and 3243 deletions
|
@ -6,6 +6,8 @@ FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:${VARIANT}
|
|||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
# && apt-get -y install --no-install-recommends <your-package-list-here>
|
||||
|
||||
RUN apt-get update && apt-get install gnupg2 -y
|
||||
|
||||
# [Optional] Uncomment if you want to install an additional version of node using nvm
|
||||
# ARG EXTRA_NODE_VERSION=10
|
||||
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"
|
||||
|
|
19
README.md
19
README.md
|
@ -46,7 +46,7 @@ Alternatively in main for testing, you can send credentials via POST with the va
|
|||
See [BUILDING.md](BUILDING.md) for more details.
|
||||
|
||||
# Docker Instructions
|
||||
|
||||
Some configuration options are available as [Environment Variables](#environment-variables). If there is a configuration option you require which does not have an environment variable please [open an issue requesting](../../issues/new/choose).
|
||||
|
||||
[webssh2 images are available in docker hub](https://hub.docker.com/repository/docker/billchurch/webssh2).
|
||||
|
||||
|
@ -100,10 +100,17 @@ Alternatively if you don't want to build either and mount the config at runtime
|
|||
docker run --name webssh2 -d -p 2222:2222 -v `pwd`/app/config.json:/usr/src/config.json billchurch/webssh2
|
||||
```
|
||||
|
||||
<ignoreend>
|
||||
|
||||
# Options
|
||||
|
||||
## Environment Variables
|
||||
Environment variables introduced in 0.4.7 will override anything specified in `config.json`. This is useful for settings that may be per-node, or in a container environment. These are optional and will default to whatever their peer config.json settings are
|
||||
|
||||
* **LISTEN** - _string_ - IP address node should listen on for client connections, defaults to `127.0.0.1`. Peer is **listen.ip**
|
||||
* **PORT** - _integer_ - Port node should listen on for client connections, defaults to `2222`. Peer is **listen.port**
|
||||
* **SOCKETIO_ORIGINS** - _array_ - COORS origins to allow connections from to socket.io server, defaults to `localhost:2222`. Changed in 0.3.1, to enable previous, less secure, default behavior of everything use `*:*` (not recommended). Check [#240](../../issues/240). Peer is **socketio.origins**
|
||||
* **SOCKETIO_PATH** _string_ - Path to socket.io client files. Default: `/ssh/socket.io`. Peer is **socketio.path**
|
||||
* **SOCKETIO_SERVECLIENT** _boolean_ - serve the socket.io client. This is built into the custom javascript, so you shouldn't need this. Kept as an option just in case. Default: `false`. Peer is **socketio.serveClient**
|
||||
|
||||
## POST request vars (in main branch for testing)
|
||||
|
||||
* **username** - _string_ - username to log into ssh with
|
||||
|
@ -177,7 +184,11 @@ docker run --name webssh2 -d -p 2222:2222 -v `pwd`/app/config.json:/usr/src/conf
|
|||
|
||||
* **listen.port** - _integer_ - Port node should listen on for client connections, defaults to `2222`
|
||||
|
||||
* **http.origins** - _array_ - COORS origins to allow connections from to socket.io server, defaults to `localhost:2222`. Changed in 0.3.1, to enable previous, less secure, default behavior of everything use `*:*` (not recommended). Check [#240](../../issues/240)
|
||||
* **socketio.serveClient** - _boolean_ - serve the socket.io client. This is built into the custom javascript, so you shouldn't need this. Kept as an option just in case. Default: `false`
|
||||
|
||||
* **socketio.path** - _string_ - Path to socket.io client files. Default: `/ssh/socket.io`
|
||||
|
||||
* **socketio.origins** - _array_ - COORS origins to allow connections from to socket.io server, defaults to `localhost:2222`. Changed in 0.3.1, to enable previous, less secure, default behavior of everything use `*:*` (not recommended). Check [#240](../../issues/240)
|
||||
|
||||
* **user.name** - _string_ - Specify user name to authenticate with. In normal cases this should be left to the default `null` setting.
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,5 @@
|
|||
/*!
|
||||
* Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
|
||||
* Font Awesome Free 6.1.2 by @fontawesome - https://fontawesome.com
|
||||
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
|
||||
* Copyright 2022 Fonticons, Inc.
|
||||
*/
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
*/
|
||||
|
||||
.xterm {
|
||||
cursor: text;
|
||||
position: relative;
|
||||
user-select: none;
|
||||
-ms-user-select: none;
|
||||
|
@ -124,10 +125,6 @@
|
|||
line-height: normal;
|
||||
}
|
||||
|
||||
.xterm {
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
.xterm.enable-mouse-events {
|
||||
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
|
||||
cursor: default;
|
||||
|
@ -179,6 +176,19 @@
|
|||
position: absolute;
|
||||
}
|
||||
|
||||
.xterm-decoration-overview-ruler {
|
||||
z-index: 7;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.xterm-decoration-top {
|
||||
z-index: 2;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
body, html {
|
||||
font-family: helvetica, sans-serif, arial;
|
||||
font-size: 1em;
|
||||
|
|
6118
app/package-lock.json
generated
6118
app/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "webssh2",
|
||||
"version": "0.4.7-alpha.2",
|
||||
"version": "0.4.7-alpha.3",
|
||||
"ignore": [
|
||||
".gitignore"
|
||||
],
|
||||
|
@ -35,7 +35,6 @@
|
|||
"basic-auth": "~2.0.1",
|
||||
"cidr-matcher": "^2.1.1",
|
||||
"debug": "^4.3.4",
|
||||
"dotenv": "^16.0.1",
|
||||
"express": "^4.18.1",
|
||||
"express-session": "^1.17.3",
|
||||
"json-merger": "^1.1.9",
|
||||
|
@ -43,7 +42,7 @@
|
|||
"read-config-ng": "^3.0.5",
|
||||
"serve-favicon": "^2.5.0",
|
||||
"socket.io": "^4.5.1",
|
||||
"ssh2": "^1.10.0",
|
||||
"ssh2": "^1.11.0",
|
||||
"validator": "^13.7.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
@ -57,33 +56,33 @@
|
|||
"release": "standard-version"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.35",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||
"@typescript-eslint/eslint-plugin": "^4.23.0",
|
||||
"@typescript-eslint/parser": "^4.23.0",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^8.1.1",
|
||||
"css-loader": "^5.2.4",
|
||||
"eslint": "^7.26.0",
|
||||
"eslint-config-airbnb-base": "^14.2.1",
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-prettier": "^3.4.0",
|
||||
"mini-css-extract-plugin": "^1.6.0",
|
||||
"@fortawesome/fontawesome-svg-core": "^6.1.2",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.1.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.31.0",
|
||||
"@typescript-eslint/parser": "^5.31.0",
|
||||
"clean-webpack-plugin": "^4.0.0",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"css-loader": "^6.7.1",
|
||||
"eslint": "^8.21.0",
|
||||
"eslint-config-airbnb-base": "^15.0.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"mini-css-extract-plugin": "^2.6.1",
|
||||
"nodaemon": "0.0.5",
|
||||
"prettier": "^2.3.0",
|
||||
"prettier": "^2.7.1",
|
||||
"snazzy": "^9.0.0",
|
||||
"snyk": "^1.787.0",
|
||||
"socket.io-client": "^4.1.1",
|
||||
"source-map-loader": "^2.0.1",
|
||||
"standard-version": "^9.3.0",
|
||||
"terser-webpack-plugin": "^5.1.2",
|
||||
"ts-loader": "^9.1.2",
|
||||
"typescript": "^4.2.4",
|
||||
"webpack": "^5.37.0",
|
||||
"webpack-cli": "^4.7.0",
|
||||
"webpack-merge": "^5.7.3",
|
||||
"xterm": "^4.18.0",
|
||||
"snyk": "^1.981.0",
|
||||
"socket.io-client": "^4.5.1",
|
||||
"source-map-loader": "^4.0.0",
|
||||
"standard-version": "^9.5.0",
|
||||
"terser-webpack-plugin": "^5.3.3",
|
||||
"ts-loader": "^9.3.1",
|
||||
"typescript": "^4.7.4",
|
||||
"webpack": "^5.74.0",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"webpack-merge": "^5.8.0",
|
||||
"xterm": "^4.19.0",
|
||||
"xterm-addon-fit": "^0.5.0"
|
||||
},
|
||||
"resolutions": {
|
||||
|
|
|
@ -122,4 +122,15 @@ try {
|
|||
}
|
||||
const config = myConfig;
|
||||
|
||||
if (process.env.LISTEN) config.listen.ip = process.env.LISTEN;
|
||||
|
||||
if (process.env.PORT) config.listen.port = process.env.PORT;
|
||||
|
||||
if (process.env.SOCKETIO_ORIGINS) config.socketio.origins = process.env.SOCKETIO_ORIGINS;
|
||||
|
||||
if (process.env.SOCKETIO_PATH) config.socketio.path = process.env.SOCKETIO_PATH;
|
||||
|
||||
if (process.env.SOCKETIO_SERVECLIENT)
|
||||
config.socketio.serveClient = process.env.SOCKETIO_SERVECLIENT;
|
||||
|
||||
module.exports = config;
|
||||
|
|
Loading…
Reference in a new issue