Commit Graph

3 Commits

Author SHA1 Message Date
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
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