88b862b515
fix: 首页本地服务只显示 localOnly 转发, 集群转发不再误报为本地服务
...
- handleStatus 的 localStatuses 遍历所有 locals 时跳过非 localOnly,
集群转发只出现在活跃转发卡区 (per-remote 时代的残留逻辑)
- gofmt 格式化 topoKey 定义
- 同步 dist (含 ⚙/⊕ emoji 变体选择器修复)
2026-08-24 16:13:59 +08:00
e3a978888a
feat: per-forward worker 模型 — 每条转发独立 frpc 配置+独立进程
...
核心改动(ring 协议不变,Task 本来就是 {Local,Remote,Link} 三元组):
- process.WorkerKey: worker 键改为 'local~remote~port' 三元组
- renderForward: 每条 forward 渲染只含 1 个 proxy 的独立 frpc 配置
(替代 renderRemote 把该 remote 全部 forwards 塞进一个进程)
- ClaimFn/RevokeFn: 认领/撤销只操作这一条 forward 自己的进程
- SyncWorkers/auto-start: 只拉起 localOnly 转发的独立进程,
集群转发由 ring 认领节点拉起 (消除三台争抢 proxy already exists)
- RemoteStatus/StartRemote/StopRemote/RestartRemote: remote 级聚合辅助,
保持 /profiles API 形状不变, 前端零改动
- handleStatus/logs: 按 worker key 解析真实 remote 名
效果: 三台节点的 frpc 各自只注册自己拥有的 proxy, 单条转发故障不再波及兄弟
2026-08-24 01:42:58 +08:00
2292ee7f3a
fix: 完善同事未完成的修改 — LAN 地址检测/画布删除撤销/连线删除按钮/Del 键/注释修正
...
- cmd/webui4frpc/main.go: 新增 primaryLANIPv4() 检测内网 LAN 地址,
解决三台内网主机间集群发现失败 (reachableAddr 只回退到 hostname)
- internal/httpapi/handlers.go: applyCanvas 新增拓扑差异检测,
画布删除连线时自动 RevokeTask 避免集群残留
- web/src/api.ts: 新增 addLink / deleteLink API 封装
- web/src/components/PortEdge.vue: × 删除按钮移到端口标签右上角 (绝对定位)
- web/src/views/CanvasView.vue: 启用 Del/Backspace 键删除选中连线
(确认对话框 + 走 onDeleteEdge 逻辑), 修正注释
- embed dist 同步
2026-08-24 01:03:38 +08:00
b39bd427fa
update: 更新文件 README.md
...
标注ai声明
Signed-off-by: JianFeeeee <2198972886@qq.com >
2026-08-19 22:28:41 +08:00
cda85ad096
fix: track cmd/webui4frpc/main.go — .gitignore 'webui4frpc' was matching the cmd/ directory, not just the binary
...
Also includes the startup auto-submit goroutine: on full-cluster restart,
the leader re-submits local non-disabled, non-localOnly forwards from
SQLite so the ring topology repopulates. SubmitTask is idempotent via
HasTask, so this is safe when tasks survived (single-node restart).
2026-08-19 22:14:39 +08:00
2552c14faf
fix: start/stop for ring-only forwards + group sync via ring topology
...
Three issues fixed:
1. Start/stop returned 404 for forwards owned by other nodes:
findLinkByTriple only checked local SQLite store. Added
findLinkFromTopology fallback — startForward/stopForward now look up
ring topology entries when the local store doesn't have the link.
2. Group labels didn't sync through the ring:
handleForwardsAssign only updated local SQLite, never the ring
topology. Added State.UpdateTopologyGroup + Engine.UpdateTopologyGroup
— handleForwardsAssign now updates both. Added topologySync callback
called after every e.state = tk.State (OnToken) and e.state = s
(AdoptState) to re-apply local store group overrides onto the freshly
adopted topology, so they survive state adoption and propagate via
the next token forward. handleForwardsGroupDelete also clears ring
topology entries.
3. Status-merge branch omitted Group field:
ring-only forwards always showed '未分组'. Added Group: t.Link.Group
to the topology-merge forwardStatus.
Verified: 4-node cluster, 5 forwards, group assigned on node-a
propagates to all nodes within one token cycle; stop from non-owning
node succeeds (HTTP 200) and worker stops on the owning node.
2026-08-19 21:52:28 +08:00
465a86c755
fix: status + canvas pages now merge ring topology — all nodes see full cluster picture
...
Root cause: handleStatus built forwards only from local SQLite links table;
handleCanvasGet returned only local store data. Neither merged the ring
topology (which IS synced to every node in-memory). Result: non-claiming
nodes saw only their own claimed forwards, not the full cluster.
Fix: read-time merge in both handlers — iterate ring topology entries and
add any (local, remote, link) not already in the local store. No store
writes (avoids the per-forward stop/start issue that broke the old
topology-derived-canvas model).
Verified: all 4 cluster nodes now show 5 forwards / 4 remotes / 5 links;
isolated node-e correctly shows empty.
2026-08-19 21:24:35 +08:00
c40d208b62
chore: remove local testing scripts, docker demo env, and screenshots from repo
...
- gitignore deploy/ and gui-test-screenshots/ (local dev artifacts, not for repo)
- README: remove deploy section and build path reference
- Files kept on disk for local use, just untracked
2026-08-19 21:12:22 +08:00
eda9bb9597
feat: cluster reliability (leader failover, crash rejoin, key exchange) + auth/users + canvas/forwards enhancements + comprehensive README + API docs
...
- Cluster: forwardToNext offline detection (leader+non-leader), WatchLeader 1s heartbeat fallback, 409 for standalone nodes, Node.NodeKey key exchange via token ring, ClusterPeers persistence + auto-rejoin, Forward delegates to forwardToNext (bugfix)
- Auth: Basic Auth (flag-creds fast path) + bcrypt users (admin/viewer) + Bearer API keys (read/write/admin scope)
- Frontend: UsersView (accounts+API keys), ClusterView (ring/nodeKey/tasks/topology/log), StatusView (group management, per-proxy status), CanvasView (edge toggle/group), PortEdge (disabled/group labels)
- API: handlers split (canvas/forwards/users/logs), canvas export/import, forwards group start/stop/assign/delete, cluster endpoints
- Docs: comprehensive README rewrite (all flags/APIs/auth/cluster), docs/cluster-api.md (cluster management API reference)
- Deploy: run-cluster.sh now 4-node ring + 1 isolated standalone, test-forward.sh updated for 4 nodes
- Removed plan.md (design notes consolidated into README + API docs)
2026-08-19 21:09:24 +08:00
b518a13446
feat: Phase C 完成 — ModelRouter 风格 UI 重设计 + 模拟 frps 测试 + lastSync 修复 + 集群作坊搭建
...
- 主题: sakura×frost 玻璃拟态 (theme.css) + SCSS 变量重映射
- 侧栏: 玻璃侧栏 246px + 渐变品牌区 + 面包屑导航
- 状态页: 玻璃 KPI 卡 + 远程节点/本地服务卡片网格
- 集群页: 英雄玻璃卡 + 横向环拓扑链 + 待办命令/活跃拓扑/日志区
- 令牌环: 新增 lastSync 上次同步时间替代周期计数
- 模拟 frps: frps2/frps3 容器 + test-forward.sh 全链路验证脚本
- 修复: BinaryPath 空导致 worker 不启动, 撤销仅撤第一个 link, 任务复活风暴 (published 追踪)
2026-08-18 23:38:20 +08:00
86b265637d
feat(web): cluster page optimized — self/leader/phase badges, ring arrow, create vs revoke command styling, topology owner highlight, colored log kinds, self highlights
2026-08-18 09:54:29 +08:00
40980944e5
feat(M6): localOnly forward option (loopback→LAN rewrite for cluster, local direct), canvas diff-based create/revoke commands, revoke task semantics, topology derived canvas on sync nodes, LAN addr helper
2026-08-18 09:44:38 +08:00
bf602016b4
feat(web): cluster page shows token ring — ring topology/leader/load, pending tasks, active forward topology with owner, incremental log sync view (e2e verified)
2026-08-18 09:13:20 +08:00
6959025219
docs(plan): M6 token-ring progress — protocol core done, remaining offline/failover + frontend
2026-08-18 09:08:37 +08:00
1a8c362080
feat(M6): token-ring protocol complete — task ride+lowest-load claim, topology publish back to token, real worker spawn via claim, incremental log sync e2e
2026-08-18 09:08:22 +08:00
e59feb82c1
feat(M6): token-ring incremental log sync — append-only op log, delta rides token round-2, nodes converge on identical history (e2e verified join events)
2026-08-18 08:59:59 +08:00
f6c4b91a96
feat(M6): token ring data plane + engine — pending adds disappear on claim, topology written back for full cluster view (per authoritative design)
2026-08-18 08:24:37 +08:00
5bd70b90c0
feat: M3 cluster page (LB groups + health check status) e2e-verified failover; M6 cache API + version path hardening + frontend cluster methods
2026-08-17 22:44:04 +08:00
a842198447
feat: docker cluster demo (frps+3 nodes, M6 auto binary pull, tunnel e2e) + fix SelfAddr/W4F_HOST/bootstrap retry, -frpc flag
2026-08-17 21:57:00 +08:00
fd7604cb9c
feat: M6 stage B - cluster heartbeat, new-node bootstrap auto-pull, peer-first install (e2e verified)
2026-08-17 18:05:01 +08:00
79e0b3da79
feat: M6 cluster binary registry + peer exchange (stage A)
2026-08-17 17:53:07 +08:00
467c7124ab
feat: M3 load balancing + health check (model/render/admin API status/UI)
2026-08-17 17:45:03 +08:00
bd3a62a017
fix: worker 进程并发 double-close panic + 状态页连接语义重构 + 集群页骨架
...
- process: spawn 不再重复起 supervise goroutine(Restart 触发旧 supervise close doneCh 后再 close → panic);新增 closeOnce/supervising 守卫;Start 首次起 supervise,重启循环在同一 goroutine 内
- httpapi: status 增加 connState(connected/connecting/failed/not_started/disabled),由 worker 日志探测真实 frps 连接(不再把本地 worker 状态误当远程 frps 状态)
- StatusView: 远程卡片主状态改为连接状态徽标;启停按钮标注为控制本地 frpc worker;本地转发区保留 worker 状态显示
- 新增 ClusterView 集群页骨架(M3 LB+健康检查载体)+ App.vue 导航接入
- render: bandwidthLimit 从 proxy 顶层移入 transport 段(frpc 0.61 正确 schema,修复真实连不上的 bug)
2026-08-17 15:13:25 +08:00
58906c5a81
feat: M2 HTTP/HTTPS 完善
...
- store: Local 增加 customDomains/subdomain/locations/hostHeaderRewrite/httpHeaders/basicAuth;Remote 增加 vhostHttpPort;migrate() 补列;CRUD 读写(JSOm 编解码)
- render: http/https proxy 输出 customDomains/subdomain/locations/hostHeaderRewrite/httpHeaders/basicAuth
- main: renderRemote 透传 M2 字段(customDomains 逗号拆分 splitCSV)
- web: LocalNode 折叠 HTTP 路由高级区;RemoteNode vhostHTTPPort;StatusView 显示 HTTP 访问端口
- 测试: TestRenderHTTPAdvanced / TestRenderHTTPSUsesCustomDomains;端到端 PUT canvas→config 验证通过
2026-08-17 12:59:12 +08:00
07f25ea067
feat: M1 高级传输参数(P0)
...
- store: Local 增加 useEncryption/useCompression/bandwidthLimit/poolCount/metadatas/annotations;Remote 增加 transportProtocol/transportTls/transportPool/transportTlsServerName;新增 migrate() ALTER TABLE 迁移旧库
- render: 输出 transport 段(protocol/tls/poolCount)与 proxy 高级字段;补 TestRenderTransportAdvanced/OmittedWhenEmpty
- main: renderRemote 闭包透传 M1 字段到 render.Proxy
- web: LocalNode/RemoteNode 折叠高级区表单,types.ts 接口扩展
- 验证:go test 全绿、vue-tsc/build 通过、端到端 PUT canvas→frpc JSON 输出完整
2026-08-17 12:28:54 +08:00
e73bd834a1
style(web): 保持 vite.config.ts 单引号风格
2026-08-17 12:11:30 +08:00
7128a8c041
chore(web): tsconfig 显式声明 node 类型供 vite.config.ts 使用
...
types: [node, vite/client] 替代 @vue/tsconfig 默认的空 types(避免 process 未定义);@types/node 已加入 devDependency
2026-08-17 12:10:00 +08:00
45346405c2
fix: vite dev proxy 端口对齐 7500(支持 VITE_PROXY_TARGET 覆盖)
...
原指向 127.0.0.1:17650 与后端默认 -addr 127.0.0.1:7500 不符;同步 @types/node devDependency 并纳入 tsconfig
2026-08-17 12:07:14 +08:00
5237e3b594
fix: 注册 PUT /api/manager/settings 使设置保存生效
...
server.go NewServeMux 按方法分发到 handleSettingsPut(原仅注册 GET,PUT 静默返回旧值)
新增 TestSettingsPutRoundTrip 回归测试;gofmt 清理历史格式问题
2026-08-17 12:00:34 +08:00
1cd0ab8ad1
docs: 记录代码审查结果与已知问题;忽略 .pi/ 本地代理状态
2026-08-17 11:56:30 +08:00
c1936887a2
webui4frpc: 独立可用的可视化 frpc 控制器 (M0)
...
- 零 frp 源码依赖,单二进制 (Go + Vue3 + VueFlow + Element Plus)
- 画布多对多连线,渲染 tcp/udp/http/https frpc 配置
- worker 进程管理:自愈、日志轮转、崩溃退避重启
- frpc 一键安装 (GitHub Releases) + 手动指定路径
- 三页 UI:状态(默认)/连接配置/设置
- 状态页实时节点/转发状态,节点可增删改启停
- 画布冲突检查:端口/域名冲突标红 + 弹窗拦截保存
- backend 单测覆盖 store/render/process/httpapi/install
- plan.md + FRPC_FEATURES_AUDIT.md 文档
2026-08-17 11:00:26 +08:00