Add admin dashboard at / with bearer-token overview API

This commit is contained in:
2026-10-25 15:12:33 +08:00
parent 4acf226455
commit f5fcdd7bbb
9 changed files with 545 additions and 10 deletions
+3
View File
@@ -30,6 +30,9 @@ what we take vs. skip). Never vendor it into the build.
checked before auth (404 before 401), body JSON syntax before everything
- `internal/server/bridge.go` — WebSocket bridge sessions: attach, route
claiming (one owner per route), heartbeats, idle retirement, visitor pumps
- `internal/server/admin.go` + `dashboard.html` — the admin dashboard served
at `/` (embedded HTML, no build step) and `GET /api/admin/overview`, both
behind the `ADMIN_TOKEN` bearer token (503 when unset, 401 when wrong)
- `internal/server/relay.go` — public TLS listener: parses the ClientHello,
terminates the domain itself, passes tunnel hostnames to bridges untouched