Files
kit-busrouter/hub
kitadmin c8bb08ed35 feat: fleet hub dashboard + /api/fleet endpoint with direct access links
server.py:
- GET / serves dashboard.html (dark-themed fleet console)
- GET /api/fleet returns all registered devices with tunnel status,
  SSH commands, and web dashboard access instructions
- Static file serving via serve_file()

dashboard.html:
- Shows all registered devices from port-registry.json
- Live tunnel status (port-open check on VPS)
- Platform badges (Synology vs GL-XE3000)
- Copy-to-clipboard SSH commands per device
- Web dashboard access via SSH port-forwarding instructions
- Auto-refreshes every 15s

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 16:11:10 +00:00
..

Busfleet Hub

Registration endpoint for kit-connect devices. Runs on the VPS at 162.243.83.36:8080.

Files

  • register.sh — Called per-device. Assigns a tunnel port from pool 2230-2299, records it in port-registry.json, returns JSON.
  • server.py — Minimal Python HTTP server. Routes GET /api/register/<DEVICE_ID>register.sh.
  • port-registry.json — Persistent device→port mapping.

Deploy

scp hub/register.sh hub/server.py root@162.243.83.36:/opt/busfleet-hub/
ssh root@162.243.83.36 systemctl restart busfleet-hub

API

GET /api/register/<DEVICE_ID>

Response (existing device):

{"device_id": "x5925", "tunnel_port": 2230, "tailscale_auth_key": "tskey-auth-...", "status": "existing"}

Response (new device):

{"device_id": "x9999", "tunnel_port": 2231, "tailscale_auth_key": "tskey-auth-...", "status": "new"}

Port Pool

22302299. Already assigned:

  • x4078: 2226 (grandfathered)
  • x5925: 2230