Commit Graph

88 Commits

Author SHA1 Message Date
c5c488b7cb feat(cloner): Add OpenWrt version selection and package profiles to image builder
- Add --version and --profile CLI options to secubox-cloner build command
- Add versions command to list available OpenWrt releases (24.10.5, 24.10.0, 23.05.5, 23.05.4)
- Add package profiles: slim (minimal), core (mesh essentials), full (clone current device)
- Add list_versions and list_build_profiles RPCD methods for LuCI
- Update build_image RPCD to accept version and profile parameters
- Update ACL permissions for new read methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 09:28:20 +01:00
5fd3ebb17a feat(factory): Add zero-touch auto-provisioning for mesh devices
- Add inventory.sh for hardware inventory collection (MAC, serial, model, CPU, RAM, storage)
- Add profiles.sh for profile management and device matching
- Add default.json profile template for auto-provisioned peers
- Add discovery mode to master-link.sh with pending queue and approval workflow
- Add bulk token generation (up to 100 tokens per batch)
- Enhance 50-secubox-clone-provision with inventory collection and discovery join
- Add 9 new RPCD methods to luci.cloner for factory provisioning
- Fix p2p-mesh.sh to be silent when sourced as library
- Add UCI options: discovery_mode, auto_approve_known, discovery_window, default_profile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 17:58:36 +01:00
6b7aa62a0e feat(mesh): ZKP authentication and blockchain sync
- ZKP Mesh Authentication: Zero-Knowledge Proof identity for mesh nodes
  - New API endpoints: zkp-challenge, zkp-verify, zkp/graph
  - Shell functions: ml_zkp_init, ml_zkp_challenge, ml_zkp_verify
  - Enhanced join flow with optional ZKP proof requirement
  - Blockchain acknowledgment via peer_zkp_verified blocks
  - LuCI dashboard with ZKP status section and peer badges

- MirrorNet Ash Compatibility: Fixed BusyBox shell incompatibilities
  - Replaced process substitution with pipe-based patterns
  - Fixed mirror.sh, gossip.sh, health.sh, identity.sh

- Mesh Blockchain Sync: Fixed chain synchronization between nodes
  - Fixed /api/chain/since endpoint to return only new blocks
  - chain_add_block/chain_merge_block use awk for safe JSON insertion
  - Handles varying JSON formatting (whitespace, newlines)
  - Tested bidirectional sync: Master <-> Clone at height 70

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 16:45:42 +01:00
8a51a3e655 fix(led-pulse): Check HAProxy on host instead of LXC container
HAProxy runs on the host, not in an LXC container. The LED pulse
script was incorrectly checking `lxc-attach -n haproxy -- pgrep haproxy`
which always failed, causing constant SPUNK ALERT red LED flashing.

Changed to check host process directly with `pgrep haproxy`.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-24 07:03:57 +01:00
edbd58d95d feat(security): Add ndpid to security dashboard, Streamlit/MetaBlogizer to apps
Security KISS Dashboard:
- Add ndpid (nDPI daemon) to RPCD status method
- Add ndpid to services monitoring array (6 services total)

APPS Portal:
- Add Streamlit to Services category (Python data apps)
- Add MetaBlogizer to Services category (AI blog generation)

Also includes secubox-cloner enhancements from earlier session.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 15:29:54 +01:00
28d781cfc7 fix(cloner): Fix ASU API request format for image building
- Convert packages string to proper JSON array format
- Add -dnsmasq to avoid conflict with dnsmasq-full
- Add rootfs_size_mb: 512 for larger package sets
- Trim default packages to fit in standard rootfs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 09:30:17 +01:00
ce9c42bc37 feat(dashboard): Add LAN, BR-WAN, and public IPs to network panel
- Update RPCD get_public_ips to return 4 IP fields:
  - lan_ipv4: br-lan interface IP
  - wan_ipv4: br-wan interface IP
  - public_ipv4: Real public IP (cached from ipify.org)
  - public_ipv6: Global IPv6 from br-wan
