This commit is contained in:
@@ -93,7 +93,7 @@ image, repository, log, or general backup.
|
||||
|
||||
### Local Web Console
|
||||
|
||||
The Host Agent can optionally serve a small local-only web console on the
|
||||
The Host Agent always serves a small local-only web console on the
|
||||
edge machine: heartbeat/enrollment status, registered local devices, current
|
||||
assignment progress, local device add/edit/remove, a local account password
|
||||
change, and recent assignment/heartbeat history. It authenticates with the
|
||||
@@ -101,7 +101,6 @@ same local account created by `device-host-agent setup` above — there is no
|
||||
separate console credential.
|
||||
|
||||
```text
|
||||
HOST_AGENT_CONSOLE_ENABLED=false
|
||||
HOST_AGENT_CONSOLE_BIND_HOST=127.0.0.1
|
||||
HOST_AGENT_CONSOLE_PORT=8765
|
||||
HOST_AGENT_CONSOLE_ALLOW_NON_LOOPBACK=false
|
||||
@@ -109,8 +108,8 @@ HOST_AGENT_CONSOLE_SESSION_TTL_SECONDS=43200
|
||||
HOST_AGENT_CONSOLE_HISTORY_LIMIT=200
|
||||
```
|
||||
|
||||
- `HOST_AGENT_CONSOLE_ENABLED` — starts the console when `true`; disabled by
|
||||
default, so existing deployments see no new listening port.
|
||||
- The Console starts with every Host Agent and binds to `127.0.0.1:8765` by
|
||||
default.
|
||||
- `HOST_AGENT_CONSOLE_BIND_HOST` — the address the console binds to; defaults
|
||||
to loopback-only.
|
||||
- `HOST_AGENT_CONSOLE_PORT` — the TCP port the console listens on.
|
||||
|
||||
@@ -392,22 +392,16 @@ uv run --package device-host-agent device-host-agent
|
||||
|
||||
首次启动顺序为:持久化候选 Host secret、向云端换取 `host_id`、为每个本地设备
|
||||
换取 `device_id`、保存映射、连接 WDA、发送 heartbeat、开始 long-poll 领取任务。
|
||||
Host Agent 不监听入站端口。必须保留并保护 `tasks/host_identity.json` 和
|
||||
Host Agent 会在本机回环地址提供 Console。必须保留并保护 `tasks/host_identity.json` 和
|
||||
`tasks/device_config.sqlite3`;前者等同于 Host bearer credential。
|
||||
|
||||
直接注册意味着任何能访问该云端地址的设备都能自行注册成为 Host,没有审批环节,
|
||||
也没有限流保护;这一取舍依赖网络边界(防火墙/反向代理)而非应用层限制。
|
||||
|
||||
### 启用本地 Web Console(可选)
|
||||
### 使用本地 Web Console
|
||||
|
||||
Host Agent 内置一个默认关闭的本地 Web Console,用于在这台 Mac 上直接查看和管理
|
||||
正在运行的 Host,无需 SSH 进去读原始状态文件。启用时追加环境变量后再启动:
|
||||
|
||||
```bash
|
||||
export HOST_AGENT_CONSOLE_ENABLED="true"
|
||||
|
||||
uv run --package device-host-agent device-host-agent
|
||||
```
|
||||
Host Agent 启动时会同时启动本地 Web Console,用于在这台 Mac 上直接查看和管理
|
||||
正在运行的 Host,无需 SSH 进去读原始状态文件。
|
||||
|
||||
不要修改 `HOST_AGENT_CONSOLE_BIND_HOST`,保持默认回环地址 `127.0.0.1`;Console
|
||||
启动后在同一台 Mac 上打开:
|
||||
|
||||
Reference in New Issue
Block a user