mirror of
https://gitcode.com/JianFeeeee/webui4frpc.git
synced 2026-09-20 17:07:57 +00:00
feat: docker cluster demo (frps+3 nodes, M6 auto binary pull, tunnel e2e) + fix SelfAddr/W4F_HOST/bootstrap retry, -frpc flag
This commit is contained in:
46
deploy/README.md
Normal file
46
deploy/README.md
Normal file
@ -0,0 +1,46 @@
|
||||
# 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=frps1,frpc 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
|
||||
```
|
||||
Reference in New Issue
Block a user