Git Product home page Git Product logo

webssh's Introduction

WebSSH

这是一个基于Web的终端仿真器和SSH客户端的示例,使用Express框架搭建服务器,并使用NodeSSH代理到SSH服务器的Websocket连接。

cover cover2 cover3

功能

[✓] 支持IP登录

[✗] 支持地址栏传参进行登录

[✗] 后期规划是否需要支持密钥登录

[✗] 支持多tab窗口,可以随时开启和关闭多个会话窗口

[✓] 可以保存主机连接信息

[✓] 支持vim,mc,irssi,vifm,top语法

[✓] 支持复制和粘贴操作

[✓] 窗口自适应

[✗] 操作录像

[✓] 心跳重连

[✗] More...

前置要求

Node

node 需要 ^16 || ^18 || ^19 版本(node >= 14 需要安装 fetch polyfill),使用 nvm 可管理本地多个 node 版本

node -v

PNPM

如果你没有安装过 pnpm

npm install pnpm -g

构建

执行如下命令下载依赖并构建前端:

pnpm install && pnpm run build

如需构建 Docker 镜像,可以继续执行以下命令:

docker build --tag webssh:dev .

Note:必须先构建前端后再构建 Docker 镜像,此举是为了减少安装 WebPack 导致的镜像体积增加。

启动

构建完成后,在项目根目录执行以下命令启动服务端:

node server/app

启动后访问 http://127.0.0.1:8080 即可。

Docker compose

Hub 地址

version: '3'

services:
  app:
    image: yorlg/webssh # 总是使用 latest ,更新时重新 pull 该 tag 镜像即可
    ports:
      -    8080:8080

参与贡献

感谢所有做过贡献的人!

License

MIT © Yorlg

webssh's People

Contributors

dependabot[bot] avatar lamgc avatar yorlg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

webssh's Issues

浏览器侧需要反映 SSH 连接的部分情况。

在 SSH 连接过程中会出现一些情况,网页需要对这些情况做出反映(比如弹出提示框):

  • SSH 连接失败 - 认证失败;
  • SSH 连接失败 - 网络原因
  • 与 WebSSH 后端的连接丢失
    • 进行重连
    • 无法重连
  • SSH 已结束(用户登出)(可能要检测 SSH 状态?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.