Files
pikasTech-HWLAB/docs/reference/spec-v02-frpc.md
T
2026-05-28 20:57:22 +08:00

50 lines
2.4 KiB
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.
# v0.2 FRP 公网入口规格
`hwlab-v02-frpc` 是 v02 的 FRP client Deployment,连接 master server 上稳定外部 `frps`,把 `hwlab-v02` 内部服务发布为 `19666/19667`
## 在系统中的职责划分
-`hwlab-cloud-web:8080` 暴露为 `http://74.48.78.17:19666/`
-`hwlab-edge-proxy:6667` 暴露为 `http://74.48.78.17:19667/`
- 只承载 v02 公网入口,不复用或改义 DEV `17666/17667`、PROD `18666/18667`
- master `frps` allowPorts 是外部稳定服务配置;缺失时修 master-side frps,不改 v02 Service 或 DEV/PROD GitOps。
## 内部架构
- `ConfigMap/hwlab-v02-frpc-config` 保存 `frpc.toml`,包含两个 TCP proxy`hwlab-v02-cloud-web``hwlab-v02-edge-proxy`
- `Deployment/hwlab-v02-frpc` 使用外部镜像 `fatedier/frpc:v0.68.1`,只挂载 config,不保存 Secret。
- master `frps` 监听 `74.48.78.17:7000`,必须允许 remotePort `19666``19667`
## API 接口说明
| 接口 | 说明 |
| --- | --- |
| TCP `74.48.78.17:19666` | FRP 转发到 `hwlab-cloud-web.hwlab-v02.svc.cluster.local:8080`。 |
| TCP `74.48.78.17:19667` | FRP 转发到 `hwlab-edge-proxy.hwlab-v02.svc.cluster.local:6667`。 |
| frpc logs | 判断 `login to server success``start proxy success``port not allowed`。 |
## 测试规格
## T1
阅读 docs/reference/spec-v02-frpc.md,然后用 cli 手动测试以下内容:访问 `http://74.48.78.17:19666/``http://74.48.78.17:19667/health/live`,确认分别到 v02 cloud-web 和 v02 cloud-api。
## T2
阅读 docs/reference/spec-v02-frpc.md,然后用 cli 手动测试以下内容:读取 `hwlab-v02-frpc` logs,确认没有 `port not allowed`;若出现该错误,只修 master frps allowlist 并重启 frps。
## T3
阅读 docs/reference/spec-v02-frpc.md,然后用 cli 手动测试以下内容:修复或验证 v02 FRP 后,同时验证 DEV `17666/17667` 仍可用,不能把 DEV/PROD 入口当成 v02 证据。
## 规格的实现情况
| 规格项 | 状态 | 说明 |
| --- | --- | --- |
| v02 web/API 端口 | 已实现 | `19666/19667` 在 frpc config 中固定。 |
| 外部 frpc 镜像 | 已实现 | 使用 `fatedier/frpc:v0.68.1`。 |
| master frps allowlist 依赖 | 已实现/外部维护 | 由 master-side frps 配置控制。 |
| HTTP health endpoint | 不适用 | frpc 本身不提供 HWLAB HTTP health。 |
| 自动 frps 配置 GitOps | 未实现 | master frps 仍是边缘运维对象。 |