48 Commits

Author SHA1 Message Date
64d3359981 fix(web): 窄屏顶栏右侧溢出 — flex 自动最小尺寸 + vw 限宽两处误算
两个原因叠加导致顶栏横向溢出:

1. "webui4frpc" 是不可断行单词,.sb-brand-text 没给 min-width:0 +
   overflow:hidden,其 flex 自动最小尺寸就等于 min-content(≈85px),
   顶栏因此拿不出空间给右侧身份区,超出部分溢出。现给品牌文字整条链路
   加可收缩约束,标题用 ellipsis 截断。

2. .sb-identity 用 max-width:42vw / .id-name 用 14vw 限宽:vw 含垂直
   滚动条宽度,比实际可用内容宽度大;且 max-width 只封顶盒子,内部
   flex:0 0 auto 的角色徽标与退出按钮仍会把它撑开。改为全链路
   min-width:0 + overflow:hidden,由 flex 自行分配(.sb-foot 也从
   flex:0 0 auto 改 0 1 auto,允许被压缩)。

另加 .sidebar { overflow-x: hidden } 作兜底,任何子项算错都不再产生
横向滚动条;≤380px 隐藏角色徽标(它不可收缩,"超级管理员"≈70px)。

验证:tsc --noEmit 通过、npm run build 通过、产物 CSS 已确认规则生效;
三节点部署 0.1.2 后环正常(cycle 推进、pending=0、topo=5)。
2026-09-03 08:50:23 +08:00
0559cc55bd fix(web): 窄屏底部导航栏错位到顶部 — 顶栏 backdrop-filter 创建了包含块
.sb-nav 用 position:fixed;bottom:0 想贴视口底部,但父元素 .sidebar 带
backdrop-filter。backdrop-filter 与 transform/filter 同理,会为后代的
position:fixed 创建【包含块】—— 于是 bottom:0 变成相对顶栏下沿定位而不是
视口,tab bar 贴在顶栏正下方,看起来就是固定在屏幕顶部。

窄屏下关掉顶栏的 backdrop-filter,改用近实色底
color-mix(var(--w4f-card-solid) 92%, transparent);玻璃模糊保留在
.sb-nav 自身(元素自己的 backdrop-filter 不影响自己的定位)。

顺带 bump 到 0.1.2(version 包 / release.sh / build_installers.sh /
rpm spec + changelog / README 安装示例文件名)。

验证:tsc --noEmit 通过、npm run build 通过;产物 CSS 中确认 720px 段的
.sidebar 已含 backdrop-filter:none;三节点部署后 /status 报告 0.1.2,
环正常(cycle 推进、pending=0、5 条转发 frpc 进程与 topology 归属一致)。
2026-09-03 08:45:22 +08:00
609f0df517 chore: upload_assets.py 默认包含原生安装包
默认文件筛选原来只匹配 tar.gz/zip/SHA256SUMS,deb/rpm/pkg/setup.exe
必须逐个显式传参才会上传(v0.1.0 与 v0.1.1 都是分两趟传的)。
改为按发布产物后缀白名单筛选;用 -setup.exe 而非裸 .exe,避免误收
bin/ 下的裸二进制。
2026-09-03 07:30:53 +08:00
f9f18ae13c chore: v0.1.1 — 版本号收拢进 internal/version + 发布脚本校验和覆盖安装包
- 新增 internal/version 包作为版本号唯一来源,release.sh 通过
  -ldflags -X 注入真实 tag。此前 /api/manager/status 与集群 JoinInfo
  里各自硬编码 "0.1.0",产物报告的版本与 tag 无关。
- release.sh:SHA256SUMS 移到原生安装包构建之后统一重算,覆盖
  deb/rpm/setup.exe/pkg。此前只算 tar.gz/zip,用户校验安装包会得到
  "no file was verified"(v0.1.0 发布时实际踩到)。
- rpm spec / build_installers.sh 默认版本与 changelog、README 安装
  示例文件名同步到 0.1.1。

