├── .csslintrc
├── .devcontainer
├── devcontainer.json
└── scripts
│ └── tools.sh
├── .dockerignore
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.yml
│ ├── custom.md
│ └── feature_request.md
└── workflows
│ ├── action-test.yml
│ ├── docker-multiplatform-tag.yml
│ ├── docker-multiplatform.yml
│ └── release.yml
├── .gitignore
├── .release-please-manifest.json
├── .travis.yml
├── BUILDING.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── ChangeLog.md
├── Dockerfile
├── LICENSE
├── Makefile
├── README.md
├── SECURITY.md
├── app
├── .eslintrc.json
├── .npmrc
├── .prettierrc
├── .snyk
├── CHANGELOG.md
├── LICENSE
├── bun.lockb
├── client
│ ├── public
│ │ ├── client.htm
│ │ ├── favicon.ico
│ │ ├── webssh2.bundle.js
│ │ └── webssh2.css
│ ├── src
│ │ ├── README.md
│ │ ├── client.htm
│ │ ├── css
│ │ │ └── style.css
│ │ ├── favicon.ico
│ │ └── js
│ │ │ └── index.ts
│ └── tsconfig.json
├── config.json.sample
├── index.js
├── jsconfig.json
├── package-lock.json
├── package.json
├── scripts
│ ├── webpack.common.js
│ ├── webpack.dev.js
│ └── webpack.prod.js
└── server
│ ├── app.js
│ ├── config.js
│ ├── form.html
│ ├── logging.js
│ ├── routes.js
│ ├── socket.js
│ └── util.js
├── bun.lockb
├── package.json
└── release-please-config.json
/.csslintrc:
--------------------------------------------------------------------------------
1 | --exclude-exts=.min.css
2 | --ignore=adjoining-classes,box-model,ids,order-alphabetical,unqualified-attributes
3 |
--------------------------------------------------------------------------------
/.devcontainer/devcontainer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "Node.js & TypeScript",
3 | "image": "mcr.microsoft.com/devcontainers/base:jammy",
4 |
5 | "mounts": [
6 | "source=${localEnv:HOME}${localEnv:USERPROFILE}/.ssh/personal_id_rsa.pub,target=/home/vscode/.hostssh/id_rsa.pub,readonly,type=bind,consistency=cached"
7 | ],
8 | "features": {
9 | "ghcr.io/devcontainers-contrib/features/node-asdf:0": {},
10 | },
11 | // Configure tool-specific properties.
12 | "customizations": {
13 | // Configure properties specific to VS Code.
14 | "vscode": {
15 | // Add the IDs of extensions you want installed when the container is created.
16 | "extensions": [
17 | "ms-vscode-remote.remote-containers",
18 | "dbaeumer.vscode-eslint",
19 | "GitHub.copilot",
20 | "GitHub.copilot-chat",
21 | "esbenp.prettier-vscode",
22 | "rvest.vs-code-prettier-eslint",
23 | "bierner.markdown-mermaid",
24 | "stylelint.vscode-stylelint"
25 | ]
26 | }
27 | },
28 |
29 | // Use 'forwardPorts' to make a list of ports inside the container available locally.
30 | // "forwardPorts": [],
31 |
32 | // Use 'postCreateCommand' to run commands after the container is created.
33 | "postCreateCommand": "/bin/bash ./.devcontainer/scripts/tools.sh >> ~/post-create-tools.log",
34 |
35 | // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
36 | "remoteUser": "vscode"
37 | }
--------------------------------------------------------------------------------
/.devcontainer/scripts/tools.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | mkdir -p ~/.ssh && \
4 | touch ~/.ssh/known_hosts && \
5 | sudo tee ~/.ssh/config > /dev/null << EOF
6 | Host github.com
7 | HostName github.com
8 | PreferredAuthentications publickey
9 | IdentityFile ~/.hostssh/id_rsa.pub
10 | EOF
11 |
12 | sudo chown -R vscode:vscode ~/.ssh
--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------
1 | .git
2 | .cache
3 | app/node_modules
4 | app/client/src
5 | app/scripts
6 | app/.*
7 | app/*.sample
8 | app/client/tsconfig.json
9 | app/CHANGELOG.md
10 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.yml:
--------------------------------------------------------------------------------
1 | name: Bug Report
2 | description: File a bug report
3 | title: "[Bug]: "
4 | labels: ["bug", "triage"]
5 | assignees:
6 | - billchurch
7 | body:
8 | - type: markdown
9 | attributes:
10 | value: |
11 | Depending on the type of issue, please include the follwing information:
12 | - type: textarea
13 | id: what-happened
14 | attributes:
15 | label: What happened?
16 | description: Also tell us, what did you expect to happen?
17 | placeholder: Tell us what you see!
18 | value: "A bug happened!"
19 | validations:
20 | required: true
21 | - type: input
22 | id: node_ver
23 | attributes:
24 | label: Node Version
25 | description: version of Node this problem occurs on
26 | placeholder: npm -v
27 | validations:
28 | required: true
29 | - type: input
30 | id: npm_ver
31 | attributes:
32 | label: NPM Version
33 | description: version of NPM this problem occurs on
34 | placeholder: npm -v
35 | validations:
36 | required: true
37 | - type: input
38 | id: server_ver
39 | attributes:
40 | label: Server OS Version
41 | description: Server OS Version / Distribution / Processor Architecture
42 | placeholder: uname -a;cat /etc/os-release
43 | validations:
44 | required: true
45 | - type: input
46 | id: webssh2_ver
47 | attributes:
48 | label: WebSSH2 release version
49 | description: Version of WebSSH you are using
50 | placeholder: grep version app/package.json
51 | validations:
52 | required: true
53 | - type: input
54 | id: sshhost_ver
55 | attributes:
56 | label: OS and Version of SSH server
57 | description: OS and Version of SSH server connecting to
58 | placeholder: 'on target server run: uname -a;sshd -v'
59 | validations:
60 | required: false
61 | - type: input
62 | id: browser_ver
63 | attributes:
64 | label: Browser Version
65 | description: Information from brwoser's About... or a screenshot of the about screen.
66 | placeholder:
67 | validations:
68 | required: false
69 | - type: textarea
70 | id: logs
71 | attributes:
72 | label: Relevant log output
73 | description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
74 | render: shell
75 |
76 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/custom.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Question
3 | about: General how-to questions
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/.github/workflows/action-test.yml:
--------------------------------------------------------------------------------
1 | name: Manually Release Previous Tag
2 |
3 | on:
4 | workflow_dispatch:
5 | inputs:
6 | tag:
7 | description: 'Repo Branch/Tag'
8 | default: 'main'
9 | type: 'string'
10 | required: true
11 |
12 | jobs:
13 | docker:
14 | runs-on: ubuntu-latest
15 | steps:
16 | - name: 'Checkout'
17 | uses: actions/checkout@v3
18 | with:
19 | ref: ${{ inputs.tag }}
20 | - name: Prepare
21 | id: prep
22 | run: |
23 | DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/}
24 |
25 | VERSION=${{ inputs.tag }}
26 | VERSION="${VERSION//v}"
27 | TAGS="${DOCKER_IMAGE}:${VERSION},${DOCKER_IMAGE}"
28 |
29 | # If the VERSION looks like a version number, assume that
30 | # this is the most recent version of the image and also
31 | # tag it 'latest'.
32 | if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
33 | TAGS="$TAGS,${DOCKER_IMAGE}"
34 | fi
35 |
36 |
37 | # Set output parameters.
38 | echo ::set-output name=tags::${TAGS}
39 | echo ::set-output name=docker_image::${DOCKER_IMAGE}
40 |
41 | - name: Set up QEMU
42 | uses: docker/setup-qemu-action@master
43 | with:
44 | platforms: all
45 |
46 | - name: Set up Docker Buildx
47 | id: buildx
48 | uses: docker/setup-buildx-action@master
49 |
50 | - name: Login to DockerHub
51 | if: github.event_name != 'pull_request'
52 | uses: docker/login-action@v1
53 | with:
54 | username: ${{ secrets.DOCKER_USERNAME }}
55 | password: ${{ secrets.DOCKER_PASSWORD }}
56 |
57 | - name: Build
58 | uses: docker/build-push-action@v2
59 | with:
60 | builder: ${{ steps.buildx.outputs.name }}
61 | context: .
62 | file: ./Dockerfile
63 | platforms: linux/amd64,linux/arm64,linux/ppc64le
64 | push: true
65 | tags: ${{ steps.prep.outputs.tags }}
66 |
--------------------------------------------------------------------------------
/.github/workflows/docker-multiplatform-tag.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: 'Build Docker On Tag'
3 |
4 | on:
5 | push:
6 | branches:
7 | - bigip-server
8 | tags:
9 | - 'v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
10 | workflow_dispatch: # Allows manual triggering from the GitHub UI
11 |
12 | jobs:
13 | docker:
14 | runs-on: ubuntu-latest
15 | steps:
16 | - name: 'Checkout'
17 | uses: actions/checkout@v3
18 |
19 | - name: Prepare
20 | id: prep
21 | run: |
22 | DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/}
23 |
24 | # If this is a git tag, use the tag name as a docker tag
25 | if [[ $GITHUB_REF == refs/tags/* ]]; then
26 | VERSION=${GITHUB_REF#refs/tags/v}
27 | TAGS="${DOCKER_IMAGE}:${VERSION}"
28 | fi
29 |
30 | # If this is a git branch, use the branch name as a docker tag
31 | if [[ $GITHUB_REF == refs/heads/* ]]; then
32 | VERSION=${GITHUB_REF#refs/heads/}
33 | TAGS="${DOCKER_IMAGE}:${VERSION}"
34 | fi
35 |
36 | # If the VERSION looks like a version number, also tag as 'latest'
37 | if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
38 | TAGS="$TAGS,${DOCKER_IMAGE}:latest"
39 | fi
40 |
41 | # Set output parameters
42 | echo ::set-output name=tags::${TAGS}
43 | echo ::set-output name=docker_image::${DOCKER_IMAGE}
44 |
45 | - name: Set up QEMU
46 | uses: docker/setup-qemu-action@v3
47 | with:
48 | platforms: all
49 |
50 | - name: Set up Docker Buildx
51 | id: buildx
52 | uses: docker/setup-buildx-action@v3
53 |
54 | - name: Login to DockerHub
55 | if: github.event_name != 'pull_request'
56 | uses: docker/login-action@v2
57 | with:
58 | username: ${{ secrets.DOCKER_USERNAME }}
59 | password: ${{ secrets.DOCKER_PASSWORD }}
60 |
61 | - name: Build
62 | uses: docker/build-push-action@v4
63 | with:
64 | builder: ${{ steps.buildx.outputs.name }}
65 | context: .
66 | file: ./Dockerfile
67 | platforms: linux/amd64,linux/arm64,linux/ppc64le
68 | push: true
69 | tags: ${{ steps.prep.outputs.tags }}
70 |
--------------------------------------------------------------------------------
/.github/workflows/docker-multiplatform.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: 'Build Docker Images'
3 |
4 | on:
5 | release:
6 | types: [published]
7 |
8 | jobs:
9 | docker:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: 'Checkout'
13 | uses: actions/checkout@v3
14 | - name: Prepare
15 | id: prep
16 | run: |
17 | DOCKER_IMAGE=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPOSITORY#*/}
18 |
19 | # If this is git tag, use the tag name as a docker tag
20 | if [[ $GITHUB_REF == refs/tags/* ]]; then
21 | VERSION=${GITHUB_REF#refs/tags/webssh2-v}
22 | TAGS="${DOCKER_IMAGE}:${VERSION}"
23 | fi
24 |
25 | # If this is git branch, use the branch name as a docker tag
26 | if [[ $GITHUB_REF == refs/heads/* ]]; then
27 | VERSION=${GITHUB_REF#refs/heads/}
28 | TAGS="${DOCKER_IMAGE}:${VERSION}"
29 | fi
30 |
31 | # If the VERSION looks like a version number, assume that
32 | # this is the most recent version of the image and also
33 | # tag it 'latest'. This is done by just specifying the ${DOCKER_IMAGE}
34 | # without a tag.
35 | if [[ $VERSION =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
36 | TAGS="$TAGS,${DOCKER_IMAGE}"
37 | fi
38 |
39 | # Set output parameters.
40 | echo ::set-output name=tags::${TAGS}
41 | echo ::set-output name=docker_image::${DOCKER_IMAGE}
42 |
43 | - name: Set up QEMU
44 | uses: docker/setup-qemu-action@master
45 | with:
46 | platforms: all
47 |
48 | - name: Set up Docker Buildx
49 | id: buildx
50 | uses: docker/setup-buildx-action@master
51 |
52 | - name: Login to DockerHub
53 | if: github.event_name != 'pull_request'
54 | uses: docker/login-action@v1
55 | with:
56 | username: ${{ secrets.DOCKER_USERNAME }}
57 | password: ${{ secrets.DOCKER_PASSWORD }}
58 |
59 | - name: Build
60 | uses: docker/build-push-action@v2
61 | with:
62 | builder: ${{ steps.buildx.outputs.name }}
63 | context: .
64 | file: ./Dockerfile
65 | platforms: linux/amd64,linux/arm64,linux/ppc64le
66 | push: true
67 | tags: ${{ steps.prep.outputs.tags }}
--------------------------------------------------------------------------------
/.github/workflows/release.yml:
--------------------------------------------------------------------------------
1 | ---
2 | name: 'Create Release'
3 | on:
4 | push:
5 | branches:
6 | - main
7 | paths-ignore:
8 | - '.github/**'
9 | - '.devcontainer/**'
10 | - '.**'
11 | - '**.md'
12 | jobs:
13 | release:
14 | runs-on: ubuntu-latest
15 | outputs:
16 | paths_released: ${{ steps.manifest_release.outputs.paths_released }}
17 | steps:
18 | - uses: google-github-actions/release-please-action@v3
19 | id: manifest_release
20 | with:
21 | token: ${{ secrets.RELEASE_PLEASE_UAT }}
22 | command: manifest
23 | package-name: webssh2
24 | path: app
25 | default-branch: main
26 | release-type: node
27 | publish:
28 | runs-on: ubuntu-20.04
29 | needs: release
30 | strategy:
31 | fail-fast: false
32 | matrix:
33 | path: ${{fromJson(needs.release.outputs.paths_released)}}
34 | steps:
35 | - uses: actions/checkout@v2
36 | - uses: actions/setup-node@v1
37 | with:
38 | node-version: 16
39 | registry-url: 'https://registry.npmjs.org'
40 | - name: publish-to-npm
41 | env:
42 | NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
43 | run: |
44 | cd ${{ matrix.path }}
45 | npm install
46 | npx lerna bootstrap
47 | npx lerna publish from-package --no-push --no-private --yes
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | #Docs
2 | docs
3 |
4 | ssl/*
5 |
6 | bigip/*
7 |
8 | config.json
9 |
10 | # Logs
11 | logs
12 | *.log
13 | npm-debug.log*
14 |
15 | # Editor preference files
16 | *.sublime-*
17 |
18 | # Runtime data
19 | pids
20 | *.pid
21 | *.seed
22 |
23 | # Directory for instrumented libs generated by jscoverage/JSCover
24 | lib-cov
25 |
26 | # Coverage directory used by tools like istanbul
27 | coverage
28 |
29 | # nyc test coverage
30 | .nyc_output
31 |
32 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
33 | .grunt
34 |
35 | # node-waf configuration
36 | .lock-wscript
37 |
38 | # Dependency directories
39 | node_modules
40 | jspm_packages
41 |
42 | # Optional npm cache directory
43 | .npm
44 |
45 | # Optional REPL history
46 | .node_repl_history
47 |
48 | #Mac Files
49 | .DS_Store
50 |
51 | Build/Release
52 | app/bob_rsa
53 |
--------------------------------------------------------------------------------
/.release-please-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "app": "0.5.0-pre-4"
3 | }
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - 14
4 | - 16
5 | before_install:
6 | - npm i -g snyk
7 |
--------------------------------------------------------------------------------
/BUILDING.md:
--------------------------------------------------------------------------------
1 | # Buliding
2 |
3 | To rebuild the client files, you need at least Node v14.
4 |
5 | The source of the client files are located in `./app/client/src`
6 |
7 | `npm run build` will compile the source files there into `./app/client/public/`. This directory is considered to be volitile and is deleted every time `npm run build` is invoked.
8 |
9 | WebPack is used for building and the configuration is located in `./app/scripts`
10 |
11 | If one wishes to make changes to the javascript, the html, or the css it should be done in `./app/client/src` and then complied using `npm run build`
12 |
13 | For development purposes, you may also utilize `npm run builddev` which will not minimize the source and allow you to more easily troubleshoot while making customizations.
14 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at wmchurch@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Guidelines for contributing code:
2 |
3 | Make sure code passes linting from (StandardJS)[https://standardjs.com/]
4 |
5 |
6 | # Contributing
7 |
8 | When contributing to this repository, please first discuss the change you wish to make via issue,
9 | email, or any other method with the owners of this repository before making a change.
10 |
11 | Please note we have a code of conduct, please follow it in all your interactions with the project.
12 |
13 | ## Pull Request Process
14 |
15 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a
16 | build.
17 | 2. Make sure code passes linting from (StandardJS)[https://standardjs.com/]
18 | 3. Explain what you're trying to accomplish in your commits
19 | 4. Update changelog and Readme if needed.
20 |
21 | ## Code of Conduct
22 |
23 | ### Our Pledge
24 |
25 | In the interest of fostering an open and welcoming environment, we as
26 | contributors and maintainers pledge to making participation in our project and
27 | our community a harassment-free experience for everyone, regardless of age, body
28 | size, disability, ethnicity, gender identity and expression, level of experience,
29 | nationality, personal appearance, race, religion, or sexual identity and
30 | orientation.
31 |
32 | ### Our Standards
33 |
34 | Examples of behavior that contributes to creating a positive environment
35 | include:
36 |
37 | * Using welcoming and inclusive language
38 | * Being respectful of differing viewpoints and experiences
39 | * Gracefully accepting constructive criticism
40 | * Focusing on what is best for the community
41 | * Showing empathy towards other community members
42 |
43 | Examples of unacceptable behavior by participants include:
44 |
45 | * The use of sexualized language or imagery and unwelcome sexual attention or
46 | advances
47 | * Trolling, insulting/derogatory comments, and personal or political attacks
48 | * Public or private harassment
49 | * Publishing others' private information, such as a physical or electronic
50 | address, without explicit permission
51 | * Other conduct which could reasonably be considered inappropriate in a
52 | professional setting
53 |
54 | ### Our Responsibilities
55 |
56 | Project maintainers are responsible for clarifying the standards of acceptable
57 | behavior and are expected to take appropriate and fair corrective action in
58 | response to any instances of unacceptable behavior.
59 |
60 | Project maintainers have the right and responsibility to remove, edit, or
61 | reject comments, commits, code, wiki edits, issues, and other contributions
62 | that are not aligned to this Code of Conduct, or to ban temporarily or
63 | permanently any contributor for other behaviors that they deem inappropriate,
64 | threatening, offensive, or harmful.
65 |
66 | ### Scope
67 |
68 | This Code of Conduct applies both within project spaces and in public spaces
69 | when an individual is representing the project or its community. Examples of
70 | representing a project or community include using an official project e-mail
71 | address, posting via an official social media account, or acting as an appointed
72 | representative at an online or offline event. Representation of a project may be
73 | further defined and clarified by project maintainers.
74 |
75 | ### Enforcement
76 |
77 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
78 | reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
79 | complaints will be reviewed and investigated and will result in a response that
80 | is deemed necessary and appropriate to the circumstances. The project team is
81 | obligated to maintain confidentiality with regard to the reporter of an incident.
82 | Further details of specific enforcement policies may be posted separately.
83 |
84 | Project maintainers who do not follow or enforce the Code of Conduct in good
85 | faith may face temporary or permanent repercussions as determined by other
86 | members of the project's leadership.
87 |
88 | ### Attribution
89 |
90 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
91 | available at [http://contributor-covenant.org/version/1/4][version]
92 |
93 | [homepage]: http://contributor-covenant.org
94 | [version]: http://contributor-covenant.org/version/1/4/
95 |
--------------------------------------------------------------------------------
/ChangeLog.md:
--------------------------------------------------------------------------------
1 | # Changelog Moved
2 |
3 | See [app/CHANGELOG.md](app/CHANGELOG.md)
4 |
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:16-alpine
2 |
3 | RUN apk update && apk add bash
4 |
5 | WORKDIR /usr/src
6 | COPY app/ /usr/src/
7 | RUN npm ci --audit=false --bin-links=false --fund=false
8 | EXPOSE 2222/tcp
9 | ENTRYPOINT [ "/usr/local/bin/node", "index.js" ]
10 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Bill Church
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | test:
2 | cd ./app; npm run test
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WebSSH2
2 |
3 | [](https://travis-ci.com/billchurch/webssh2) [](https://github.com/billchurch/webssh2/releases/latest) [](https://github.com/billchurch/webssh2/actions/workflows/docker-multiplatform.yml)
4 |
5 | [](https://www.buymeacoffee.com/billchurch)
6 |
7 | Web SSH Client using ssh2, socket.io, xterm.js, and express
8 |
9 | A bare bones example of an HTML5 web-based terminal emulator and SSH client. We use SSH2 as a client on a host to proxy a Websocket / Socket.io connection to a SSH2 server.
10 |
11 |
12 |
13 | # Requirements
14 | Node v14.x or above. If using ** element, modify `./src/index.js` directly, or check out `webpack.*.js` and add your custom javascript file to a task there (best option).
368 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | The following versions will get security updates.
6 |
7 | | Version | Supported |
8 | | ------- | ------------------ |
9 | | 0.4.x | :white_check_mark: |
10 | | 0.3.x | :x: |
11 | | 0.2.x | :x: |
12 | | 0.1.x | :x: |
13 |
14 | ## Reporting a Vulnerability
15 |
16 | If you find a vulnerability, simply [open an issue](../../issues/new) with the details, use the label `security`.
17 |
--------------------------------------------------------------------------------
/app/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "ignorePatterns": ["**/*{.,-}min.js"],
3 | "env": {
4 | "browser": true,
5 | "es2021": true,
6 | "node": true
7 | },
8 | "extends": [
9 | "airbnb-base",
10 | "prettier"
11 | ],
12 | "parser": "@typescript-eslint/parser",
13 | "parserOptions": {
14 | "ecmaVersion": 12,
15 | "sourceType": "module"
16 | },
17 | "plugins": [
18 | "@typescript-eslint",
19 | "prettier"
20 | ],
21 | "rules": {
22 | "prettier/prettier": ["error"]
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/.npmrc:
--------------------------------------------------------------------------------
1 | tag-version-prefix=""
2 |
--------------------------------------------------------------------------------
/app/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "printWidth": 100,
3 | "singleQuote": true
4 | }
--------------------------------------------------------------------------------
/app/.snyk:
--------------------------------------------------------------------------------
1 | # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
2 | version: v1.22.1
3 | ignore: {}
4 | patch: {}
5 |
--------------------------------------------------------------------------------
/app/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # Changelog
2 |
3 | All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4 |
5 | ## [0.5.0-pre-4](https://github.com/billchurch/webssh2/compare/webssh2-v0.4.7-pre-4...webssh2-v0.5.0-pre-4) (2022-08-07)
6 |
7 |
8 | ### Features
9 |
10 | * test change for release ([476b566](https://github.com/billchurch/webssh2/commit/476b566c08a84bd35aaccf847253875b2c3afb10))
11 |
12 | ## [0.4.7-pre-4](https://github.com/billchurch/webssh2/compare/webssh2-v0.4.7-pre-3...webssh2-v0.4.7-pre-4) (2022-08-03)
13 |
14 |
15 | ### Miscellaneous Chores
16 |
17 | * release 0.4.7-pre-4 ([7d4ba87](https://github.com/billchurch/webssh2/commit/7d4ba87bc1c198600ea33ee220553ef46ea2a103))
18 |
19 | ## [0.4.7-pre-3](https://github.com/billchurch/webssh2/compare/webssh2-v0.4.7-pre-2...webssh2-v0.4.7-pre-3) (2022-08-03)
20 |
21 |
22 | ### Miscellaneous Chores
23 |
24 | * release 0.4.7-pre-3 ([0c78c1f](https://github.com/billchurch/webssh2/commit/0c78c1f31cc6380b7f0706822fc418cfede11413))
25 |
26 | ## [0.4.7-pre-2](https://github.com/billchurch/webssh2/compare/webssh2-v0.4.6...webssh2-v0.4.7-pre-2) (2022-08-02)
27 |
28 |
29 | ### ⚠ BREAKING CHANGES
30 |
31 | * validate referer to /reauth is valid
32 | * bump xterm to 4.18.0
33 | * consistent logging messages see #286
34 | * config system changes #284 (#285)
35 |
36 | ### Features
37 |
38 | * add additional params for POST requests [#290](https://github.com/billchurch/webssh2/issues/290) ([46c1560](https://github.com/billchurch/webssh2/commit/46c1560e3c126376e18124e14e5c7fb8c029a0a1))
39 | * add additional vars to POST requests [#290](https://github.com/billchurch/webssh2/issues/290) ([0a4e419](https://github.com/billchurch/webssh2/commit/0a4e419fb371ae95340fa890497022a2aa9d063a))
40 | * add fontFamily, letterSpacing, lineHeight ([97f3088](https://github.com/billchurch/webssh2/commit/97f3088780744e13a6724a4967a4896aac3f20d8))
41 | * add fontSize option [#292](https://github.com/billchurch/webssh2/issues/292) ([5e78812](https://github.com/billchurch/webssh2/commit/5e788129744d326e78ec91bda86ed5cecfd70d3f))
42 | * config system changes [#284](https://github.com/billchurch/webssh2/issues/284) ([#285](https://github.com/billchurch/webssh2/issues/285)) ([9c99b09](https://github.com/billchurch/webssh2/commit/9c99b0940ec726193deae3c4999d25a297874d67))
43 | * consistent logging messages see [#286](https://github.com/billchurch/webssh2/issues/286) ([50cfcb9](https://github.com/billchurch/webssh2/commit/50cfcb97788cbd3409b4605adceef3d47e370e38))
44 | * credentials over http post for [#290](https://github.com/billchurch/webssh2/issues/290) ([5b8f88c](https://github.com/billchurch/webssh2/commit/5b8f88cfef1745c88748277217204e6c38c7ff7e))
45 | * reorder viewport setup at ssh handshake [#292](https://github.com/billchurch/webssh2/issues/292) ([140e1e2](https://github.com/billchurch/webssh2/commit/140e1e24b14d6b74848e9d250c2b44f806ad627d))
46 | * validate referer to /reauth is valid ([0dcaa6e](https://github.com/billchurch/webssh2/commit/0dcaa6e15062cdc3252ce52abd9057caf4c00a30))
47 |
48 |
49 | ### Bug Fixes
50 |
51 | * Fix the parameter passing problem of setDefaultCredentials to make it perform data initialization normally ([#288](https://github.com/billchurch/webssh2/issues/288)) ([40cbb35](https://github.com/billchurch/webssh2/commit/40cbb35616fa17c1c36520690f40ebce0b488153))
52 | * invalid css in style.css ([ffab534](https://github.com/billchurch/webssh2/commit/ffab5345dcb568fa2bb50a96f403174ad3728286))
53 |
54 |
55 | ### package
56 |
57 | * bump xterm to 4.18.0 ([84c09ec](https://github.com/billchurch/webssh2/commit/84c09ec8a1909e4bbd0051debdbb905276a4245e))
58 |
59 | ### [0.4.6](https://github.com/billchurch/WebSSH2/compare/v0.2.10-0...v0.4.6) (2022-04-17)
60 |
61 |
62 | ### Features
63 |
64 | * add SIGTERM to safe shutdown feature ([675b4f5](https://github.com/billchurch/WebSSH2/commit/675b4f5a3a92b187b620684eb1ce1b7afa0e2e08))
65 | * **auth:** ssh private key auth implemented via config.json ([#161](https://github.com/billchurch/WebSSH2/issues/161)) ([342df8e](https://github.com/billchurch/WebSSH2/commit/342df8eb9cafba52eb63b50a60e11e1431d6fbd4))
66 | * **config:** specify local source address and port for client connections fixes [#152](https://github.com/billchurch/WebSSH2/issues/152) ([#158](https://github.com/billchurch/WebSSH2/issues/158)) ([65d6ec6](https://github.com/billchurch/WebSSH2/commit/65d6ec68452b80c42fd62534355e456ce1f16a32))
67 | * CORS support ([b324f33](https://github.com/billchurch/WebSSH2/commit/b324f338adeb3518322941639fb83ba9370814cc)), closes [#240](https://github.com/billchurch/WebSSH2/issues/240)
68 |
69 |
70 | ### Bug Fixes
71 |
72 | * deprecated term.setOption ([d903da8](https://github.com/billchurch/WebSSH2/commit/d903da87c41882a3736683c7de497cb8bd37f885))
73 | * dockerignore ([#272](https://github.com/billchurch/WebSSH2/issues/272)) ([8a68cca](https://github.com/billchurch/WebSSH2/commit/8a68ccaffa374584b5d9531f9dbeae616bd971f5))
74 | * fixes default for allowreauth ([#239](https://github.com/billchurch/WebSSH2/issues/239)) ([dcfd81b](https://github.com/billchurch/WebSSH2/commit/dcfd81b454b9fe66edec489266dc35a765464c6b)), closes [#238](https://github.com/billchurch/WebSSH2/issues/238)
75 | * missing ENTRYPOINT for Dockerfile ([6a3a47a](https://github.com/billchurch/WebSSH2/commit/6a3a47a13de3cd70d603379a27e055f08a6ee62c))
76 | * obey host ssh.host in config fixes [#190](https://github.com/billchurch/WebSSH2/issues/190) ([7b7e8e7](https://github.com/billchurch/WebSSH2/commit/7b7e8e753358ed48f52eb9aa2fc359bf758f304b))
77 | * subnet unauthorized now emits "ssherror" which persists across websocket termination ([e796f9f](https://github.com/billchurch/WebSSH2/commit/e796f9fb5874d6557433f25e8976b7aa58fa8144))
78 | * update config.json.sample ([#177](https://github.com/billchurch/WebSSH2/issues/177)) ([42f973b](https://github.com/billchurch/WebSSH2/commit/42f973b4796f7f50237dc8ce613e477aa89352ca))
79 | * update read-config-ng to 3.0.5, fixes [#277](https://github.com/billchurch/WebSSH2/issues/277) ([3e82c0d](https://github.com/billchurch/WebSSH2/commit/3e82c0dc4d31d1c97a7cf98139ef8e6dc0213b22))
80 | * update xterm.js fixes [#261](https://github.com/billchurch/WebSSH2/issues/261) ([c801ef9](https://github.com/billchurch/WebSSH2/commit/c801ef9e5826e13a403a6462241cf8a4ff456d45))
81 |
82 | ## 0.4.5 [20220417]
83 | ### Fixes
84 | - update read-config-ng to 3.0.5, fixes [#277](../../issues/277)
85 | ## 0.4.5 [20220331]
86 | ### Fixes
87 | - Update socket.io to 4.2.0
88 | - Update read-config-ng to 3.0.4
89 |
90 | ## 0.4.4 [20211209]
91 | ### Fixes
92 | - Add ./node_modules to .dockerignore [#240](../../issues/240) thanks @UncleSamSwiss
93 | - validator to 13.7.0 [to mitigate potential Regular Expression Denial of Service (ReDoS)](https://snyk.io/vuln/SNYK-JS-VALIDATOR-1090600)
94 | - cidr-matcher should be [re-installed to pickup >json-schema@4.0.0 due to prototype pollution vulnerability](https://snyk.io/vuln/SNYK-JS-JSONSCHEMA-1920922)
95 | - Update xterm.js to 4.15.0 [#261](../../issues/261)
96 | - Replace deprecated term.setOptions with term.options
97 | ### Changes
98 | - update README.md for additional Docker methods thanks @Utopiah
99 |
100 | ## 0.4.3 [20211019]
101 | - update dependencies
102 | - ssh2 to 1.4.0 [to mitigate potential command injection in windows](https://snyk.io/vuln/SNYK-JS-SSH2-1656673)
103 | ## 0.4.2 [20210813]
104 | ### changes
105 | - update dependencies
106 | - socket.io to 4.1.1
107 | - read-config-ng to 3.0.2
108 | - debug to 4.3.1
109 | ## 0.4.1 [20210703]
110 | ### Fixes
111 | - lost comma in config.json.sample 71fe377
112 | ### Changes
113 | - bump ws@7.4.6 to [mitigate potential ReDoS vulnerability](https://github.com/websockets/ws/releases/tag/7.4.6)
114 | - dev: update CI tools
115 | - dev: update dev tools
116 | - dev: update build tools
117 |
118 | ## 0.4.0 [20210519]
119 | ### BREAKING
120 | - Disabled ssh.serverlog.client option, this disables the POC which allowed for logging of the data sent between the client/server to the console.log.
121 | - Dropping support for node versions under 14
122 | ### Changes
123 | - Removed HTML menu code from ./app/server/socket.js, the menu is now fully laid out in the ./app/client/src/index.html and the option elements are hidden by default. Not sure why it wasn't done this way from the start, but there it is.
124 | - Updated socket.io to v4.1.1
125 | - Client javascript `./app/client/src/js/index.ts` is now built on TypeScript (`npm run build` will generate javascript for client and place into `app/client/public/webssh2.bundle.js` as before)
126 | - Build environment changes
127 | - removed unused xterm-addon-search, xterm-addon-weblinks, standard, postcss-discard-comments
128 | - added prettier 2.3.0, typescript modules, socket.io-client 4.1.1, airbnb linting tools
129 | ### Added
130 | - Lookup ip address for hostname in URL, fixes #199 thanks to @zwiy
131 | - Ability to override `Authorization: Basic` header and replace with credentials specified in `config.json` fixes #243. New config.json option `user.overridebasic`
132 | ### CONTRIBUTING
133 | In this release, we're trying our best to conform to the [Airbnb Javascript Style Guide](https://airbnb.io/projects/javascript/). I'm hoping this will make contributions easier and keep the code readable. I love shortcuts more than anyone but I've found when making changes to code I've not looked at in a while, it can take me a few momements to deconstruct what was being done due to readbility issues. While I don't agree with every decision in the style guide (semi-colons, yuk), it is a good base to keep the code consistent.
134 |
135 | If you've not used it before, I recommend installing the [vscode extensions](https://blog.echobind.com/integrating-prettier-eslint-airbnb-style-guide-in-vscode-47f07b5d7d6a) for that and [Prettier](https://prettier.io/) and getting familiar. The autocorrections are great (especially if you hate dealing with semi-colons...)
136 |
137 | As of 0.4.0-testing-0, the client code is written in [TypeScript](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html). It's not that much different from JavaScript, and the introduction strong typing will ultimately help to produce better code. Eventually we want to move the whole project to TypeScript but that make take a bit more time. Take a moment to look at ./app/client/src/js/index.ts to see what TypeScript looks like.
138 | ## 0.3.1 [20210513]
139 | ### BREAKING
140 | - Ability to configure CORS settings for socket.io see [#240](../../issues/240) for more information on how this may break existing deployments. Default settings in example `config.json` are currently permissive `http.origins: ["*:*"]` please note that if a `config.json` is not present, the default is `http.origins: ["localhost:2222"]
141 | ### Added
142 | - Safe Shutdown Feature - thanks to @edgarogh
143 | - Sending SIGINT or SIGTERM to node process responsible for WebSSH2 or Docker process will result in a "safe" shutdown
144 | - Timer is configured in config.safeShutdownDuration
145 | - feat: Use docker build to create multi-arch images (#202)
146 | ### Fixed
147 | - obey host ssh.host in config fixes #190
148 | ### Changed
149 | - `config.json.sample`: `allowreauth` now defaults to `false` fixes #238
150 | - update ssh2 to 0.8.8 -> 0.8.9 - [comparison at ssh2 repo](https://github.com/mscdex/ssh2/compare/v0.8.8...v0.8.9)
151 | - update xterm to 4.12.0 [comparison at xtermjs repo](https://github.com/xtermjs/xterm.js/compare/4.4.0...4.12.0)
152 | - update read-config-ng to 3.0.2
153 | - update morgan to 1.10.0
154 | - update debug to 4.3.1
155 | - update express-session to 1.17.1
156 | - update validator to 13.6.0
157 | - development tools updates (build environment requires minimum of Node 10, only needed for customization)
158 | - update @fortawesome/fontawesome-svg-core to 1.2.35
159 | - update @fortawesome/free-solid-svg-icons to 5.15.3
160 | - update copy-webpack-plugin to 8.1.1
161 | - update cross-env to 7.0.3
162 | - update css-loader to 5.2.4
163 | - update file-loader to 6.2.0
164 | - update mini-css-extract-plugin to 1.6.0
165 | - update postcss-discard-comments to 5.0.0
166 | - update snazzy to 9.0.0
167 | - update standard to 16.0.3
168 | - update standard-version to 9.3.0
169 | - update style-loader to 2.0.0
170 | - update terser-webpack-plugin to 5.1.1
171 | - update url-loader to 4.1.1
172 | - update webpack to 5.37.0
173 | - update webpack-cli to 4.7.0
174 | - update webpack-merge to 5.7.3
175 | - update webpack-stream to 6.1.2
176 | - update xterm-addon-fit to 0.5.0
177 | - update xterm-addon-search to 0.8.0
178 | - update xterm-addon-web-links to 0.4.0
179 | - update ssri from 6.0.1 to 6.0.2 [#233](../../pull/233)
180 | - update hosted-git-info from 2.8.5 to 2.8.9 [#237](../../pull/237)
181 | - update lodash from 4.17.19 to 4.17.21 [#236](../../pull/236)
182 | - update handlebars from 4.7.6 to 4.7.7 [#235](../../pull/235)
183 | - update y18n from 4.0.0 to 4.0.1 [#230](../../pull/230)
184 | - update elliptic from 6.5.3 to 6.5.4 [#228](../../pull/222833)
185 | - update ini from 1.3.5 to 1.3.8 [#217](../../pull/217)
186 | ## 0.3.0 [20200315]
187 | 🍀🍀🍀
188 | ### Added
189 | - Add configuration option to restrict connections to specified subnets thanks to @Mierdin
190 | - favicon
191 | - added module `serve-favicon` to serve favicon from root if pre-fetched by browser
192 | - added `link rel=icon` line in client.htm to serve favico.ico out of /ssh/
193 |
194 | ### Changed
195 | - Using new repo for read-config -> read-config-ng-
196 | - removed express compression feature, added no real value.
197 | - module updates
198 | - ssh2 to 0.8.6 -> 0.8.8 - [comparison at ssh2 repo](https://github.com/mscdex/ssh2/compare/v0.8.6...v0.8.8)
199 | - xterm 4.2.0 -> 4.4.0 - [comparison at xtermjs repo](https://github.com/xtermjs/xterm.js/compare/4.2.0...4.4.0)
200 | - read-config-ng 3.0.1 - (taking over abandoned repo)n
201 | - development module updates (does not impact production, only for development and rebuilding)
202 | - fortawesome/fontawesome-svg-core 1.2.27
203 | - fortawesome/free-solid-svg-icons 5.12.1
204 | - standard-version 7.1.0
205 | - webpack 4.42.0
206 | - webpack-cli 3.3.11
207 | - terser-webpack-plugin 2.3.5
208 | - copy-webpack-plugin 5.1.1
209 | - cross-env 7.0.2
210 | - css-loader 3.4.2
211 | - file-loader 5.1.0
212 | - style-loader 1.1.3
213 | - url-loader 3.0.0
214 |
215 | ### Potentially Breaking Changes
216 | - Move all child resources to start from under /ssh
217 | - /socket.io -> /ssh/socket.io
218 | - /webssh2.css -> /ssh/webssh2.css
219 | - /webssh2.bundle.js -> /ssh/webssh2.bundle.js
220 | - /reauth -> /ssh/reauth
221 | - perhaps more
222 |
223 | ### Fixes
224 | - Typo in config.json.sample, thanks @wuchihsu, fixes #173
225 |
226 | ### Housekeeping
227 | - Removed irrelavant build scripts from /scripts
228 |
229 | ## 0.2.9 [2019-06-13]
230 | ### Changes
231 | - Missing require('fs') in `server/app.js` See issue [#135](../../issues/135)
232 | - Patched read-config to mitigate vulnerability in js-yaml
233 | - issue not exploitable on webssh2 implementation
234 | - patched anyway
235 | - sending my patch upstream to read-config, webssh2 package.json points to patched version in my repository https://github.com/billchurch/nodejs-read-config
236 | - See https://github.com/nodeca/js-yaml/issues/475 for more detail
237 |
238 | ## 0.2.8 [2019-05-25]
239 | ### Changes
240 | - Fixes issue if no password is entered, browser must be closed and restart to attempt to re-auth. See issue [#118](../../issues/118). Thanks @smilesm2 for the idea.
241 | - fixes broken `npm run (build|builddev)`
242 | - update font-awesome fonts to 5.6.3
243 | - update webpack and dependancies
244 | - update xterm to 3.8.0
245 |
246 | ### Fixes
247 | - ILX workspace may not always import properly due to symbolic links (specifically ./node_modules/.bin). This is removed from the ILX package
248 |
249 | ## 0.2.7 [2018-11-11]
250 | ### Changes
251 | - `config.reauth` was not respected if initial auth presented was incorrect, regardless of `reauth` setting in `config.json` reauth would always be attempted. fixes [#117](../../issues/117)
252 | - **BREAKING** moved app files to /app, this may be a breaking change
253 | - Updated dockerfile for new app path
254 | - Updated app dependancies
255 | - xterm v3.8.0
256 | - https://github.com/xtermjs/xterm.js/releases/tag/3.8.0
257 | - basic-auth v2.0.1
258 | - https://github.com/jshttp/basic-auth/releases/tag/v2.0.1
259 | - express v4.16.4
260 | - https://github.com/expressjs/express/releases/tag/4.16.4
261 | - validator v10.9.0
262 | - https://github.com/chriso/validator.js/releases/tag/10.9.0
263 | - Updated dev dependancies
264 | - snazzy v8.0.0
265 | - standard v12.0.1
266 | - uglifyjs-webpack-plugin v2.0.1
267 | - ajv v6.5.5
268 | - copy-webpack-plugin v4.6.0
269 | - css-loader v1.0.1
270 | - nodemon v1.18.6
271 | - postcss-discard-comments v4.0.1
272 | - snyk v1.108.2
273 | - url-loader v1.1.2
274 | - webpack v4.25.1
275 | - webpack-cli v3.1.2
276 |
277 | ## 0.2.6 [2018-11-09]
278 | ### Changes
279 | - Reauth didn't work if intial auth presented was incorrect, (see issue #112) fixed thanks @vvalchev
280 | - Update node version supported to >=6 (PR #115) thanks @perlun
281 | - Update packages
282 | - developer dependencies
283 |
284 | ## 0.2.5 [2018-09-11]
285 | ### Added
286 | - Reauth function thanks to @vbeskrovny and @vvalchev (9bbc116)
287 | - Controlled by `config.json` option `options.allowreauth` true presents reauth dialog and false hides dialog
288 |
289 | ### Changed
290 | - `options.challengeButton` enabled
291 | - previously this configuration option did nothing, this now enables the Credentials button site-wide regardless of the `allowreplay` header value
292 | - Updated debug module to v4
293 |
294 | ## 0.2.4 [2018-07-18]
295 | ### Added
296 | - Browser title window now changes with xterm escape sequences (see http://tldp.org/HOWTO/Xterm-Title-3.html)
297 | - Added bellStyle options
298 | - `GET var`: **bellStyle** - _string_ - Style of terminal bell: ("sound"|"none"). **Default:** "sound". **Enforced Values:** "sound "none"
299 | - `config.json`: **terminal.bellStyle** - _string_ - Style of terminal bell: (sound|none). **Default:** "sound".
300 | - `workspace` folder on GITHUB for BIG-IP specific fixes/changes
301 | ### Changed
302 | - Updated xterm.js to 3.1.0
303 | - https://github.com/xtermjs/xterm.js/releases/tag/3.1.0
304 | - Default listen IP in `config.json` changed back to 127.0.0.1
305 | ### Fixed
306 | - ESC]0; is now removed from log files when using the browser-side logging feature
307 |
308 | ## 0.2.3 unreleased
309 |
310 | ### Fixed
311 | - ESC]0; is now removed from log files when using the browser-side logging feature
312 |
313 | ## 0.2.0 [2018-02-10]
314 | Mostly client (browser) related changes in this release
315 |
316 | ### Added
317 | - Menu system
318 | - Fontawesome icons
319 | - Resizing browser window sends resize events to terminal container as well as SSH session (pty)
320 | - New terminal options (config.json as well as GET vars)
321 | - terminal.cursorBlink - boolean - Cursor blinks (true), does not (false) Default: true.
322 | - terminal.scrollback - integer - Lines in the scrollback buffer. Default: 10000.
323 | - terminal.tabStopWidth - integer - Tab stops at n characters Default: 8.
324 | - New serverside (nodejs) terminal configuration options (cursorBlink, scrollback, tabStopWidth)
325 | - Logging of MRH session (unassigned if not present)
326 | - Express compression feature
327 |
328 | ### Changed
329 | - Updated xterm.js to 3.0.2
330 | - See https://github.com/xtermjs/xterm.js/releases/tag/3.0.2
331 | - See https://github.com/xtermjs/xterm.js/releases/tag/3.0.1
332 | - See https://github.com/xtermjs/xterm.js/releases/tag/3.0.0
333 | - Moved javascript events out of html into javascript
334 | - Changed asset packaging from grunt to Webpack to be inline with xterm.js direction
335 | - Moved logging and credentials buttons to menu system
336 | - Removed non-minified options (if you need to disable minification, modify webpack scripts and 'npm run build')
337 |
338 | ### Fixed
339 | - Resolved loss of terminal foucs when interacting with option buttons (Logging, etc...)
340 |
341 | ## 0.1.4 [2018-01-30]
342 | ### Changed
343 | - Moved socket and util out of folders into .js in root.
344 | - added keepaliveInterval and keepaliveCountMax config options
345 |
346 | ## 0.1.3 [2017-09-28]
347 | ### Changed
348 | - Upgrade to debug@3.1 to eliminate ReDoS in %o formatter
349 | - Upgrade Express to 4.15.5 for ReDOS
350 | - Upgrade basic-auth to v2.0
351 | ## 0.1.2 [2017-07-31]
352 | ### Added
353 | - ssh.readyTimeout option in config.json (time in ms, default 20000, 20sec)
354 | ### Changed
355 | - Updated xterm.js to 2.9.2 from 2.6.0
356 | - See https://github.com/sourcelair/xterm.js/releases/tag/2.9.2
357 | - See https://github.com/sourcelair/xterm.js/releases/tag/2.9.1
358 | - See https://github.com/sourcelair/xterm.js/releases/tag/2.9.0
359 | - See https://github.com/sourcelair/xterm.js/releases/tag/2.8.1
360 | - See https://github.com/sourcelair/xterm.js/releases/tag/2.8.0
361 | - See https://github.com/sourcelair/xterm.js/releases/tag/2.7.0
362 | - Updated ssh2 to 0.5.5 to keep current, no fixes impacting WebSSH2
363 | - ssh-streams to 0.1.19 from 0.1.16
364 | - Updated validator.js to 8.0.0, no fixes impacting WebSSH2
365 | - https://github.com/chriso/validator.js/releases/tag/8.0.0
366 | - Updated Express to 4.15.4, no fixes impacting WebSSH2
367 | - https://github.com/expressjs/express/releases/tag/4.15.4
368 | - Updated Express-session to 1.15.5, no fixes impacting WebSSH2
369 | - https://github.com/expressjs/session/releases/tag/v1.15.5
370 | - Updated Debug to 3.0.0, no fixes impacting WebSSH2
371 | - https://github.com/visionmedia/debug/releases/tag/3.0.0
372 | - Running in strict mode ('use strict';)
373 |
374 |
375 | ## 0.1.1 [2017-06-03]
376 | ### Added
377 | - `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)
378 | - morgan express middleware for logging
379 | ### Changed
380 | - Updated socket.io to 1.7.4
381 | - continued refactoring, breaking up `index.js`
382 | - revised error handling methods
383 | - revised session termination methods
384 | ### Fixed
385 | ### Removed
386 | - color console decorations from `util/index.js`
387 | - SanatizeHeaders function from `util/index.js`
388 |
389 | ## 0.1.0 [2017-05-27]
390 | ### Added
391 | - This ChangeLog.md file
392 | - Support for UTF-8 characters (thanks @bara666)
393 | - Snyk, Bithound, Travis CI
394 | - Cross platform improvements (path mappings)
395 | - Session fixup between Express and Socket.io
396 | - Session secret settings in `config.json`
397 | - env variable `DEBUG=ssh2` will put the `ssh2` module into debug mode
398 | - env variable `DEBUG=WebSSH2` will output additional debug messages for functions
399 | and events in the application (not including the ssh2 module debug)
400 | - using Grunt to pull js and css source files from other modules `npm run build` to rebuild these if changed or updated.
401 | - `useminified` option in `config.json` to enable using minified client side javascript (true) defaults to false (non-minified)
402 | - sshterm= query option to specify TERM environment variable for host, valid strings are alpha-numeric with a hypen (validated). Otherwise the default ssh.term variable from `config.json` will be used.
403 | - validation for host (v4,v6,fqdn,hostname), port (integer 2-65535), and header (sanitized) from URL input
404 |
405 | ### Changed
406 | - error handling in public/client.js
407 | - moved socket.io operations to their own file /socket/index.js, more changes like this to come (./socket/index.js)
408 | - all session based variables are now under the req.session.ssh property or socket.request.ssh (./index.js)
409 | - moved SSH algorithms to `config.json` and defined as a session variable (..session.ssh.algorithms)
410 | -- prep for future feature to define algorithms in header or some other method to enable separate ciphers per host
411 | - 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.
412 | - combined all css files to a single css in `./public/webssh2.css`
413 | - minified all css files to a single css in `./public/webssh2.min.css`
414 | - copied all unmodified source css and js to /public/src/css and /public/src/js respectively (for troubleshooting/etc)
415 | - sourcemaps of all minified code (in /public/src and /public/src/js)
416 | - renamed `client.htm` to `client-full.htm`
417 | - created `client-min.htm` to serve minified javascript
418 | - 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.
419 |
420 | ### Fixed
421 | - 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.
422 | - ensure ssh session is closed when a browser disconnects from the websocket
423 | - if headerBackground is changed, status background is changed to the same color (typo, fixed)
424 |
425 | ### Removed
426 | - Express Static References directly to module source directories due to concatenating and minifying js/css
427 |
428 | ## 0.0.5 - [2017-03-23]
429 | ### Added
430 | - Added experimental support for logging (see Readme)
431 |
432 | ### Fixed
433 | - Terminal geometry now properly fills the browser screen and communicates this to the ssh session. Tested with IE 11 and recent versions of Chrome/Safari/Firefox.
434 |
435 | ## 0.0.4 - [2017-03-23]
436 | ### Added
437 | - Set default terminal to xterm-color
438 | - Mouse event support
439 | - New config option, config.ssh.term to set terminal
440 |
441 | ### Changed
442 | - Update to Xterm.js 2.4.0
443 | - Minor code formatting cleanup
444 |
445 | ## 0.0.3 - [2017-02-16]
446 | ### Changed
447 | - Update xterm to latest (2.3.0)
448 | ### Fixed
449 | - Fixed misspelled config.ssh.port property
450 |
451 | ## 0.0.2 - [2017-02-01]
452 | ### Changed
453 | - Moving terminal emulation to xterm.js
454 | - updating module version dependencies
455 |
456 | ### Fixed
457 | - Fixed issue with banners not being displayed properly from UNIX hosts when only lf is used
458 |
459 | ## 0.0.1 - [2016-06-28]
460 | ### Added
461 | - Initial proof of concept and release. For historical purposes only.
462 |
--------------------------------------------------------------------------------
/app/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Bill Church
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/app/bun.lockb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/billchurch/webssh2/9c0ba04b31e92b7ed20e5c3509b5cbcc5447f565/app/bun.lockb
--------------------------------------------------------------------------------
/app/client/public/client.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | WebSSH2
5 |
8 |
9 |
10 |
11 |
12 |
This is a test to demonstrate sending credentials over POST instead of requiring HTTP Basic. If you use this, be sure to secure the app/site with HTTPS!