Commit Graph

759 Commits

Author SHA1 Message Date
417afe8017 feat(p2p): Add complete Hub Registry and Services Registry panels
- Hub Registry Panel with:
  - Short URL table with copy, status, hits
  - MaaS toggles (enabled, auto-register, cache)
  - DNS config modal with zone preview
  - Register URL, Sync Peers, Flush Cache actions

- Services Registry Panel with:
  - Service type legend with color coding
  - Local services / Network services columns
  - Service sharing toggles
  - Register Service, Subscribe, Export actions

- Extensible panel grid layout
- Service type categorization (dns, vpn, ids, proxy, firewall, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:53:05 +01:00
ef914b0b9f feat(p2p): Add SecuBox P2P Hub packages and Services Registry
- Add secubox-p2p backend package:
  - UCI configuration for P2P settings, DNS federation, WireGuard mesh, HAProxy
  - RPCD handler for peer management, service discovery, mesh configuration
  - Init script and main P2P manager daemon

- Add luci-app-secubox-p2p frontend package:
  - Main hub view with master control, network matrix visualization
  - Peers management with discovery and manual add
  - Services view showing local and shared services
  - Mesh network configuration (DNS, WireGuard, HAProxy)
  - Settings for P2P and registry configuration

- Add Services Registry view to luci-app-secubox
- Add listProfiles/applyProfile to secubox-admin API
- Fix P2P ACL permissions
- Remove old hub.js from luci-app-secubox (moved to dedicated package)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:46:50 +01:00
8be28001d7 fix(crowdsec-dashboard): Add UCI ubus permissions to ACL
Add ubus uci method permissions:
- Read: get, state, configs
- Write: set, add, delete, rename, order, commit, apply, confirm, rollback

Fixes "Permission denied" error when saving theme settings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 09:39:27 +01:00
ab44a306f3 feat(secubox): Add P2P Hub backend and fix theme module
- Add P2P Hub RPCD methods for collaborative catalog sharing:
  - p2p_get_peers, p2p_discover, p2p_add_peer, p2p_remove_peer
  - p2p_get_peer_catalog, p2p_share_catalog
  - p2p_get_settings, p2p_set_settings
- Fix crowdsec-dashboard theme.js to use baseclass.extend()
  instead of baseclass.singleton() for LuCI compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 09:34:14 +01:00
b35b86684e fix(crowdsec-dashboard): Use baseclass.singleton for theme manager
Fix "not a constructor" error by using baseclass.singleton()
pattern instead of baseclass.extend() with manual instantiation.
Theme module now exports a singleton directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 09:30:54 +01:00
2d15c641f1 feat(secubox): Add P2P Hub API and wizard-first menu
- Make Setup Wizard the first menu item in SecuBox (order 5)
- Add P2P Hub collaborative catalog API methods:
  - Peer discovery and management
  - Catalog sharing between SecuBox instances
  - Settings for P2P sharing preferences
- Fix crowdsec-dashboard theme.js to return class instead of instance
- Update views to properly instantiate theme class

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 09:27:56 +01:00
19e8a67acd feat(crowdsec-dashboard): Add extensible theming system
Add theme manager with selectable themes and profiles:
- classic: Professional SOC-style dark theme (default)
- cards: Modern card-based UI with gradients
- cyberpunk: Neon glow effects with terminal aesthetics

Profiles extend themes with custom options:
- default, soc, modern, hacker

Theme selection available in Settings > Appearance with live preview.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 09:16:50 +01:00
e887785311 fix(crowdsec-dashboard): Move menu to SecuBox security section
Move CrowdSec dashboard from admin/services/crowdsec to
admin/secubox/security/crowdsec to integrate with SecuBox menu structure.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 09:11:40 +01:00
fda106c0e0 fix(core): Fix module detection, health check, quick actions, and HAProxy status
- Fix jshn boolean handling in secubox-core (use 1/0 instead of true/false)
- Fix BusyBox-compatible package cache generation (grep instead of awk)
- Add quick_action RPCD method for dashboard quick actions
- Enhance health check with module status (total, installed, enabled, active, failed)
- Add resource details to health check output
- Fix HAProxy container detection without lxc-info (fallback to pgrep)
- Rebuild secubox-feed packages with fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 07:55:31 +01:00
98a98c888d feat(bonus): Add 'secubox-feed install all' command
Installs all packages from the local feed in dependency order:
1. secubox-core and secubox-app (base)
2. secubox-app-* backend packages
3. luci-app-* frontend packages
4. luci-theme-* themes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 06:43:57 +01:00
c00d468617 fix(bonus): Fix secubox-app-bonus build and opkg feed installation
- Fix recursive inclusion bug where secubox-app-bonus was including itself
  causing 1GB package size (now 7.5MB with 73 packages)
- Fix Packages index generation to strip Source/SourceName/SourceDateEpoch/URL
  fields that caused opkg parsing issues
- Add rebuild_bonus_package() to local-build.sh for proper feed embedding
- Update secubox-feed install command to handle local dependencies from files
  (workaround for opkg signature bug with file:// URLs)
- Clean up libc dependency stripping in Packages generation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 06:39:31 +01:00
7066c9dd85 fix(deps): Remove ALL dependencies from secubox-core and luci-app-secubox-admin
Even rpcd, bash, jsonfilter, jq depend on libc themselves. Since these
packages are always present on a working OpenWrt/SecuBox system, we should
not declare any dependencies at all.

- secubox-core 0.10.0-r9: DEPENDS:= (empty)
- luci-app-secubox-admin 1.0.0-r19: LUCI_DEPENDS:= (empty)

This prevents opkg from trying to resolve any feed packages and their
cascading libc dependencies.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 05:06:34 +01:00
92a82967bb fix(deps): Remove libubox/libubus/libuci from all SecuBox package dependencies
These base OpenWrt libraries are always present on the system but their
versions in the SDK-built feed don't match the router's installed versions,
causing opkg to fail with "Cannot satisfy dependencies" errors.

Fixed packages (18 total):
- secubox-core: removed libubox, libubus, libuci
- luci-app-ksm-manager: removed libubus, libubox
- luci-app-mqtt-bridge: removed libuci
- secubox-app-adguardhome: removed uci, libuci
- secubox-app-auth-logger: removed libubox-lua
- secubox-app-domoticz: removed uci, libuci
- secubox-app-gitea: removed uci, libuci
- secubox-app-glances: removed uci, libuci
- secubox-app-hexojs: removed uci, libuci
- secubox-app-lyrion: removed uci, libuci
- secubox-app-magicmirror2: removed uci, libuci
- secubox-app-mailinabox: removed uci, libuci
- secubox-app-mitmproxy: removed uci, libuci
- secubox-app-nextcloud: removed uci, libuci
- secubox-app-ollama: removed uci, libuci
- secubox-app-picobrew: removed uci, libuci
- secubox-app-streamlit: removed uci, libuci
- secubox-app-zigbee2mqtt: removed uci, libuci

The packages still work because these libs are implicitly available.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:49:27 +01:00
430e42cec9 fix(deps): Add PKG_FLAGS:=nonshared to prevent automatic libc dependency
The OpenWrt SDK automatically adds libc as a dependency to all packages,
even pure shell/JavaScript packages that don't need it. This causes
opkg installation failures when the local feed version of libc doesn't
match the router's installed version.

Solution: Add PKG_FLAGS:=nonshared to Makefiles of arch-independent
packages (secubox-core, luci-app-secubox-admin, secubox-app-bonus).
This tells the build system these packages don't link against libc.

Changes:
- secubox-core: 0.10.0-r6 → r7 with PKG_FLAGS:=nonshared
- luci-app-secubox-admin: 1.0.0-r17 → r18 with PKG_FLAGS:=nonshared
- secubox-app-bonus: 0.3.0-r1 → r2 with PKG_FLAGS:=nonshared
- Regenerated Packages index without libc dependencies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 18:08:01 +01:00
066bedafef feat(appstore): Implement KISS Evolution - feeds, profiles, skills, feedback
Add four major features to enhance SecuBox AppStore:

1. Feed Source Management:
   - Feed types: published, unpublished, development
   - Share tokens for private feed access
   - CLI: secubox feed list/add/share/import
   - LuCI: Feed type badges and share URLs in catalog-sources

2. Profile Export/Import:
   - Export configurations with feed sources embedded
   - Import from URL or file with merge/replace modes
   - CLI: secubox profile export/import/share
   - LuCI: New profiles.js view with export/import dialogs

3. Skill System:
   - Capability discovery from module catalogs
   - Quality indicators based on provider count
   - CLI: secubox skill list/providers/install/check
   - LuCI: New skills.js view with provider browser

4. Feedback Loop:
   - Issue reporting and resolution tracking
   - Search existing resolutions
   - CLI: secubox feedback report/resolve/search/list
   - LuCI: New feedback.js view for knowledge base

Technical changes:
- RPCD backend with 17 new API methods
- POSIX shell compatibility fixes (ESC via printf, tr A-Z a-z)
- LuCI menu entries for new views

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 10:13:54 +01:00
06faaabc19 refactor(bonus): Rename luci-app-secubox-bonus to secubox-app-bonus
- Remove all LuCI dependencies (luci-base, rpcd, luci-lib-jsonc)
- Remove LuCI-specific files (RPCD backend, ACL, menu, JS views)
- Package now only provides local opkg feed and documentation
- Remove Packages.sig to avoid signature verification errors
- Update local-build.sh to skip signature generation for local feeds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 07:21:19 +01:00
26b1f476f8 fix(bonus): Strip libc dependency from local feed packages
- Update local-build.sh to remove libc from Packages index
- Prevents opkg architecture mismatch errors on install
- Regenerate secubox-feed with 74 packages
- Update RPCD scripts for lyrion, mailinabox, metablogizer, nextcloud

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 06:32:00 +01:00
3cff626582 refactor(menu): Move WireGuard to Services menu
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 18:05:42 +01:00
413ebb45a0 fix(mitmproxy,tor-shield): Add transparent mode firewall support
- Add RPCD methods to mitmproxy: settings, save_settings, set_mode,
  setup_firewall, clear_firewall
- Add apply_now parameter to tor-shield save_settings to restart
  service and apply iptables rules immediately
- Update ACL files with new permissions
- Add Save & Apply button to tor-shield settings page
- Update api.js files to use correct RPCD method signatures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 17:58:53 +01:00
8207c05376 fix(service-registry): Disable slow direct services aggregation by default
The direct services provider was calling jsonfilter in a loop for each
listening port (~40 ports), causing XHR timeouts in the UI.

Changes:
- Disable direct provider by default (set enabled=0)
- Add limit of 20 services if enabled
- Skip common system ports (22, 53, 67, 68, 123, 547, 953)
- Add note about enabling via UCI if needed

The real services come from HAProxy vhosts and UCI published services.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:37:02 +01:00
d2e7836ab7 fix(lyrion): Fix LXC container startup and user permissions
- Run Lyrion as nobody (uid 65534) via LXC init.uid/gid settings
- Use cgroup2 memory limit format (lxc.cgroup2.memory.max)
- Convert memory limit string (1G, 256M) to bytes for cgroup2
- Skip opkg install if LXC binaries already exist
- Set proper file ownership during rootfs creation
- Remove su command from start.sh (handled by LXC config)

Fixes the container crash loop caused by Lyrion refusing to run as root.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 16:23:03 +01:00
2d861656ed refactor(menu): Move Network Diagnostics to Services menu
- Network Diagnostics: admin/secubox/netdiag -> admin/services/network-diagnostics

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:41:34 +01:00
37c8e37e6a refactor(menu): Move CrowdSec and Threat Monitor to Services menu
- CrowdSec: admin/secubox/security/crowdsec -> admin/services/crowdsec
- Threat Monitor: admin/secubox/security/threats -> admin/services/threat-monitor

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:31:13 +01:00
06a70c2968 fix(tor-shield,security-threats): Preset persistence and firewall stats
Tor Shield:
- Store current_preset in UCI when enabling with preset
- Return current_preset in status response
- Initialize currentPreset from stored UCI value on page load

Security Threats:
- Fix get_security_stats() firewall packet counting
- Use correct nftables chain names (input_wan, handle_reject)
- Fix grep -c exit code issue (returns 1 when no matches)
- Improve numeric validation (use tr -cd to strip non-digits)
- Add fallbacks for HAProxy socket paths

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:29:24 +01:00
89073b96cf feat(tor-shield): Add exit node hostname (reverse DNS) to dashboard
- refresh_ips now fetches reverse DNS for exit IP
- Status includes exit_hostname from cache
- Dashboard displays hostname below exit IP
- get_exit_ip also returns hostname

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:18:38 +01:00
52e9fbd866 fix(tor-shield): Fix RPC expect declarations breaking API calls
The expect: { success: false } was causing LuCI RPC to return false
instead of the actual response. Changed all expect declarations to
empty objects to get raw API responses.

Also improved error messages to show actual response for debugging.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:15:06 +01:00
39d29e8308 fix(tor-shield): Preset selection now immediately activates preset
- Clicking a preset card now enables/restarts Tor with that preset
- Previously it only selected the preset for next toggle
- Added better error handling for toggle and preset changes
- Page reloads after successful preset change

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 15:12:46 +01:00
e44f801f36 fix(tor-shield): Fix toggle using stale status, fetch fresh before action
The toggle handler was receiving status captured at render time which
could be stale due to polling. Now fetches fresh status before deciding
to enable or disable, and does a full page reload after action.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:57:17 +01:00
98fafccf05 fix(network-tweaks): Count HAProxy vhosts, LXC, firewall ports in cumulative impact
The cumulative impact summary was showing zeros because it only checked
the plugins catalog. Now also counts:
- HAProxy vhosts directly from UCI
- Running LXC containers
- Running Docker containers
- Firewall WAN ACCEPT rules with ports
- DNSmasq entries

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:31:52 +01:00
ef3e26561d fix: Button clickability, AdGuard ports, Tor Shield links
- Fix disabled buttons in Network Tweaks using conditional rendering
- Change AdGuard Home ports to avoid conflicts (web: 3003, dns: 5353)
- Add DNS & Proxy link from Tor Shield to Network Tweaks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:20:57 +01:00
25dcee0f4f feat(tor-shield): Add prominent master protection switch
- Add always-visible toggle switch at top of dashboard
- Clear visual indication: green when protected, red when exposed
- Shows protection status text and toggle switch
- Easier one-click enable/disable of Tor protection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:16:56 +01:00
4254919dd7 feat(network-tweaks): Add AdGuard Home DNS control
- Add AdGuard Home status card with enable/disable and Open UI button
- Add setAdGuardEnabled RPCD method for Docker container control
- Rename section to "DNS & Proxy Services"
- Responsive grid layout for 3 service cards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:15:10 +01:00
dc4ec3f102 feat(network-tweaks): Add CDN cache and WPAD proxy controls
- Add CDN cache status card with enable/disable and restart buttons
- Add WPAD auto-proxy card with enable/disable toggle
- Add getProxyStatus, getWpadStatus, setWpadEnabled RPCD methods
- Move menu to Services section
- Update ACL for CDN cache and WPAD control

Also fixes:
- security-threats: Fix HAProxy socket path for connection stats
- tor-shield: Add missing ACL methods for excluded destinations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 14:07:38 +01:00
aa5b8097c5 docs(cdn-cache): Comprehensive README with API and troubleshooting
- Full RPCD API documentation with all methods
- UCI configuration examples
- Client setup instructions (manual proxy and transparent mode)
- Nginx cache configuration details
- Troubleshooting guide
- Default cache policies table

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:44:23 +01:00
ad8d25256d feat(tor-shield): Add excluded destinations for direct/CDN access
- Add get_excluded_destinations() method to list bypassed destinations
- Add add_excluded_destination() to exclude IPs/CIDRs/domains from Tor
- Add remove_excluded_destination() to remove exclusions
- Add apply_exclusions() to restart tor-shield with new rules
- Domain resolution attempts to get IP for iptables compatibility
- Existing private network CIDRs (192.168/10/172.16/127) are default excluded

Also includes metablogizer fixes:
- reload_haproxy() helper function
- Server address uses 127.0.0.1 for uhttpd backends
- fix_permissions() on file uploads

PKG_RELEASE: tor-shield=3, metablogizer=3

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:41:07 +01:00
8ab662e160 fix(metablogizer): Improve site creation and HAProxy integration
- Add reload_haproxy() helper function for consistent reloads
- Use 127.0.0.1 for uhttpd backend address instead of 192.168.255.1
- Call fix_permissions() on upload_file to ensure correct file access
- Update delete_site to use reload_haproxy helper
- Bump PKG_RELEASE to 3

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:19:52 +01:00
de6b4c8076 feat: Add HTTP health checks, portal speedtest, and fix cert detection
- metablogizer: Add HTTP health checks for backend (uhttpd) and frontend (HAProxy)
- metablogizer: Fix BusyBox-compatible certificate expiry detection using openssl checkend
- secubox-portal: Add speed test widget with ping/download/upload measurement
- tor-shield: Fix settings save ensuring UCI sections exist
- cdn-cache: UI improvements and restructure
- streamlit: Fix port conflict (sappix now uses 8503)
- secubox-core: Add proxy mode detection
- security-threats: Dashboard improvements
- haproxy: Init.d and Makefile updates

PKG_RELEASE bumps:
- luci-app-cdn-cache: 3
- luci-app-metablogizer: 2
- luci-app-secubox-portal: 2
- luci-app-secubox-security-threats: 2
- luci-app-secubox: 4
- luci-app-streamlit: 9
- luci-app-tor-shield: 2
- secubox-app-haproxy: 23
- secubox-core: 6

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 13:13:10 +01:00
56afd02d40 fix(client-guardian): Safe defaults + emergency clear + safety limits
BREAKING: Default policy changed from quarantine to open
- Disabled by default (was enabled)
- Default policy: open (was quarantine - blocked new devices!)
- Auto-zoning: disabled by default
- Auto-parking zone: lan_private (was guest)
- Night block schedule: disabled by default
- Threat auto-ban: disabled by default

Safety mechanisms added:
- MAX_BLOCKED_DEVICES limit (10) prevents mass blocking
- check_safety_limit() function validates before blocking
- clear_all_cg_rules() emergency function via RPCD
- safety_status RPCD method to check current state

UI improvements:
- Added warnings for restrictive policies
- Reordered options (safe options first)
- Clearer descriptions of consequences

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 10:59:07 +01:00
477c2fa162 refactor(menu): Move SecuBox services to LuCI Services menu
Move 9 service apps from admin/secubox/services/ to admin/services/:
- localai, lyrion, magicmirror2, mailinabox, mmpm
- nextcloud, ollama, vhost-manager, mitmproxy

Services now appear under standard LuCI Services menu for consistency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 10:49:56 +01:00
0f82b73f9c fix(crowdsec): Dynamic LAPI port detection + feed docs
- Fix LAPI status check to dynamically read port from config
- Previously hardcoded wrong port (8080 vs 8180)
- Add comprehensive SecuBox feed documentation to README
- Document opkg configuration, HAProxy publishing, troubleshooting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 10:41:25 +01:00
c8918baf41 feat: HAProxy IPv6, ACME fixes, deploy command, docs
HAProxy:
- Add IPv6 dual-stack binding (*:port,[::]:port)
- Exclude ACME challenges from HTTPS redirects
- Fix certificate path detection for multiple locations

Service Registry:
- Fix certificate expiry check paths (HAProxy, ACME, Let's Encrypt)
- BusyBox-compatible date parsing

local-build.sh:
- Add deploy command for automated package deployment
- Sync packages to router feed with index generation

Documentation:
- Add README for luci-app-haproxy
- Add README for luci-app-hexojs
- Add README for luci-app-metablogizer
- Add README for luci-app-mitmproxy
- Add README for luci-app-tor-shield

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 10:33:51 +01:00
e01504d4a8 feat(service-registry): Add public IP detection and external port check
- Add get_network_info RPCD method:
  - Public IPv4/IPv6 detection via external services
  - Reverse DNS hostname lookup
  - External port accessibility test (upstream router/ISP check)
- Enhance check_service_health:
  - Compare DNS resolution against actual public IP
  - Detect private IP misconfiguration (192.168.x.x pointing)
  - Test external port reachability
- Add Network Connectivity panel to dashboard:
  - Shows public IPs with hostnames
  - External port 80/443 accessibility status
  - Local firewall and HAProxy status
- Improve URL Readiness Checker:
  - Display public IP info
  - Show specific recommendations with IP addresses
  - Detect and explain DNS pointing to private IP

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 07:15:49 +01:00
99612f0c1a docs(service-registry): Add comprehensive README
Document all features including:
- Health monitoring and URL readiness checker
- Service publishing workflow
- Health check API usage
- Troubleshooting guide for common issues
- UCI configuration reference
- RPCD methods reference

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 07:02:58 +01:00
ab8e0c44bc feat(service-registry): Add dynamic health checks and URL readiness wizard
- Add health check RPCD methods:
  - check_service_health: Check DNS, cert, firewall for single domain
  - check_all_health: Batch check all published services
- Add URL Readiness Checker wizard card to dashboard:
  - Check if domain DNS resolves correctly
  - Verify firewall ports 80/443 are open
  - Check SSL certificate status
  - Show actionable recommendations
- Display inline health status badges on service rows:
  - DNS resolution status (ok/failed)
  - Certificate expiry (ok/warning/critical/expired)
- Add health summary bar showing overall system status
- Add per-service health check button

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 07:01:27 +01:00
b762bffa44 feat(haproxy,service-registry): Auto-open firewall when publishing
Automatically creates firewall rules for HAProxy when:
- Requesting a certificate (haproxyctl cert add)
- Publishing a service with a domain (service-registry)

Added firewall rules:
- HAProxy-HTTP: Allow port 80 from WAN (ACME challenges)
- HAProxy-HTTPS: Allow port 443 from WAN (HTTPS traffic)

Rules are only created if they don't exist, preventing duplicates.
Firewall reloads automatically after rule creation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 06:53:27 +01:00
a96899c520 docs(haproxy): Add comprehensive README with ACME webroot documentation
Documents:
- ACME webroot mode architecture (zero-downtime certs)
- Certificate management commands
- UCI configuration options
- Virtual host and backend setup
- CLI reference
- Troubleshooting guide
- File locations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 06:46:26 +01:00
67cd2854a1 feat(haproxy): Add webroot mode for ACME - no HAProxy restart needed
Certificate issuance now uses webroot mode instead of standalone:
- HAProxy routes /.well-known/acme-challenge/ to local ACME webserver
- Added acme_challenge backend on port 8402
- Uses busybox httpd to serve challenge files
- No HAProxy restart required during certificate requests
- Config auto-regenerates before cert request to ensure ACME backend

This eliminates downtime during certificate issuance and allows
multiple concurrent certificate requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 06:45:08 +01:00
bc5bd8d8ce feat(haproxy,service-registry): Add async cert workflow and fix QR codes
HAProxy Certificates:
- Add async certificate request API (start_cert_request, get_cert_task)
- Non-blocking ACME requests with background processing
- Real-time progress tracking with phases (starting → validating → requesting → verifying → complete)
- Add staging vs production mode toggle for ACME
- New modern UI with visual progress indicators
- Task persistence and polling support

Service Registry:
- Fix QR codes using api.qrserver.com (Google Charts deprecated)
- Fix form prefill with proper _new section selectors
- Add change event dispatch for LuCI form bindings
- Update landing page generator with working QR API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 06:40:57 +01:00
8d08ccd4a4 fix(service-registry): Fix RPC data handling and landing page permissions
- Remove expect clause from RPC declarations to get raw response
- Add proper error handling with catch blocks for all RPC calls
- Fix landing page generator to chmod 644 after generation
- Fixes "No Services Found" issue in dashboard
- Fixes "Forbidden" error when accessing landing page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 05:32:57 +01:00
ccba39da62 feat(service-registry): Add unified service aggregation dashboard
Implement Service Registry LuCI app for unified service management:
- RPCD backend aggregating services from HAProxy, Tor, netstat, LXC
- One-click publish to clearnet (HAProxy+ACME) and/or Tor hidden service
- Static landing page generator with QR codes for all URLs
- LuCI dashboard with service grid, quick publish form
- CLI tool (secubox-registry) for command-line management
- Share buttons for X, Telegram, WhatsApp

RPCD methods: list_services, publish_service, unpublish_service,
generate_landing_page, get_qr_data, list_categories

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 05:04:26 +01:00