DEV Community

Cover image for OPS://VPS-CLUSTER — A ~30MB Zero-Dependency VPS Ops, WebSSH, Real-Tunnel Proxy Benchmark & RBAC Token Panel
Han-maker-wp
Han-maker-wp

Posted on

OPS://VPS-CLUSTER — A ~30MB Zero-Dependency VPS Ops, WebSSH, Real-Tunnel Proxy Benchmark & RBAC Token Panel

Managing multiple VPS servers (Oracle, AWS, Vultr, Aliyun...) alongside self-hosted proxy nodes usually means juggling heavy dashboards that eat 300MB+ RAM, manually checking which node is fastest right now, switching terminal apps for SSH, and worrying every time you share node configs with family or friends because once leaked, you can't revoke individual access.

OPS://VPS-CLUSTER solves all of this in a single-file, zero-third-party-dependency Python 3 + SQLite3 control plane using ~30 MB RAM (~12 MB on managed agents) with zero external CDNs.

🔗 GitHub Repository (MIT License): https://github.com/Han-maker-wp/vps-ops-panel

Dashboard Overview
(All screenshots are captured from an isolated local demo environment using RFC 5737 documentation IPs and simulated telemetry.)


Key Highlights

  • Ultra-Lightweight & Zero External Dependencies: Pure Python 3 stdlib (server.py + agent.py, compatible down to Python 3.6 on managed hosts), SQLite3 WAL storage, pure Canvas charts, and locally hosted xterm.js.
  • RBAC Two-Tier Revocable Token Manager (Perfect for Sharing with Family & Friends):
    • super_admin: Full dashboard, VPS/proxy CRUD, WebSSH terminal, token lifecycle management, and manual benchmark sweeps.
    • viewer: Issue individual tokens with expiration dates, notes, usage counters, and QR codes for dynamic Clash/Mihomo/Base64 subscriptions bound to that token. Strictly blocked from WebSSH and admin APIs (HTTP 403). One click to disable or revoke immediately invalidates both browser sessions and client subscriptions (HTTP 401) without affecting anyone else!
  • Real-Time 5s Telemetry + 1-Click Node Onboarding:
    • Live CPU, memory, swap, disk IO, throughput, TCP probe, DNS, TLS cert expiry, kernel tuning (BBR / fq / initcwnd), and daemon health (xray, sing-box, hysteria-server, nginx, docker, etc.).
    • Add any VPS in the UI and copy a generated one-line curl ... | sudo bash onboarding script that installs the 5s agent, systemd service, WebSSH public key, and sysstat in under a minute.
    • Paste vless://, hysteria2://, hy2://, trojan://, ss://, or tuic:// URIs to auto-generate Clash/Mihomo YAML snippets and live subscriptions. Includes a pure-host preset (so regular servers never pollute proxy subscriptions) and a universal scripts/optimize_network.sh BBR/fq tuning script.
  • Ephemeral Real-Tunnel Benchmark Leaderboard + 6-Site Matrix + 7-Day Trends & Audit Logs:
    • Spawns mihomo on demand and terminates it immediately after each sweep (0 MB idle RAM), testing real end-to-end throughput (Mbps), net latency, jitter, and 6-site reachability (GitHub, Google, YouTube, X, ChatGPT, Gemini) + AI region unlock status.
    • 7D / 24H / 1H multi-metric trend charts plus proxy access activity logs, top domains, and WebSSH/admin audit trails.
  • Built-in Native WebSSH Terminal & Mobile-Responsive UI:
    • Switch between multiple VPS terminals in one click, run built-in quick ops commands, backed by dedicated ed25519 keys, one-click ssh-keyscan known_hosts sync, 30-min idle disconnect, and zero-overflow mobile layout.

RBAC Token Management

Real-Tunnel Leaderboard & 6-Site Matrix

WebSSH Terminal

7-Day Trends & Activity Audit


How It Works Under the Hood

  1. Push Telemetry (agent.py ~12 MB): Reads /proc/stat, /proc/meminfo, /proc/diskstats, /proc/net/dev, and systemctl, pushing JSON snapshots every 5s over HTTP POST (/api/report) authenticated with AGENT_TOKEN — zero inbound monitoring ports required on managed hosts.
  2. Single-File Control Plane (server.py ~30 MB): Built on Python's ThreadingHTTPServer + SQLite3 WAL with 7-day daily rollups and audit logs — no MySQL, Redis, or Prometheus stack.
  3. Zero-Idle-RAM Ephemeral Benchmarking: Generates a temporary probe config, starts mihomo-probe, tests each proxy via its local Controller API, subtracts control-plane-to-host RTT to estimate true net latency, computes a 0–100 composite score, writes to SQLite, and immediately kills the probe process.
  4. Pure-Stdlib RFC 6455 WebSSH: Implements WebSocket handshake and framing from scratch in Python, enforces super_admin RBAC, spawns native ssh via pty.fork() with TIOCSWINSZ resize support, and bridges PTY I/O directly to locally hosted xterm.js.

Quick Deployment (3 Ways)

1. Run Locally in 10 Seconds (No Docker, No pip, No root)

git clone https://github.com/Han-maker-wp/vps-ops-panel.git
cd vps-ops-panel
./start.sh   # Windows: start.bat
Enter fullscreen mode Exit fullscreen mode

2. Docker Compose (Includes WebSSH + QR + Mihomo)

git clone https://github.com/Han-maker-wp/vps-ops-panel.git
cd vps-ops-panel
cp .env.example .env
docker compose up -d --build
docker compose logs -f vps-ops-panel
Enter fullscreen mode Exit fullscreen mode

3. Linux VPS Production One-Liner (systemd)

curl -fsSL https://raw.githubusercontent.com/Han-maker-wp/vps-ops-panel/main/install.sh | sudo bash -s -- --port 8080 --with-mihomo
Enter fullscreen mode Exit fullscreen mode

One-Click AI Agent Deployment Prompt

Copy and paste this prompt directly to Claude Code, Cursor, Codex, or Antigravity:

Please deploy the open-source project OPS://VPS-CLUSTER (https://github.com/Han-maker-wp/vps-ops-panel):
1. Detect whether the target is a local machine or a Linux VPS, check Python 3 / Docker / Caddy / Nginx and port 8080 availability.
2. On a Linux VPS, run the official installer with real-tunnel benchmarking enabled:
   curl -fsSL https://raw.githubusercontent.com/Han-maker-wp/vps-ops-panel/main/install.sh | sudo bash -s -- --port 8080 --with-mihomo
   For containerized setups, configure .env and run `docker compose up -d --build`. For local testing, run `./start.sh`.
3. If I provide a domain, configure Caddy or Nginx HTTPS reverse proxy to 127.0.0.1:8080 with WebSocket upgrade headers enabled for `/ws/ssh`, update MONITOR_PUBLIC_URL, and restart the service.
4. Verify `http://127.0.0.1:8080/healthz` and return the panel URL, the generated super_admin login link, and steps to onboard additional VPS nodes and issue revocable viewer tokens.
Enter fullscreen mode Exit fullscreen mode

GitHub: https://github.com/Han-maker-wp/vps-ops-panel

MIT Licensed — if you manage multiple VPS servers or want safe, revocable sharing with family and friends, give it a try and a Star ⭐!

Top comments (0)