Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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) |

Expand All @@ -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 `<noscript>` reload if scripting is off |
Expand Down Expand Up @@ -441,7 +449,7 @@ ponte install # 注册开机自启 + 崩溃重启
| `check [--profile NAME]` | 检查隧道端口(`-R` 在服务器上,`-L`/`-D` 在本机) |
| `doctor [--offline] [--timeout S] [--json]` | 一键体检配置、密钥、连通性、端口、自启与通知,每项给出修法(`--json` 供脚本消费) |
| `notify-test [--profile NAME]` | 通过已配置的 ntfy / webhook 通道发一条测试通知 |
| `serve [--host H] [--port P] [--token T] [--open]` | 本地 HTTP 看板、`/healthz` 探活、Prometheus `/metrics`、`/status.json` 快照 |
| `serve [--host H] [--port P] [--token T] [--open] [--demo]` | 本地 HTTP 看板、`/healthz` 探活、Prometheus `/metrics`、`/status.json` 快照;`--demo` 用内置示例数据 |
| `install` / `uninstall` | 注册 / 移除开机自启服务 |
| `config [--ssh-command]` | 打印生效配置、来源文件与配置告警(`--ssh-command` 打印实际执行的 ssh 命令) |

Expand All @@ -460,6 +468,12 @@ ponte serve # http://127.0.0.1:8787/(默认只监听本机)
ponte serve --open # 顺手在浏览器里打开
```

**还没有隧道?** `ponte serve --demo` 用内置的示例数据把同一个服务跑起来:一份自己会
连接、断线、退避、重连的小时间轴,于是页面上该有的状态都会出现——健康、异常,以及
**未知**(探针没能得出结论)。它不读配置、也不碰守护进程;payload(`"demo": true`)、
页面头部与命令行输出三处都写明这是演示数据:看板截图里写着服务器地址与端口,它不该被
误读成某个人的真实基础设施。示例主机名一律用 `example.com`。

| 接口 | 回答什么问题 |
|------|--------------|
| `/` | 看板:一行一条隧道——状态、目标与跳板机、端口 chips、会话时长、在线率、上次断线原因;点开该行看完整统计与事件流。跟随浅色/深色主题,原地刷新(展开的行与滚动位置都不会丢),关掉脚本则退化为整页刷新 |
Expand Down
Loading
Loading