Files
AndroidDeviceStreaming/server/README.md
T

13 lines
701 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ads-server(Go 公网服务器)
入口:`main.go`。独立构建:`go build -o ads-server .`。
- 配置:环境变量 `ADS_AGENT_TOKEN`、`ADS_CLIENT_TOKEN`,要求不同且各至少 32 字符。
- 默认监听:`127.0.0.1:8080`,用 `--listen` 修改。
- TLS:反向代理或 `--tls-cert` 与 `--tls-key`;公网必须使用有效证书。
- 路由:`/healthz`、`/v1/agent`、`/v1/devices`、`/v1/lease`、`/v1/connect`、`/v1/data`。
- 状态存内存;一个 ID 对应一个在线 agent,一个设备对应一个独占租约。
- Ctrl+C / SIGTERM 关闭控制与数据连接;两端支持重连。
部署、令牌配置和三端完整命令见项目根目录 `README.md`。