- Update dashboard to display 4-column IP grid with icons
- Add responsive CSS for 2x2 layout on small screens

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 06:17:27 +01:00
13c1e596d2 feat(core): Add 3-tier stats persistence and LuCI tree navigation
Stats Persistence Layer:
- Add secubox-stats-persist daemon for never-trashed stats
- 3-tier caching: RAM (/tmp) → buffer → persistent (/srv)
- Hourly snapshots (24h), daily aggregates (30d)
- Boot recovery from persistent storage
- Heartbeat line: real-time 60-sample buffer (3min window)
- Evolution view: combined influence score over time

RPCD Stats Module:
- get_timeline: 24h evolution for all collectors
- get_evolution: combined influence score timeline
- get_heartbeat_line: real-time 3min buffer
- get_stats_status: persistence status and current values
- get_history: historical data per collector
- get_collector_cache: current cache value

LuCI Tree Navigation:
- Add clickable tree of all 60+ SecuBox LuCI apps
- Organized by category: Security, Network, Monitoring, Services, etc.
- Real-time search filter
- Available at /secubox-public/luci-tree and /admin/secubox/luci-tree

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 11:23:27 +01:00
750f79db3c feat(cloner): Add multi-device image support
- Support building images for: mochabin, espressobin-v7, espressobin-ultra, x86-64
- New CLI: secubox-cloner build --device espressobin-v7
- New CLI: secubox-cloner devices (list supported devices)
- RPCD: list_devices method, build_image accepts device_type param
- LuCI: Device selection dropdown in build modal
- LuCI: Device column in images table with badges
- Each device type has its own TFTP image file

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 06:17:12 +01:00
e3d7873d7b fix(dashboard): Fix empty recent_visitors due to subshell issue
- Pipe | while runs in subshell, json_add calls don't affect parent
- Use temp files to avoid subshell: write data to file, then read
- Fixed https_visitors, top_endpoints, recent_visitors arrays
- All arrays now properly populated with visitor data

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 12:12:20 +01:00
d8578653b4 feat(metrics): Add active sessions panel to SecuBox Metrics
- Add get_active_sessions RPCD method to dashboard module
- Display session counts: Tor circuits, HTTPS, Streamlit, Mitmproxy, SSH
- Add ACTIVE SESSIONS panel with yellow/gold theme
- Add RECENT VISITORS panel showing visitor IPs and countries
- Add TOP ENDPOINTS panel showing accessed paths
- Add ACL permissions for get_active_sessions
- Auto-refresh with other metrics every 10 seconds

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 11:45:29 +01:00
b1c22b7f10 feat(dashboard): Add system overview infographic to LuCI admin
- Add get_system_overview RPCD method
- Add renderSystemOverview to admin dashboard.js
- Display system health, resources, services, network, security stats
- Styled with cyberpunk theme

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 10:21:15 +01:00
0f5fc39778 feat(core): Add secubox-dashboard system infographic tool
New CLI tool for system overview:
- Console mode: ASCII formatted dashboard
- JSON mode: Structured data for LuCI integration

Displays:
- System health (load, CPU, memory, disk)
- Services (HAProxy, MetaBlogizer, Streamlit, Tor)
- Network connections (total, Tor, HTTPS)
- Security stats (CrowdSec bans, attack types, countries)

Usage: secubox-dashboard [console|json]

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 10:11:29 +01:00
90f555f38a fix(secubox-core): Remove metablogizer from LXC watchdog
MetaBlogizer uses per-site uhttpd instances, not LXC containers.
The watchdog was incorrectly treating it as an LXC service and
constantly trying to restart a non-existent container.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 07:43:20 +01:00
a694241604 fix(crowdsec): Fix alerts extraction in overview collector
Replace failing awk-based JSON parsing with jsonfilter per-alert extraction.
Alerts now correctly populate in CrowdSec dashboard.

Changes:
- Use jsonfilter to extract created_at, scenario, source_ip per alert
- Loop through up to 8 alerts with index-based access
- Remove Python dependency (not available on OpenWrt)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 06:07:57 +01:00
d76e26ed52 feat(cloner): Add U-Boot power-on intercept mode
- Add uboot_poweron_intercept() for aggressive boot interception
- Sends continuous break chars while monitoring for Marvell>> prompt
- Supports modes: break (default), poweron, wait
- Uses Python serial for precise timing and pattern detection
- Updates secubox-cloner with improved serial handling

