Commit Graph

19 Commits

Author SHA1 Message Date
stswangzhiping
3d2e5d477a revert: restore TCP 7000 frpc config (WebSocket via Nginx not working)
Made-with: Cursor
2026-04-09 17:40:14 +08:00
stswangzhiping
d9f826f978 feat: frpc uses WebSocket over port 443 for firewall compatibility
Made-with: Cursor
2026-04-09 17:15:44 +08:00
stswangzhiping
43deb9afa0 fix: ttyd 改用 apt install,不再从 GitHub 下载
- install.sh: 改为 apt install -y ttyd,删除 GitHub 下载逻辑
- frpc.js: TTYD_BIN 改为 findTtydBin() 动态查找系统路径,删除 downloadTtyd()

Made-with: Cursor
2026-04-06 15:17:27 +08:00
stswangzhiping
3fe5586613 feat: install.sh 预装 ttyd,frpc.js 去掉运行时下载
install.sh:
- 移除系统自带 ttyd 包(避免与 clawd 托管的 ttyd 端口冲突)
- 安装阶段下载 ttyd 1.7.7 到 /etc/clawd/ttyd,自动检测 arch
- 下载失败时给出提示和手动下载地址

frpc.js:
- startTtyd() 不再尝试运行时下载,binary 不存在时报错提示重跑 install.sh
- pkill 改为杀所有 ttyd 进程(pkill -x ttyd),不限路径,
  避免系统自带 ttyd 占用 7681 端口导致 clawd 的 ttyd 启动失败

Made-with: Cursor
2026-04-04 18:16:07 +08:00
stswangzhiping
04dd1017bb fix(network): wired ping probe, AP/WS and systemd notify hardening
- Add hasWiredInternetProbe and export; AP mode uses it with hasInternet
- systemd-env: strip NOTIFY_SOCKET from env early; client uses unix_dgram
- Strip NOTIFY_SOCKET from frpc/ttyd spawn env in watchdog and frpc
- WS: pong miss debounce; AP net monitor consecutive-fail debounce

Made-with: Cursor
2026-03-28 14:37:56 +08:00
stswangzhiping
884b0dc50a feat(openclaw): persist config as ~/.openclaw/openclaw.json
- Read gateway token/port via JSON.parse (same structure as former YAML)
- Update claw.cutos.ai origin by replacing URLs in JSON string fields
- Export resolveOpenclawConfigFile() for frpc + client
- Drop js-yaml dependency
- install: ExecStartPre touches openvfd only if nodes exist (3528-friendly)
- Add tools/deploy-rsync.sh for syncing /opt/clawd over SSH

Made-with: Cursor
2026-03-27 13:49:23 +08:00
stswangzhiping
935d5ba176 fix: 用 js-yaml 正确解析 config.yaml 获取 dashboard token
替换正则提取方式,使用 js-yaml 解析 YAML 文件,
通过 config.gateway.auth.token 和 config.gateway.port 读取字段。

Made-with: Cursor
2026-03-24 17:00:33 +08:00
stswangzhiping
cdb2ddc688 fix: getDashboardInfo 改为读取 config.yaml
openclaw 配置文件路径从 openclaw.json 迁移到
config/config.yaml,用正则提取 token 和 port 字段。

Made-with: Cursor
2026-03-24 16:47:35 +08:00
stswangzhiping
d66558c9de fix: read dashboard token from ~/.openclaw/openclaw.json instead of running openclaw dashboard command
Made-with: Cursor
2026-03-18 14:00:57 +08:00
stswangzhiping
5f5b976f5b fix: split su command into separate args for ttyd
Made-with: Cursor
2026-03-16 16:21:11 +08:00
stswangzhiping
9dc559a43a fix: run ttyd shell as normal user (sts) instead of root
Made-with: Cursor
2026-03-16 16:15:13 +08:00
stswangzhiping
b3770d21d4 feat: add structured logging, process watchdog, and systemd hardening
- Add lib/logger.js: timestamped structured logging with 5MB x 5 file rotation
- Add lib/watchdog.js: generic child process supervisor with rate-limited restarts
- Enhance client.js: WS ping/pong liveness detection, uncaughtException/unhandledRejection handlers, systemd sd-notify integration
- Refactor frpc.js: FrpcManager now delegates to Watchdog instead of manual spawn/exit
- Enhance install.sh: environment file, log directory, systemd resource limits, security hardening, WatchdogSec=60
- Replace all console.log/warn/error with structured logger across modules

Made-with: Cursor
2026-03-16 07:31:19 +08:00
stswangzhiping
42d1d361dc style(ttyd): enable cursor blink via client option
Made-with: Cursor
2026-03-15 23:25:36 +08:00
stswangzhiping
1ff9fd90e5 fix(ttyd): add -W writable and -i 127.0.0.1 flags
Made-with: Cursor
2026-03-15 23:22:05 +08:00
stswangzhiping
54476c82b6 fix(frpc): ttyd switch to tcp proxy to fix ws bidirectional issue
Made-with: Cursor
2026-03-15 22:55:27 +08:00
stswangzhiping
c0c445b61d feat: add ttyd terminal support, parallel startup in frpc.js
Made-with: Cursor
2026-03-15 21:39:05 +08:00
stswangzhiping
f5ae8b0710 fix: use shell background + polling to get dashboard info reliably
Made-with: Cursor
2026-03-15 14:29:03 +08:00
stswangzhiping
64cd7432e1 fix: getDashboardInfo uses spawn+Promise to handle long-running process
Made-with: Cursor
2026-03-15 14:09:41 +08:00
stswangzhiping
516d0d26ee feat: integrate frpc manager and send dashboard info via WebSocket
Made-with: Cursor
2026-03-15 11:10:33 +08:00