diff --git a/CHANGELOG.md b/CHANGELOG.md index 57b6f05..e9b4484 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -199,6 +199,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- **`ponte serve --demo` serves the dashboard on built-in sample data.** The page + names your servers, users and ports, so the only ways to look at it without a + tunnel were to run it against real infrastructure or to hand-write a status + file — and a hand-written one drifts from the payload contract while looking + exactly like the real thing. `--demo` reads no config and never touches a + daemon: it drives a small deterministic timeline that connects, drops, backs + off and reconnects on its own, so the page shows every state it can render — + healthy, broken, and *unknown* (a probe that could not answer, where the ports + read `未观测` rather than `未监听`). It labels itself in three places — + `"demo": true` in `/status.json`, a `演示数据` pill and a footer note on the + page, and a yellow line on the terminal — because a dashboard screenshot must + not be mistakable for somebody's real infrastructure. Sample hosts are + `example.com`. The bind rules are unchanged: a non-loopback `--host` still + demands a token. - **The jump chain is part of the status, next to the destination.** `ProfileStatus.jump` carries the `ssh -J` value, so `ponte status --json` and the dashboard can tell "cannot reach the server" apart from "cannot reach the diff --git a/README.md b/README.md index ca19dc4..0b7548f 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ import package stay `ponte`; a checkout installs the same way (`pipx install .`) | `check [--profile NAME]` | verify tunnel ports are listening (`-R` on the server, `-L`/`-D` locally) | | `doctor [--offline] [--timeout S] [--json]` | one-shot checkup of config, key, connectivity, ports, auto-start and notifications, each row with a fix (`--json` for scripts) | | `notify-test [--profile NAME]` | send a test alert through the configured ntfy / webhook channels | -| `serve [--host H] [--port P] [--token T] [--open]` | local HTTP dashboard, `/healthz` probe, Prometheus `/metrics`, `/status.json` snapshot | +| `serve [--host H] [--port P] [--token T] [--open] [--demo]` | local HTTP dashboard, `/healthz` probe, Prometheus `/metrics`, `/status.json` snapshot; `--demo` serves built-in sample data | | `install` / `uninstall` | register / remove the OS auto-start service | | `config [--ssh-command]` | print the effective configuration, its source file and any warnings (`--ssh-command` prints the exact `ssh` argv) | @@ -140,6 +140,14 @@ ponte serve # http://127.0.0.1:8787/ (loopback only by default) ponte serve --open # ...and open it in your browser ``` +**No tunnels yet?** `ponte serve --demo` runs the same server on built-in sample +data: a small timeline that connects, drops, backs off and reconnects on its own, +so the page shows every state it has — healthy, broken, and *unknown* (a probe +that could not answer). It reads no config and never touches a daemon, and the +payload (`"demo": true`), the page header and the CLI output all say the data is +a demo: a dashboard screenshot names your servers, so it must not be mistakable +for somebody's real infrastructure. Sample hosts use `example.com`. + | Endpoint | What it answers | |----------|-----------------| | `/` | the dashboard: one row per tunnel — verdict, destination and jump chain, forwarded ports as chips, session age, availability, last disconnect reason; click a row for the full statistics and the event feed. Light and dark, refreshed in place (expanded rows and scroll position survive), and a `