Usage: ./secubox-clone-station.sh uboot /dev/ttyUSB0 poweron

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 16:48:36 +01:00
e28f7b952f refactor(secubox-core): Modularize luci.secubox RPCD handler
Split 2544-line monolithic handler into thin dispatcher + 14 modules:
- _common.sh: Shared utilities (json_success, check_service_running, etc.)
- core.sh: getStatus, getVersion, reload
- modules.sh: Module management (install, remove, update)
- profiles.sh: Profile management
- snapshots.sh: Snapshot/recovery
- health.sh: Health & diagnostics
- dashboard.sh: Dashboard data & quick actions
- appstore.sh: AppStore & catalog operations
- state.sh: Component state management
- network.sh: WAN access, services, proxy mode
- feeds.sh: Feed management
- skills.sh: Skill management
- feedback.sh: Issue/resolution tracking
- p2p.sh: P2P hub operations

Benefits:
- Each module is focused on a single domain
- Easier to maintain, test, and debug
- New features can be added as new modules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 09:45:13 +01:00
8015d790e0 feat(cloner): Add SecuBox Station Cloner/Deployer
Host-side orchestrator (secubox-clone-station.sh):
- Dual USB serial control with MOKATOOL integration
- ASU API firmware building for clone images
- TFTP serving with auto-generated U-Boot commands
- Full workflow: detect → pull → flash → verify

On-device CLI (secubox-cloner):
- Build ext4 images for same device type
- TFTP server management via dnsmasq
- Clone token generation with auto-approve
- Integration with master-link mesh onboarding

First-boot provisioning (50-secubox-clone-provision):
- Partition resize to full disk (parted + resize2fs)
- Master discovery via mDNS/network scan
- Automatic mesh join with pre-approved tokens

Master-link enhancements:
- ml_clone_token_generate() for 24h auto-approve tokens
- ml_token_is_auto_approve() for token type detection
- Auto-approve logic in join request handler

SecuBox CLI additions:
- secubox clone (build, serve, token, status, list, export)
- secubox master-link (status, peers, token, join, approve)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 06:52:59 +01:00
ab34719f9f feat(secubox-core): Add secubox-landing page generator
- Add secubox-landing script to generate landing pages from HAProxy vhosts
- Integrate landing command into secubox CLI
- Add boot hook to regenerate landing pages on startup
- Fix HAProxy multi-cert SNI using crt-list instead of directory mode
- Fix backend IPs from 127.0.0.1 to 192.168.255.1 for LXC compatibility
- Auto-convert localhost IPs in RPCD handler and CLI tools

Landing page features:
- Groups all services by zone with stats header
- Shows SSL certificate status per domain
- Categorizes by type: Streamlit, Blog, Admin, Media, Dev, etc.
- Regenerates at boot (30s after startup)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 06:15:37 +01:00
9884965e2b feat(heartbeat): Add DNS, BIND, CrowdSec health monitoring
- Add DNS resolution test to heartbeat status
- Include BIND, CrowdSec, HAProxy, mitmproxy service checks
- Add security metrics (crowdsec_bans, dns_response)
- Improve health score calculation with all services

Router changes (not in repo):
- Enabled BIND recursion with forwarders (9.9.9.9, 1.1.1.1)
- Added BIND query/security logging
- Added CrowdSec acquisition for BIND logs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 10:12:52 +01:00
a00f4b6b84 feat(secubox-core): Add detail collector for LuCI flash views
- Creates double-buffered JSON caches with last N entries
- Caches: threats, kernel, syslog, crowdsec details
- Writes to /tmp/secubox and /www for LuCI access
- Cron runs every minute for real-time updates
- Usage: secubox-detail-collector [count] [type]

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 09:03:36 +01:00
549c0425e7 feat: Stats evolution, LED tri-color pulse, Widget Fabricator
Stats Collection:
- Add unified secubox-stats-collector for crowdsec/mitmproxy/firewall
- Add secubox-status-json and metablogizer-json for landing page
- JSON cache files in /tmp/secubox/ for double-buffer status