验证:go test ./internal/cluster/... ./internal/httpapi/... 通过;
6 平台产物架构逐个 file 校验正确;linux-amd64 实跑 /status 报告
version=0.1.1(确认 ldflags 注入生效)。
v0.1.1
2026-09-03 07:28:13 +08:00
f935cad33f feat(web): 窄屏适配 — 侧栏转底部 tab bar + 各页响应式重排
此前只有一个 max-width:900px 断点(仅缩窄侧栏),手机上 210px 侧栏吃掉
半屏、卡片网格横向溢出、按钮被挤成细条。新增 720px / 380px 两档断点:

App.vue(关键)
- ≤720px:shell 转竖向,导航从侧栏抽出固定到屏幕底部(图标上/文字下),
  品牌+身份+主题折进顶部窄条;tab 最小 44px 触控高度
- 内容区预留 env(safe-area-inset-bottom),避开 iOS 手势条
- ≤380px 再压一档:隐藏权限徽标、缩小字号

StatusView
- card-grid 的 minmax(320px) 在 375px 屏溢出 → 单列
- KPI 由 auto-fit 改固定两列(auto-fit 窄屏退化单列使四卡拉长),≤380px 单列
- 转发卡 fwd-head 原一行塞 7~8 元素 → 路由占整行、按钮另起一行平分
- 分组标题按钮不再被 margin-left:auto 压扁

ClusterView
- 环拓扑改竖向,节点卡占满宽,箭头旋转 90° 指下
- nodeKey(32 位 hex)允许 break-all,不再撑宽容器
- 日志 lg-detail 由 max-width:60%+nowrap 改整行完整显示

SettingsView / UsersView / CanvasView
- binary-row、setting-row 竖排;表格卡标题行竖排、操作按钮平分
- 画布 toolbar 按钮换行平铺;vue-flow handle 12px→16px(触控可达)

index.html
- viewport 加 viewport-fit=cover,这是 env(safe-area-inset-*) 生效前提

验证:tsc --noEmit 通过、npm run build 通过、dist 已重新 embed,
三节点部署后环正常(pending=0,5 条转发 frpc 进程与 topology 归属一致)。
2026-09-03 07:20:32 +08:00
f9c2e9476a fix: 心跳复活节点、inflight 超时重发
1. handleClusterToken:心跳到达时把发送方(前驱)标记为 alive。
   之前 forwardToNext 超时把节点 MarkOffline 后就再无途径恢复,
   即使下一个心跳证明它活着。心跳是 leader 侧纠正误判的唯一入口。

2. forwardToNext:遍历完所有后继才返回,不要提前 inflight.clear()。
   保留 inflight 状态,让 WatchTokenLoss 超时后 StartRing 重发,
   重发时 AliveSuccessor 会重新计算,心跳刚复活的节点就能被选中。

这两处补丁一起提交,形成完整的存活复活闭环。
2026-08-28 16:32:51 +08:00
15b1dcce8f feat: 原生安装包 — deb/rpm/systemd + NSIS setup.exe + macOS pkg
此前交付的 tar.gz/zip 仅是解压直用包,补齐真正的平台安装包:
- Linux: .deb (dpkg-deb) 与 .rpm (rpmbuild),装 systemd 单元 + 专用
  系统账号 + /etc/webui4frpc 配置,非 root 运行 + 加固
- Windows: NSIS setup.exe,向导收集监听地址/凭据,注册卸载器 +
  防火墙放行(amd64/arm64)
- macOS: .pkg(在 Linux 上手工 xar+mkbom 组装 flat package),launchd
  开机自启 + env 配置文件(amd64/arm64)
- scripts/release.sh 纳入 build_installers.sh 阶段;README 增「安装」
  章节逐平台说明

已知限制:rpmbuild 无法在非 RHEL 主机交叉构建 aarch64(Debian rpm
只有 x86_64 构建 arch),aarch64 rpm 需在原生 ARM 机器构建;Linux/ARM
场景已由 deb-arm64 覆盖。
2026-08-28 08:36:55 +08:00
6ee901dc64 chore: 发布脚本 — 全平台构建打包 + gitcode release 资产上传
- scripts/release.sh: 前端构建 → 6 平台交叉编译 (linux/windows/darwin ×
  amd64/arm64) → tar.gz/zip 打包 → SHA256SUMS;子目录隔离同名二进制
