stswangzhiping
dac68f78b4
fix: clawd-rfkill.service failed due to systemd $ expansion
...
systemd expands $rf as env var (empty), breaking the inline script.
Move rfkill logic to standalone script to avoid escaping issues.
Also use quoted heredoc to prevent bash expansion in install.sh.
Made-with: Cursor
2026-03-16 11:49:07 +08:00
stswangzhiping
7a80c03028
fix: kill NetworkManager's dnsmasq before starting our own
...
NetworkManager auto-starts its own dnsmasq when creating a hotspot,
which conflicts with our DNS-hijacking dnsmasq on the same interface.
Now kill ALL dnsmasq instances before starting ours.
Made-with: Cursor
2026-03-16 11:19:04 +08:00
stswangzhiping
92906bcd4b
fix: set AP hotspot password to fixed WPA2 PSK "12345678"
...
Open network was not viable as nmcli generates random password by default.
Use a simple fixed password since the AP is only for short-lived provisioning.
Made-with: Cursor
2026-03-16 10:44:26 +08:00
stswangzhiping
8a6e5b3666
fix: dnsmasq path detection and WiFi rfkill persistence
...
- dns-hijack.js: replace `which` with multi-path search (/usr/sbin etc.)
since dnsmasq is often not in normal user PATH
- install.sh: auto-enable NetworkManager for WiFi provisioning
- install.sh: unblock WiFi rfkill at install time
- install.sh: create clawd-rfkill.service for persistent boot-time unlock
Made-with: Cursor
2026-03-16 10:06:30 +08:00
stswangzhiping
eb9f4ab1c3
feat: add WiFi provisioning for headless devices (AP + Captive Portal)
...
- Add lib/network.js: WiFi scan, connect, AP hotspot via nmcli
- Add lib/dns-hijack.js: dnsmasq management for DNS hijack + DHCP
- Add lib/captive-server.js: embedded HTTP captive portal with WiFi setup page
- Add lib/provisioning.js: orchestrator (detect network -> AP mode -> wait -> exit)
- Update client.js: call ensureNetwork() before WS connection
- Update install.sh: auto-install dnsmasq dependency
Made-with: Cursor
2026-03-16 08:58:51 +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
abf2cacac7
fix: use total-available for mem_used, aggregate real filesystems for disk
...
Made-with: Cursor
2026-03-15 21:29:51 +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
stswangzhiping
a9a7816e16
fix: show claw_id in activation box, remove noisy startup logs
...
Made-with: Cursor
2026-03-14 22:46:49 +08:00
stswangzhiping
3b7fc0c0d4
fix: combine machine-id+cpu+disk serial for box_id to prevent ghost clone collision
...
Made-with: Cursor
2026-03-14 22:21:13 +08:00
stswangzhiping
aba21bf8b7
fix: replace MAC address with CPU serial / disk serial / DMI UUID for box_id
...
Made-with: Cursor
2026-03-14 21:18:57 +08:00
stswangzhiping
222c38a707
feat: initial clawd implementation - WebSocket daemon for claw box
...
Made-with: Cursor
2026-03-14 20:41:26 +08:00