LED Pulse Daemon:
- Tri-color status sync matching control panel (Health/CPU/Memory)
- SPUNK ALERT mode for critical service failures (HAProxy/CrowdSec down)
- Integrated into secubox-core init.d for auto-start on boot

Landing Page:
- Add Blogaliser section with MetaBlogizer sites
- Add health indicators (green/yellow/red status dots)
- Add security stats (dropped, bans, connections)

Streamlit Enhancements:
- Add test_upload RPCD method for upload validation
- Add reupload button for replacing existing apps
- Add secubox_control.py reading from cache (LXC-compatible)
- Update ACL and API for new methods

HAProxy Fixes:
- Fix invalid use_backend entries (IP:port -> backend names)
- Add streamlit_hello backend
- Save routing to UCI config for persistence

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:43:45 +01:00
7b77f839a9 fix(secubox-core): BusyBox-compatible LED pulse (no fractional sleep)
BusyBox sleep doesn't support fractional seconds (0.33s fails).
Changed to rapid triple-pulse burst then 3s rest:
- Beat1 (LED1) → Beat2 (LED2) → Beat3 (LED3) in quick succession
- Shell overhead (~50ms) provides inter-beat timing
- 3 second sleep between cycles

Pattern visible on MochaBin RGB LEDs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:36:24 +01:00
aab58a2b43 fix(secubox-core): Adjust LED pulse timing to 0.33s (tiers de second)
Changed LED heartbeat tick interval from 0.15s to 0.33s for more
visible pulse pattern. Adjusted cycle pause from 8 to 6 ticks.

Triple-pulse cycle now spans ~4 seconds total:
- 3 beats + 2 gaps + 6 rest = 11 ticks × 0.33s = ~3.6s

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:26:52 +01:00
a47ae9656c feat(secubox-core): Add triple-pulse LED heartbeat with staggered cascade
Implements organic "bump-bump-bump (pause)" pattern across 3 RGB LEDs:
- LED1 (health) leads the pulse sequence
- LED2 (threat) follows with offset timing (décalé)
- LED3 (capacity) trails as final beat in cascade
- Smooth intensity transitions between beats
- Subtle breathing effect during rest period
- Event pulse override preserved for alerts