- scripts/upload_assets.py: gitcode 两步上传流程
  (upload_url 签名 → urllib PUT 到 OBS),curl 会 401 但 urllib 干净成功
- 首次发布 v0.1.0: 6 个平台安装包 + SHA256SUMS 已上传,下载校验一致
2026-08-28 08:16:58 +08:00
57950a86db fix: 集群日志重复条目 — 本地 Append 同步推进 Synced 水位
根因: Append 只推进 Seq 不推进 Synced。本地追加 seq=N 后 Synced 落后,
下一轮收到对端全量附带(含自己的 seq=N)时 ApplyDelta 视为未见过而再次追加
→ 审计日志出现同 seq 重复行(实测 .30 出现 seq=12/13/14 各两条)。

修复: Append 将 Synced 一并推进到新条目 seq——本地条目天然已同步,
对端回传的同一 seq 被 watermark 幂等跳过。

测试: TestLocalAppendNotDuplicatedByPeerFullLog

实测: 三台各触发 stop+start 制造多条事件 → 三台均 26 条 / 唯一seq 26 /
重复 0 / 水位一致 (seq=26)
v0.1.0
2026-08-26 13:30:12 +08:00
1abf1bb447 fix: 集群操作日志同步修复 — 全量回填 + 重启节点 seq 水位抬升
两个根因:
1. 离线错过条目永久缺失: token delta 被下游 trim (keep=seq>wm),
   离线节点错过的 seq 再也收不到 → 'log delta gap: want N got N+1' 死循环。
   修复: OnToken 改为附带自己的全量日志 (Snapshot),接收方 ApplyDelta 按 seq 幂等去重,
   缺口节点下一轮自动补齐。日志量小(几十条),开销可忽略。

2. 重启节点重新从 seq=1 编号: NewClusterLog 从 Seq=0 起,重启后产生的新事件
   与环上历史 seq 冲突 → ApplyDelta 视为 already-have 静默丢弃 + 全量附带出现歧义 id。
   修复: OnToken 收到日志时把本地 Seq 抬到环高水位之上,新编号接在历史之后。

测试: TestFullLogBackfillAfterGap / TestApplyDeltaIdempotentOnFullResend

实测: 三台集群撤销 minecraft 转发 → 三台均记录 seq=10 forward.remove;
恢复后三台均记录 seq=11 forward.add
2026-08-25 11:55:34 +08:00
94b6396738 docs: 更新 README 与 cluster-api — per-forward 模型/网络负载/审计CSV/三级角色/session登录
README:
- 特性: per-forward 独立进程、NIC 负载采样、冲突检查、Del 键删除
- 认证: session-cookie 登录 + 三级角色 (superadmin/admin/viewer)
- 审计: 4 个 CSV 导出端点说明
- 构建: dist 不再进 git (编译前需 cp -r)
- 数据目录: 配置/日志路径改为 per-forward 键式
- 架构: 更新模块说明 (worker_key/session/audit)
- API 表: 新增 login/logout + 审计导出 4 端点
- gofmt: store.go 注释对齐

docs/cluster-api.md:
- §9 审计 CSV 导出: 四个端点用法、示例行、公式注入防御说明
2026-08-24 23:52:16 +08:00
f90627f542 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	internal/httpapi/dist/assets/index-CL42Ur3_.css
#	internal/httpapi/dist/assets/index-CbqC9m-j.js
#	internal/httpapi/dist/assets/index-RFHYrCiX.css
#	internal/httpapi/dist/assets/index-jvouiCgh.css
#	internal/httpapi/dist/index.html
#	internal/store/store.go
#	web/src/api.ts
#	web/src/views/ClusterView.vue
2026-08-24 23:30:19 +08:00
2eaa26ba95 feat: worker 日志 CSV 导出 + 集群日志导出菜单完善
- handleAuditWorkerLogsCsv: 全环 fan-out 收集每节点 frpc 日志,
  逐行展开为 CSV (node/worker_key/remote/worker_state/log_line),
  Excel 可直接过滤/pivot 审计
