mirror of
https://gitcode.com/JianFeeeee/webui4frpc.git
synced 2026-09-20 08:57:55 +00:00
- 主题: sakura×frost 玻璃拟态 (theme.css) + SCSS 变量重映射 - 侧栏: 玻璃侧栏 246px + 渐变品牌区 + 面包屑导航 - 状态页: 玻璃 KPI 卡 + 远程节点/本地服务卡片网格 - 集群页: 英雄玻璃卡 + 横向环拓扑链 + 待办命令/活跃拓扑/日志区 - 令牌环: 新增 lastSync 上次同步时间替代周期计数 - 模拟 frps: frps2/frps3 容器 + test-forward.sh 全链路验证脚本 - 修复: BinaryPath 空导致 worker 不启动, 撤销仅撤第一个 link, 任务复活风暴 (published 追踪)
34 lines
1.3 KiB
Bash
Executable File
34 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Start (or restart) just the mock frps2/frps3 containers on the demo network,
|
|
# leaving the rest of the cluster untouched. Used by test-forward.sh and when
|
|
# the cluster is already running but the mock frps nodes are not.
|
|
set -euo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
FRP=${FRP:-/home/jianf/Program/frp/bin}
|
|
NET=${W4F_NET:-w4f-demo}
|
|
|
|
# detect which network the existing nodes live on (compose uses "w4f")
|
|
if docker inspect w4f-node-a >/dev/null 2>&1; then
|
|
NET=$(docker inspect -f '{{range $k,$v := .NetworkSettings.Networks}}{{$k}}{{end}}' w4f-node-a 2>/dev/null || echo "$NET")
|
|
fi
|
|
|
|
start_one() {
|
|
local name="$1" alias="$2" cfg="$3" bp="$4" vp="$5"
|
|
docker rm -f "$name" >/dev/null 2>&1 || true
|
|
docker run -d --name "$name" --user "$(id -u):$(id -g)" \
|
|
--network "$NET" --network-alias "$alias" \
|
|
-p "$bp:$bp" -p "$vp:$vp" \
|
|
-v "$FRP/frps:/app/frps:ro" -v "$PWD/$cfg:/app/frps.toml:ro" \
|
|
--restart unless-stopped --entrypoint /app/frps \
|
|
debian:bookworm-slim -c /app/frps.toml >/dev/null
|
|
echo " $name up ($alias, bindPort $bp, vhost $vp) on network $NET"
|
|
}
|
|
|
|
echo "== starting mock frps nodes on network $NET =="
|
|
start_one w4f-frps2 frps2 frps2.toml 7001 7081
|
|
start_one w4f-frps3 frps3 frps3.toml 7002 7082
|
|
|
|
echo "== mock frps nodes up =="
|
|
docker ps --filter "name=w4f-frps" --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
|