Commit Graph

4 Commits

Author SHA1 Message Date
6f9dd3aa17 feat(luci-app-masterlink): Add sbx-mesh-invite and improve join script
New sbx-mesh-invite script for master nodes:
- Generates secure invite tokens with auto-approve option
- Outputs copy-pasteable join URL and CLI command
- Supports --ip flag to specify master address
- Prefers 192.168.x.x addresses in auto-detection

Improvements to sbx-mesh-join:
- Creates UCI config file if missing (touch + set)
- Properly initializes config section before setting options
- Handles fresh installs without existing masterlink config

Workflow:
  Master: sbx-mesh-invite --ip 192.168.255.200
  Peer:   sbx-mesh-join 192.168.255.200 <token>

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-26 15:23:55 +01:00
60334e96ea fix(luci-app-masterlink): Handle missing JSON fields in sbx-mesh-join
Add || true to jsonfilter commands to prevent script exit when
optional fields (master_fingerprint, depth) are missing from API
response. The set -e directive was causing premature exit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-26 15:17:44 +01:00
349b20a750 fix(luci-app-masterlink): Use HTTPS instead of HTTP for mesh join API
- Change API endpoint from http://IP:7331 to https://IP (port 443)
- Add -k flag for curl to handle self-signed certificates
- Add --no-check-certificate for wget for self-signed certs
- Update usage examples to show HTTPS URLs
- Fix menu path to /admin/secubox/master-link

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-26 15:03:02 +01:00
c4a2601c11 feat(luci-app-masterlink): Add mesh enrollment client for OpenWRT
New package for joining SecuBox mesh networks from OpenWRT devices.

RPCD handler (/usr/libexec/rpcd/luci.masterlink):
- status: Current mesh membership state
- join: Join mesh with master_ip and token
- leave: Leave current mesh network
- info: Local node info (fingerprint, hostname, IP)
- verify: Verify master before joining

CLI tool (/usr/bin/sbx-mesh-join):
- URL parsing: sbx-mesh-join 'http://ip:7331/master-link/?token=xxx'
- Direct args: sbx-mesh-join 192.168.1.1 token123
- Auto-generates node fingerprint from MAC address
- Saves to UCI on success

LuCI interface (Services > Master-Link):
- Status display (connected/pending/disconnected)
- Invite URL/token input with Verify and Join buttons
- Leave mesh button when connected
- CLI usage help section

Also adds screenshot-capture.js for automated LuCI screenshots.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-26 14:21:48 +01:00