- gatherClusterWorkerLogs: 提取 JSON 与 CSV 共用的日志聚合逻辑
- 路由: GET /audit/worker-logs.csv (read 级)
- ClusterView: 导出 worker 日志改下拉菜单 (JSON/CSV 两格式)
- api.ts: downloadAuditCsv 支持 worker-logs 类型
- gofmt: handlers_audit.go 格式对齐
2026-08-24 23:09:00 +08:00
ef98d9dca1 feat: 审计 CSV 导出 — 用户/API Key/集群操作日志一键下载
新增端点 (read 级, 审计 viewer 角色即可导出):
- GET /audit/users.csv: 账号清单 + 最后登录时间
- GET /audit/apikeys.csv: 密钥清单 (前缀+scope+最后使用+过期)
- GET /audit/cluster-log.csv: 令牌环操作日志时间线
  (seq/time_utc/node/kind/detail/data_json 六列, detail 为人读摘要,
   data_json 保留无损原始载荷)

安全设计:
- RFC4180 转义 (引号/逗号/换行)
- 公式注入防御: =/+/@/tab/- 开头单元格加 ' 前缀
- ISO8601 UTC 时间戳, Excel 直接排序
- 明文密钥不可逆, 仅导出展示前缀

前端:
- UsersView: 账号表/API 密钥表各加「⤓ 导出 CSV」按钮
- ClusterView: 日志导出下拉新增 CSV 选项 (走服务端生成)
- api.ts: downloadAuditCsv() 统一下载管道

测试: csvEscape 全用例 / users+apikeys CSV 内容断言 / 未认证 401
2026-08-24 22:53:52 +08:00
4a41608d94 refactor: 审查修复 — netload 消除重复 /sys 读 + 全项目 gofmt
- netload_linux.go: SampleNetLoad 聚合循环不再对每接口重复
  readIfaceSpeed (snapshot 已汇总 cur.capMbps), 每次采样省 N 次 /sys 读
- gofmt -w: ring.go/ring_engine.go/auth.go/handlers.go/handlers_logs.go/
  handlers_users.go/store.go 结构体字段对齐与注释缩进
- README.md: markdownlint 自动修复 (MD028/MD040)

审查结论: 令牌环本身即互斥协议 — OnToken(收令牌)与 StartRing(发令牌)
在同一节点上由令牌串行化, 不存在需要加锁的竞争; WatchLeader 的读为
良性读, 无需 mutex
2026-08-24 22:24:35 +08:00
0596678c67 feat: 网络接口负载采样 — 令牌环认领决策引入真实 NIC 饱和度
- netload_linux.go: 从 /proc/net/dev 字节增量 + /sys/class/net/<iface>/speed
  计算网卡利用率 (rx+tx 合计, 多网卡按容量加权, [0,100] 钳制)
- virtio VM speed=-1 时用 1Gbps 软容量兜底, 保持 VM 上采样有意义
- 排除 lo/docker*/br-*/veth*/tun/tap/wg/virbr* 等非物理 uplink,
  容器桥接流量不再虚增主机负载
- netload_other.go: 非 Linux 平台编译期 fallback 返回 0
- main.go LoadFn: NetPct 从写死的 10 换成 cluster.SampleNetLoad()
- Score = Forwards*100 + MemPct + NetPct: 主信号仍是转发数,
  net 在同转发数节点间打破平局 — NIC 已饱和的节点不再吸引新转发
- 单测: 采样范围断言 + 虚拟接口排除表

实测: 三台集群 net 列显示真实值 (0.02-0.03%), 不再是常量
2026-08-24 16:48:12 +08:00
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
f29ec81e4a feat: session-cookie login/logout + three-tier roles (superadmin/admin/viewer) with read-only UI + remove pink theme
- cookie-based auth (/login /logout) replacing Basic Auth for UI, enabling logout
- roles: superadmin (account management only), admin (full except accounts), viewer/audit (read-only status+cluster, export logs)
- readonly accounts hide edit buttons (added remote node, group ops, canvas layout/save/import, cluster manage, install) instead of greying them
- auditors see status+cluster only; ordinary admins lose the accounts nav; last-admin guard covers superadmin
- remove pink theme entirely (switcher, [data-theme=pink], leftover localStorage), keep white/blue
2026-08-20 09:08:15 +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