Pattern timing: beat1 → gap → beat2 → gap → beat3 → rest (0.15s ticks)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:22:49 +01:00
301dccec33 fix(secubox-core): Prevent duplicate avahi-publish processes in mesh discovery
Track avahi-publish PID in /tmp/secubox-avahi-mesh.pid and check if process
is still running before spawning a new one. Prevents process accumulation
when discover_peers() is called repeatedly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 17:21:07 +01:00
0a3b1dfc6e feat(secubox-core): Add double-buffer status cache and fix LED blocking
- Remove mmc0 LED from heartbeat loop (was causing LED freeze)
- Implement background status_collector_loop() with staggered intervals
- Add 10 cache files at /tmp/secubox/*.json for instant status reads
- Add status_cached RPCD methods to 6 packages:
  - luci.crowdsec-dashboard
  - luci.mitmproxy
  - luci.secubox-netifyd
  - luci.client-guardian
  - luci.mac-guardian
  - luci.network-anomaly

Dashboards and APIs now read pre-computed JSON cache instead of
spawning subprocesses, eliminating blocking during concurrent requests.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 16:34:35 +01:00
a2dd2499d6 feat(secubox-core): Add file integrity monitoring
- secubox-integrity: SHA256-based file integrity checker
- Monitors critical files: haproxy.cfg, firewall, network, passwd, shadow
- Cron job runs check every 5 minutes
- LED pulse alert on file changes
- Commands: init, check, status, clear

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:07:24 +01:00
29ba711acc feat(secubox-core): Add 4-LED dashboard with dedicated functions
LED assignment for MochaBin:
- led1: Global health status (green/yellow/red with pulse variations)
- led2: Security threat meter (CrowdSec + mitmproxy activity)
- led3: Global capacity (CPU + Network combined, color gradient)
- mmc0: Classic heartbeat when stable, rapid blink on state changes

Features:
- Fast 1.5s heartbeat loop for reactive visual feedback
- Health score from services (HAProxy, CrowdSec) + memory/disk
- Threat level from CrowdSec alerts and mitmproxy stats
- Combined CPU load + network throughput capacity meter
- Event pulse system for config/task/alert notifications
- State change detection for mmc0 stability indicator

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 10:41:50 +01:00
5205b3b2bd feat(secubox-core): Add LED heartbeat for MochaBin and Vortex services dashboard
- Add LED heartbeat to secubox-core daemon using MochaBin's RGB LEDs (led1)
  - Green flash: system healthy
  - Double red flash: warning state
  - Long red flash: error state
  - Blue flash: boot/startup
- LED pulses once per watchdog cycle (default 60s)
- New UCI options: led_heartbeat (default 1), watchdog_interval (default 60)
- Add "Node Services" section to Vortex DNS LuCI dashboard showing published sites
- Bump secubox-core version to 0.10.0-r12

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 09:38:13 +01:00
f2f24afe12 feat(domoticz): Rewrite from Docker to LXC Debian container
- Switch from Docker to LXC with Debian bookworm rootfs and native
  Domoticz binary from GitHub releases (latest/download pattern)
- Fix LXC cgroup2 terminal allocation: add lxc.tty.max, lxc.pty.max,
  cgroup2 device permissions for standard char devices, disable seccomp
- Fix PID 1 issue: run domoticz as child process with signal forwarding
- Use quoted heredoc with sed placeholders for start script generation
- Update LuCI view: Docker → LXC references, add memory usage display
- Remove Docker image UCI option, update catalog runtime to "lxc"
- Fix streamlit LXC config: same cgroup2/terminal/seccomp fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:05:39 +01:00
89896568b1 feat(domoticz): Add LuCI dashboard with MQTT auto-bridge and Zigbee2MQTT integration
New luci-app-domoticz package with RPCD handler (12 methods), LuCI overview
(status, IoT integration, MQTT, HAProxy, mesh, logs), and full service lifecycle.
Enhanced domoticzctl with configure-mqtt (auto Mosquitto+Z2M bridge), configure-haproxy,
backup/restore, mesh-register, and uninstall commands. UCI extended with mqtt/network/mesh
sections. Catalog updated with LuCI package and IoT tags. MirrorNetworking strategic
document noted in planning files.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:32:17 +01:00
79bb3c43f4 feat: Add smbfs mount manager, Jellyfin READMEs, Glances host visibility, planning updates
New secubox-app-smbfs package for SMB/CIFS remote directory management
with smbfsctl CLI (add/remove/mount/umount/test/status), UCI config,
auto-mount init script, and Jellyfin/Lyrion media path integration.

Glances LXC: host bind mounts (/rom, /overlay, /boot, /srv), Docker
socket fix (symlink loop), fs plugin @exit_after patch, hostname/OS
identity, pre-generated /etc/mtab.

KISS READMEs for secubox-app-jellyfin and luci-app-jellyfin. Planning
files updated with Domoticz IoT, AI Gateway strategy, App Store P2P
emancipation, and v2 roadmap items.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 21:02:46 +01:00
20cbf0adf3 fix(portal): Add helper script for reliable service enumeration
- Create /usr/bin/secubox-services-status helper script
- Update portal scanInitServices to use helper script
- Fallback to inline script if helper not available
- Fixes 0/0 services display caused by fs.exec output buffering

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 06:11:10 +01:00
92f73fc3d2 feat(mitmproxy): Add HAProxy backend inspection and token auth
- Add HAProxy → mitmproxy → Backend inspection chain for filtering
  all vhost traffic through mitmproxy with threat detection
- Add haproxy_router.py addon for Host-based request routing
- Add mitmproxyctl commands: sync-routes, haproxy-enable, haproxy-disable
- Add auth token to status response for Web UI auto-authentication
- Add HAProxy Backend Inspection section to LuCI status page with
  enable/disable/sync controls
- Add HAProxy Router settings section to LuCI settings page
- LXC container now supports dual-port mode (8888 + 8889 for HAProxy)
- Token displayed with copy button in dashboard

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 15:49:05 +01:00
15e04b58a5 feat(core): Add secubox-swiss unified CLI tool
Swiss Army knife for SecuBox with interactive menu and direct commands:
- status: System overview with services, docker, mesh
- mesh: P2P mesh operations (peers, discover, sync)
- security: CrowdSec status, threats, block/unblock
- docker: Container management
- haproxy: Vhosts and reload
- network: Diagnostics, ports, connections
- recover: Snapshot/restore operations
- feed: Package management

Also updates feed with Jitsi packages and core v0.10.0-r11.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 13:52:32 +01:00
00082fe066 feat(jitsi): Add Jitsi Meet video conferencing integration
- secubox-app-jitsi: Docker-based Jitsi stack with jitsctl control CLI
- luci-app-jitsi: LuCI web configuration interface
- Catalog entry for SecuBox AppStore

Features:
- End-to-end encrypted video conferencing
- HAProxy integration with WebSocket/SSL support
- Mesh federation for SecuBox P2P network
- User authentication management
- Backup/restore functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 13:29:06 +01:00
45f222e72c feat(secubox-core): Add P2P mesh API endpoints for console discovery
- Add /chain/tip endpoint for blockchain tip query
- Add /catalog/console endpoint for version info
- Add symlinks for /api/ prefix compatibility
- Fix chain.json malformed JSON structure

Enables console to discover C3BOX device via mesh API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 05:40:03 +01:00
005d1fd5d4 docs: Add README for secubox-console and secubox-swiss
- secubox-console: Python remote management CLI/TUI
  - Device discovery, multi-device management
  - Plugin system, self-updating
  - Live dashboard with rich TUI

- secubox-swiss: Unified Swiss Army Knife tool
  - Quick actions (status, backup, reborn, sync, health)
  - Tool dispatch to mesh/recover/console/mitm
  - Interactive menu and self-enhancement

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
9acab29c34 feat(v0.17): P2P Mesh Recovery, MITM Analytics, Swiss Army Knife
Major features:
- P2P Mesh distributed recovery infrastructure with blockchain catalog
- MITM analytics proxy for external access monitoring (IP, country, scans)
- SecuBox Swiss unified CLI tool for management & recovery
- Python remote management console (secubox-console)
- Multi-theme landing page generator (mirrorbox, cyberpunk, minimal, terminal, light)
- Service Registry enhancements with health check and network diagnostics
- Services page modernization with Service Registry API integration

New components:
- secubox-swiss: Swiss Army Knife unified management tool
- secubox-mesh: P2P mesh networking and sync
- secubox-recover: Snapshot, profiles, rollback, reborn scripts
- secubox-console: Python remote management app
- secubox_analytics.py: MITM traffic analysis addon

Fixes:
- Service Registry ACL permissions for secubox services page
- Port status display (firewall_open detection)
- RPC response handling for list_services

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
78f4fe4962 feat: Major updates - CDN cache with Squid, network modes UI rework, bugfixes
CDN Cache:
- Migrate from nginx to Squid proxy for better caching
- Add aggressive caching rules for Windows Update, Linux repos, Steam, Apple
- Proper firewall integration via UCI (transparent proxy)
- Real-time stats from Squid access logs

Network Modes:
- Complete UI rework with MirrorBox dark theme
- 9 network modes with emojis and descriptions
- Dynamic CSS animations and modern styling

Fixes:
- Fix jshn boolean handling in secubox-recovery (1/0 vs true/false)
- Fix nDPId RPCD to use netifyd as fallback DPI provider
- Update media-flow and security-threats dashboards

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
8317ac354f 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 19:46:28 +01:00
203a2cfe5a 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 19:46:28 +01:00
6f5f9d77c8 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 19:46:28 +01:00
dd63c9cfa9 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 19:46:27 +01:00
d9e77745db 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-30 19:46:27 +01:00
1b228d40d1 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-30 19:46:27 +01:00
b64f9a0a1d 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-30 19:46:27 +01:00
329d5febb9 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-30 19:46:26 +01:00
906bf6f549 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-30 19:46:26 +01:00