JSPM

cserver-dashboard

1.1.0
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 12
    • Score
      100M100P100Q50047F
    • License MIT

    SSH proxy dashboard - monitor, file manage and terminal for remote servers

    Package Exports

      This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cserver-dashboard) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

      Readme

      CServer

      轻量级 SSH 代理看板,通过一行命令连接远程服务器,在浏览器中实时监控、管理文件和操作终端。

      功能

      • 实时监控 — CPU、内存、磁盘、负载、GPU 使用情况,自动刷新
      • 文件管理 — 浏览远程目录、创建文件/文件夹、删除、复制路径
      • 远程终端 — 基于 xterm.js 的 Web 终端,支持多标签、可重命名
      • 本地终端 — 同时支持本地 shell,方便对比操作
      • 一键启动 — 一条命令连接服务器并自动打开 Web 看板

      安装

      方式一:通过 npm 安装(推荐)

      npm install -g cserver-dashboard

      方式二:通过 GitHub 安装

      npm install -g github:XiaoLi-XiaoTian/cserver

      方式三:从源码安装

      git clone https://github.com/XiaoLi-XiaoTian/cserver.git
      cd cserver
      npm install
      npm link

      使用

      # 使用 SSH config 别名
      cserver 'ssh a100-4'
      
      # 使用完整 SSH 命令
      cserver 'ssh user@192.168.1.100'
      
      # 指定 SSH 端口
      cserver 'ssh -p 2222 user@host'
      
      # 指定密钥文件
      cserver 'ssh -i ~/.ssh/mykey user@host'
      
      # 指定本地服务端口(默认随机)
      cserver -p 8080 'ssh myserver'

      启动后自动打开浏览器,在 Web 看板中操作。

      退出

      • Ctrl+CCtrl+Z — 优雅退出,自动清理所有连接
      • 关闭终端窗口 — 同样会自动清理

      看板说明

      区域 功能
      顶部导航栏 连接状态、服务器信息(含别名)
      监控面板 CPU / 内存 / 磁盘 / 负载(1m/5m/15m)/ GPU(自动检测)
      左侧文件面板 浏览目录、新建文件/文件夹、删除、复制路径
      右侧终端面板 远程/本地终端,多标签,双击标签可重命名

      技术栈

      • CLI: Node.js + Commander.js
      • 后端: Express + WebSocket (ws) + ssh2
      • 前端: 原生 HTML/CSS/JS + xterm.js (CDN)

      项目结构

      cserver/
      ├── package.json
      ├── bin/cserver.js          # CLI 入口
      ├── server/
      │   ├── index.js            # Express + WebSocket 服务
      │   ├── ssh-manager.js      # SSH 连接管理
      │   ├── monitor.js          # 监控数据采集
      │   ├── file-manager.js     # SFTP 文件管理
      │   └── terminal.js         # 终端会话管理
      └── web/
          ├── index.html
          ├── style.css
          └── app.js

      环境要求

      • Node.js >= 18
      • Python 3(本地终端需要)
      • 目标服务器支持 SSH 密钥认证

      License

      MIT