Files
webui4frpc/deploy/README.md

47 lines
1.7 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.

# webui4frpc Docker 集群演示
一键起一套 **frps + backend + 3×webui4frpc 节点**node-a 种子node-b/c 通过 `-peer` 加入并自动从邻居拉取 frpc 二进制)。
## 前置
- Docker 可用(无需 build用宿主编译产物挂载进容器
- 宿主机有 `/home/jianf/Program/frp/bin/{frpc,frps}`(或设置 `FRP=` 指向别的目录)
## 启动/停止
```bash
cd deploy
go build -o artifacts/webui4frpc ../cmd/webui4frpc # 首次/改代码后重建
go build -o artifacts/backend ./demo-backend
bash run-cluster.sh # 启动集群
bash run-cluster.sh stop # 停止
```
## 拓扑
```
┌──────────┐ ┌───────────────────────┐
│ w4f-frps │◄───│ node-a (7501, 种子) │
tunnel: │ 7000/7080/18081 ├── node-b (7502, peer a)│
http://127.0.0.1:18081 └──────────┘ └── node-c (7503, peer b)│
▼ └───────────────────────┘
w4f-backend (8080) ← frpc 转发
```
## 演示点
- **M6 二进制分发**node-a 预置 `bin/frpc-0.70.1/frpc`node-b/c 无 frpc入网后自动向邻居拉取并落盘缓存
- **M3 状态**node-a 配置 `adminPort`,状态页显示真实 per-proxy 状态running
- **隧道**node-a 画布 local=backend:8080 × remote=frps1frpc worker 启动后经 frps:18081 访问 backend
## 验证
```bash
# 二进制分发
curl -s -u admin:admin123 http://127.0.0.1:7502/api/manager/cluster/nodes
# 隧道
curl http://127.0.0.1:18081/ # -> hello from w4f demo backend
# 代理状态
curl -s -u admin:admin123 http://127.0.0.1:17401/api/status
```