Commit Graph

276 Commits

Author SHA1 Message Date
d03608e3e3 docs: Update WIP.md for v0.20.6 release
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 07:36:20 +01:00
aecd4ee4f6 docs: Update tracking files for mailctl firewall & Nextcloud 31.0.14
- Nextcloud upgraded from 30.0.17 to 31.0.14
- mailctl firewall_setup now persists UCI rules for mail ports
- All apps updated (mail, tasks, external, spreed/Talk)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 23:59:16 +01:00
f6f4176170 docs: Update tracking files for mail reception fix
- Mark "Inbound Port 25 Blocked" as RESOLVED
- Document nftables and postfix lmdb fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:53:06 +01:00
19406e128c fix(mailserver): Complete dovecot permission fixes
- Add dovecot run directory permission setup
- Add dovenull to dovecot group (fixes login directory access)
- Update HISTORY.md with changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:43:46 +01:00
ca6d4fa160 docs: Update tracking files for Nextcloud and WAF fixes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 15:12:15 +01:00
31aea08b0c docs: Update tracking files for mailserver password fix
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 14:00:43 +01:00
7151bc6138 feat(mailserver): Add mail autoconfig and user repair features
Autoconfig:
- Created config-v1.1.xml (Thunderbird), autodiscover.xml (Outlook),
  email.mobileconfig (Apple) for automatic mail client configuration
- Added uhttpd instance on port 8025 to serve autoconfig files
- Added HAProxy backends with waf_bypass for autoconfig domains
- Added mailctl autoconfig-setup and autoconfig-status commands

LuCI Mailserver:
- Added user_repair method for mailbox repair (doveadm force-resync)
- Added repair button to user actions in overview

LuCI Nextcloud:
- Added list_users method to list Nextcloud users
- Added reset_password method for password reset via OCC

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 13:26:23 +01:00
a461e0e4d6 docs: Update tracking files for mailserver alias feature
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 12:54:04 +01:00
c2cd204ea9 feat(hexojs): Multi-instance enhancement with backup/restore and Git integration
- Add backup/restore commands to hexoctl (backup, restore, backup list/delete)
- Add GitHub clone support (hexoctl github clone <url> [instance] [branch])
- Add Gitea push support (hexoctl gitea push [instance] [message])
- Add quick-publish command (clean + build + publish in one step)
- Add 15 new RPCD methods for instance/backup/git management
- Rewrite LuCI dashboard with KISS theme:
  - Multi-instance management with status cards
  - Instance controls: start/stop, quick publish, backup, editor, preview
  - GitHub/Gitea clone modals
  - Backup table with restore/delete
  - Stats grid: instances, posts, drafts, backups
- Update API with 12 new RPC declarations
- Update ACL with new permissions

Also includes DNS Master app created in previous session.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 10:26:55 +01:00
efa74990be feat(mailserver): KISS theme enhancement for LuCI dashboard
- Complete rewrite of overview.js with full KISS theme styling
- 4-column stats grid (Status, Users, Storage, SSL)
- Port status cards with visual indicators
- Two-column layout: Users + Aliases tables
- Webmail card with status badge and quick actions
- Connection info panel with server details
- Live polling with 10s refresh
- Added fix_ports, alias_del methods to ACL
- Added Mail Server + Nextcloud to KISS nav sidebar

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 09:52:19 +01:00
1d3fb1ed7c docs: Update tracking files for Nextcloud SSL, WAF rules, mail autoconfig
- Nextcloud production deploy with HAProxy SSL
- WAF rules for Nextcloud & Roundcube CVEs
- Mail client autoconfig DNS and XML endpoint

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 09:01:11 +01:00
09b40c3b88 feat(nextcloud): Migrate to LXC with full-stack enhancement
- Migrate from Docker to Debian 12 LXC container
- Full stack: Nginx, MariaDB, Redis, PHP 8.2-FPM, Nextcloud
- Rewrite nextcloudctl CLI with install/backup/restore/ssl/occ commands
- New UCI config schema: main, db, redis, ssl, backup sections
- Enhanced RPCD backend with 15 methods
- KISS dashboard with Overview/Backups/SSL/Logs tabs
- Updated dependencies for LXC packages
- SecuBox menu path integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-16 07:49:17 +01:00
59d0e89a8c feat(gk2hub): Use subdomain URLs instead of redirect paths
- Infrastructure: media, localai, webmail, feed, tube, social, wazuh
- MetaBlogizer: HAProxy vhost lookup for automatic subdomain detection
- Added icons for new service types (tube, social, wazuh, etc.)
- 67 services now display with proper subdomain URLs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 17:01:54 +01:00
491120609b docs: Update tracking files for mitmproxy WAF dashboard fix
- Added mitmproxy WAF data path fix to WIP.md and HISTORY.md
- RPCD now reads from /srv/mitmproxy-in for correct threat stats

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 10:35:01 +01:00
8cfa6fba70 docs: Update tracking files for mailserver gk2 restore and Gitea privacy fix
- Restored gk2@secubox.in user from backup after container reinstall
- Fixed secubox-evolution Gitea repo privacy (public → private)
- Documented secubox_evolution streamlit instance fix (runtime config)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 09:45:56 +01:00
274dbd8add docs: Update tracking files for 2026-02-15 work
- HAProxy reload fix (copy config before signal)
- Mitmproxy Host header preservation for OAuth
- WAF global reset (70 vhosts/ACLs)
- PeerTube email configuration with mailserver
- Wazuh agent watchdog implementation
- Streamlit Gitea sync (4 new repos)
- Service fixes (roundcube, evolution, wazuh)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 09:19:30 +01:00
f3f6eb4e4b fix(haproxy,mitmproxy): Fix config reload and preserve Host header
haproxyctl:
- Copy generated config to /etc/haproxy/ inside container before reload
- HAProxy reads from /etc/haproxy/haproxy.cfg, not /opt/haproxy/config/

mitmproxy haproxy_router.py:
- Save original Host header before setting backend destination
- Restore Host header after routing to preserve it for backend validation
- Fixes PeerTube OAuth and other apps that validate Host header

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 07:40:20 +01:00
5c34ca2cae feat(luci): Add luci-app-peertube dashboard for PeerTube video platform
- RPCD handler (luci.peertube) with 11 methods: status, start, stop,
  install, uninstall, update, logs, emancipate, live_enable,
  live_disable, configure_haproxy
- ACL permissions for read (status, logs) and write operations
- Dashboard features:
  - Install wizard with features and requirements
  - Service status display with access URL
  - Live streaming toggle with enable/disable buttons
  - HAProxy configuration status
  - Emancipate form for public exposure
  - Logs viewer with refresh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-15 05:51:04 +01:00
54d555206b chore(feed): Update secubox-app-bonus local feed packages
Regenerated Packages index with proper Filename fields for all ipk files.
Updated all package versions to latest builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 17:18:02 +01:00
9eaa16171d fix(mitmproxy): Fix wildcard route priority matching
- Support both "*.domain" and ".domain" wildcard formats in haproxy_router.py
- Sort wildcards by length (longest first) for correct specificity matching
- Add auto-reload: check routes file mtime every 10 requests
- Update metablogizerctl to use mitmproxyctl sync-routes

Also fix luci-app-wazuh api.js to use baseclass.extend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 16:03:43 +01:00
b1c34021db feat(wazuh): Add LuCI dashboard for Wazuh SIEM integration
Create luci-app-wazuh package with unified security monitoring dashboard
inspired by SysWarden's layered defense model:

- 4 views: Overview, Alerts, File Integrity, Agents
- RPCD handler with 12 API methods for status, alerts, FIM, agent control
- SysWarden-style 4-layer security visualization:
  - Layer 1: Vortex Firewall + nftables (kernel-level)
  - Layer 2: CrowdSec + Bouncer (IPS)
  - Layer 3: Wazuh Manager (SIEM/XDR)
  - Layer 4: mitmproxy + HAProxy (WAF)
- CrowdSec integration for threat correlation
- Real-time polling and auto-refresh
- Simplified printf-based JSON output (avoids jshn segfault)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 14:45:05 +01:00
86edee5e56 docs: Document SDLC content restoration and Streamlit WAF bypass
- Fixed sdlc.gk2.secubox.in showing GK2 Hub template instead of original
  "Les Seigneurs de La Chambre" cinematic presentation
- Restored content via git checkout from preserved history
- Documented Streamlit WebSocket incompatibility with MITM proxy
- All 20 Streamlit apps require waf_bypass for WebSocket functionality

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 12:09:09 +01:00
ba2f459151 docs: Update WIP.md with WAF architecture configuration
- WAF enabled for Streamlit/MetaBlogizer
- WAF bypass for infrastructure services
- 38 path ACLs with waf_bypass

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:59:28 +01:00
98fb91a0ce docs: Document WAF architecture configuration
- WAF enabled for Streamlit/MetaBlogizer (security filtering)
- WAF bypass for infrastructure (Jellyfin, Mail, Glances, etc.)
- Path ACLs bypass WAF (mitmproxy routes by host only)
- 38 path ACLs configured with waf_bypass

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:58:19 +01:00
e30ca81288 docs: Update WIP.md with C3BOX service verification
- Added C3BOX SDLC full verification (70 services, 12 zones)
- 77 vhosts, 52 SSL certs, 5 LXC containers confirmed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:43:28 +01:00
c1187e5815 docs: Update HISTORY.md with C3BOX full service verification
- Verified all 70 services across 12 zones
- 20 Streamlit apps, 15 MetaBlog sites operational
- 77 vhosts, 52 SSL certs, 5 LXC containers running

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:42:50 +01:00
ede1532d4b docs: Update WIP.md with 2026-02-14 completions
- Mitmproxy routes duplicate fix
- Service backend fixes (play.maegia.tv, client, social)
- Glances 4.5.0.4 installation
- GoToSocial service start

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:32:18 +01:00
81c19d2927 docs: Update HISTORY.md with vhost routing fixes and Glances install
- Fixed mitmproxy duplicate routes causing mixed content
- Fixed play.maegia.tv, client, social backends
- Installed Glances 4.5.0.4 via pip3
- Verified 70+ vhosts operational

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 11:31:09 +01:00
189c2a405e docs: Update HISTORY.md with Domoticz exposure and WAF fix
- Documented home.maegia.tv (Domoticz) exposure
- Documented WAF redirect loop fix for gk2.secubox.in
- Added mitmproxy-in configuration changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 10:59:05 +01:00
cd53d508fa feat(jellyfin): Update to v3.0.0 with LXC-based deployment
- Rebuilt secubox-app-jellyfin package with LXC controller
- Updated package feed with new Jellyfin ipk
- Synced all SecuBox packages to local feed

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 09:48:51 +01:00
3d78b22d85 docs: Document Docker to LXC migration for mail and media services
Migrated services from Docker to LXC:
- mailserver: Postfix/Dovecot on Alpine (192.168.255.30)
- roundcube: Webmail on Alpine with nginx/PHP (port 8027)
- jellyfin: Media server on Debian (192.168.255.31)

All Docker containers removed, auto-start via /etc/init.d/secubox-lxc

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 09:02:11 +01:00
2637fb516b fix(haproxy): Add waf_bypass option for WebSocket-heavy apps
Streamlit apps require WebSocket connections that mitmproxy WAF
doesn't handle properly. Added waf_bypass UCI option to allow
specific vhosts to route directly to backends while other
services still get WAF protection.

- Add waf_bypass option check in haproxyctl
- Vhosts with waf_bypass=1 skip mitmproxy_inspector
- Fixes blank page issue with Streamlit apps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 08:03:27 +01:00
b62f82b77e feat(gotosocial): Migrate to LXC container with Alpine rootfs
- Create Alpine 3.21 LXC container with gcompat for glibc compatibility
- GoToSocial v0.17.0 runs inside container with host networking
- Data directory bind-mounted at /data inside container
- Add user management commands via chroot/lxc-attach
- Add `shell` command for container access
- Add `user password` command for password resets
- Fix architecture variable naming (aarch64/arm64 confusion)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 07:16:54 +01:00
cac9fa3e4f fix(mitmproxy): Fix false positives for legitimate browsers
- Remove 'mozilla/5.0' from BOT_SIGNATURES - was flagging ALL modern
  browsers as bots since this is the standard UA prefix
- Fix suspicious UA detection - no longer flags normal browsers
- Increase CrowdSec bruteforce threshold from 5/30s to 10/60s to reduce
  false positives from normal login flows

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-14 05:51:53 +01:00
51b301d980 docs: Add GoToSocial deployment to tracking files
- HISTORY.md: Entry #60 documenting GoToSocial v0.17.0 deployment
- WIP.md: Added to Just Completed section
- Includes HAProxy exposure, admin user setup, key fixes

Live at https://social.gk2.secubox.in

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 16:37:59 +01:00
b8d34e7e3a fix(haproxy): Use LAN IP for backends (HAProxy runs in LXC container)
- metablogizer: Use network.lan.ipaddr instead of 127.0.0.1 for server address
- service-registry: Same fix for emancipate function
- hexojs: Same fix for HAProxy backend creation
- gotosocial: Switch from LXC to direct execution mode
  - v0.18.0 has cgroup bugs, using v0.17.0 instead
  - Remove LXC container dependency
  - Use /srv/gotosocial for binary and data
  - Add proper PID file management

The HAProxy container cannot reach 127.0.0.1 on the host, so all HAProxy
backend servers must use the LAN IP (typically 192.168.255.1).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 14:49:50 +01:00
b5b2b98b68 feat(luci-app-cloner): Add remote device management and ASU clone builder
- Add remote device management: scan_network, list_remotes, add_remote,
  remove_remote, remote_status, remote_upload, remote_flash RPCD methods
- Add secubox-asu-clone script for on-the-fly firmware generation via
  OpenWrt ASU (Attended Sysupgrade) API
- Include full LuCI packages in ASU builds (luci-base, luci-mod-admin-full,
  luci-mod-network, luci-mod-status, luci-mod-system, etc.)
- Add partition expansion script (10-expand-rootfs) to use full SD card/eMMC
  with proper UUID and boot config handling for both MBR and GPT
- Add robust provisioning script (99-secubox-provision) with network retry,
  firewall handling, and SecuBox package installation from local feed
- Use dropbear's dbclient for SSH operations (OpenWrt native)
- Support mochabin, espressobin-v7, espressobin-ultra, x86-64 devices
- Default to OpenWrt version 24.10.5

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-13 07:30:36 +01:00
9ad45d6b1d feat(haproxy,metablogizer,streamlit): Add GK2 Hub landing page regeneration hooks
Add hooks to auto-regenerate the GK2 Hub landing page when services change:
- haproxyctl: vhost add/remove, reload
- metablogizerctl: publish, delete, emancipate
- streamlitctl: instance add/remove, app delete, emancipate

The gk2hub-generate script dynamically builds the landing page from
HAProxy vhosts, Streamlit instances, and MetaBlogizer sites.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 14:35:51 +01:00
9048f6b53b style(ndpid): Migrate dashboard and flows views to KISS theme
- Remove old secubox-theme and secubox-portal/header dependencies
- Remove external dashboard.css stylesheet
- Replace ndpid/api with direct RPC declarations
- Use KISS classes (kiss-card, kiss-stat, kiss-table, kiss-badge, kiss-btn)
- Add consistent navigation tabs
- Add poll toggle for auto-refresh control
- Use CSS variables (--kiss-blue, --kiss-green, --kiss-muted, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 13:51:36 +01:00
c69ae43961 feat(interceptor,ddos): Add Insider WAF pillar and DDoS hardening profile
InterceptoR Insider WAF (6th pillar):
- RPCD: get_insider_waf_status() tracking LAN client threats
- Dashboard: 🔒 Insider WAF card with threat stats
- CrowdSec scenarios for insider threats:
  - C2 beacon, exfiltration, DNS tunneling, lateral movement
  - Cryptominer, IoT botnet, suspicious TLDs, high volume

DDoS Protection Hardening:
- Config Advisor: 8 DDoS checks (SYN cookies, conntrack, RP filter,
  ICMP rate, CrowdSec http-dos, HAProxy maxconn, mitmproxy WAF, Vortex)
- ANSSI rules: New "ddos" category with remediation steps
- Documentation: DOCS/DDOS-PROTECTION.md with full guide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 10:46:16 +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
e58f479cd4 feat(waf): Update WAF scenarios with 2024-2025 CVEs and OWASP threats
Add detection patterns for latest actively exploited vulnerabilities:
- CVE-2025-55182 (React2Shell, CVSS 10.0)
- CVE-2025-8110 (Gogs RCE), CVE-2025-53770 (SharePoint)
- CVE-2025-52691 (SmarterMail), CVE-2025-40551 (SolarWinds)
- CVE-2024-47575 (FortiManager), CVE-2024-21887 (Ivanti)
- CVE-2024-3400, CVE-2024-0012, CVE-2024-9474 (PAN-OS)

New attack categories based on OWASP Top 10 2025:
- HTTP Request Smuggling (TE.CL/CL.TE conflicts)
- AI/LLM Prompt Injection (ChatML, instruction markers)
- WAF Bypass techniques (Unicode normalization, double encoding)
- Supply Chain attacks (CI/CD poisoning, dependency confusion)
- Extended SSTI (Jinja2, Freemarker, Velocity, Thymeleaf)
- API Abuse (BOLA/IDOR, mass assignment)

CrowdSec scenarios split into 11 separate files for reliability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-12 05:02:57 +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
8ef0c70d0f feat(iot-guard): Add IoT device isolation and security monitoring
Backend (secubox-iot-guard):
- OUI-based device classification with 100+ IoT vendor prefixes
- 10 device classes: camera, thermostat, lighting, plug, assistant, etc.
- Risk scoring (0-100) with auto-isolation threshold
- Anomaly detection: bandwidth spikes, port scans, time anomalies
- Integration with Client Guardian, MAC Guardian, Vortex Firewall
- iot-guardctl CLI for status/list/scan/isolate/trust/block
- SQLite database for devices, anomalies, cloud dependencies
- Traffic baseline profiles for common device classes

Frontend (luci-app-iot-guard):
- KISS-style overview dashboard with security score
- Device management with isolate/trust/block actions
- Vendor classification rules editor
- Settings form for UCI configuration
- RPCD handler with 11 methods
- Public ACL for unauthenticated dashboard access

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 10:36:04 +01:00
11e444e0f7 feat(luci): KISS rewrite for System Hub and SecuBox Dashboard
- System Hub overview.js: self-contained with inline CSS, 6 status cards
  (hostname, uptime, services, CPU, temp, health score), 3 resource bars,
  quick actions, services table, 5s polling, dark mode

- SecuBox dashboard.js: removed external deps (api, theme, nav, header),
  inline CSS, header chips, stats cards, health panel, public IPs,
  modules table, quick actions, alerts timeline, 15s polling, dark mode

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 09:28:17 +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
06d9d08f86 feat(luci-app-cloner): Add cloning station LuCI dashboard
- Dashboard with status cards: device, TFTP, tokens, clones
- Quick actions: Build Image, Start/Stop TFTP, Token generation
- Clone images table with size and TFTP-ready status
- Token management with auto-approve option
- U-Boot flash commands display when TFTP is running
- RPCD handler with 10 methods for full cloner management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-11 05:13:33 +01:00
4ce50821d5 docs: Update HISTORY.md with metrics dashboard features
- Entry 30: SecuBox Metrics Dashboard (v0.19.14)
- Entry 31: CrowdSec Decision Count Fix (v0.19.15)
- Entry 32: Active Sessions Panel (v0.19.15)
- Entry 33: Live Real-Time Metrics Dashboard (v0.19.16)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 11:53:42 +01:00
744123b615 docs: Update FAQ with HAProxy SNI/certs.list troubleshooting
- Add HAProxy multi-domain SSL certificate matching issue
- Document crt-list solution for SNI issues
- Minor updates to settings and streamlit readme

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 16:49:02 +01:00
b6235df631 docs(wip): Update HAProxy path ACL with sorting fix
- Pattern length sorting ensures longest paths match first
- Apex domain routing: secubox.in/gk2/** replaces *.gk2.secubox.in
- Verified /gk2, /gk2/evolution, /gk2/control all routing correctly

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-09 06:38:03 +01:00
e91c6519eb docs: Update WIP.md with Gandi DNS secondary setup
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 20:11:36 +01:00
b05c800a7d docs: Update WIP.md with path-based ACL routing
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 11:56:03 +01:00
88d1f3377c docs: Update WIP.md with 2026-02-08 session work
- Vortex Hub wildcard routing
- Mitmproxy WAF subdomain metrics
- RPCD luci.secubox modular refactor
- HAProxy backend IP fixes
- GK2 node service mapping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 11:41:16 +01:00
7aab04d012 feat(evolution): Add real-time GitHub commits display
- New "🚀 Devel" tab with live GitHub commit activity (1-min cache)
- Metrics: Commits Today, This Week, Contributors, Stars
- Commit type distribution (feat/fix/docs/refactor/chore)
- Recent commits list with hash, message, author, relative time
- Repository stats: forks, watchers, open issues
- Cyberpunk-themed commit cards with color-coding
- Pulsing live indicator animation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-08 07:15:05 +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
95f5022082 docs: Track yijing360 deployment and emancipation
- Fixed port conflict (console 8515, yijing360 8521)
- Deployed yijing-360.zip with generator.py
- Emancipated at yijing360.gk2.secubox.in

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 15:47:36 +01:00
73b10c1518 docs: Stats Evolution plan complete
All 4 phases implemented:
- Stats collectors with 17 JSON cache files
- Landing page JSON symlinks for gk2.secubox.in
- Widget Fabricator with live data
- Full integration verified

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 15:36:15 +01:00
15010571cb docs: Track lldh.ganimed.fr multi-domain SSL setup
- Secondary domain for La Livrée d'Hermès gallery
- OVH DNS + Let's Encrypt SSL
- Same backend as lldh.gk2.secubox.in

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 11:49:49 +01:00
f0abe576de docs: Track Fabricator live data update, lldh gallery
- Fabricator pages now use actual UCI/JSON data (bfd2ed7c)
- La Livrée d'Hermès gallery deployed with YouTube music

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 11:36:03 +01:00
adec1144d6 feat: Streamlit ZIP flatten, mitmproxy bot whitelist, Fabricator app
- Add extract_zip_flatten() to Streamlit RPCD for nested ZIP handling
- Add bot whitelist to mitmproxy WAF (Facebook, Google, Bing crawlers)
- Skip threat detection for whitelisted legitimate crawlers
- Track Fabricator app and stats evolution in HISTORY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 09:59:20 +01:00
736ac9332b docs: Update tracking files with HAProxy and CrowdSec fixes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 06:41:56 +01:00
82fb9c7d42 feat(haproxy): Add End of Internet fallback page and http-request support
- Create cyberpunk-style End of Internet page for unknown domains
- Add http-request UCI option support in haproxyctl generator
- Support path rewriting backends with http-request set-path
- Configure end_of_internet as default backend for both frontends
- Update docs with HAProxy enhancements (entry #59)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-07 05:37:39 +01:00
3e2101725e feat(fabricator): Add Embedder tab and sync to repo
- Add 7th tab "🪟 Embedder" for creating unified portal pages
- Embeds Streamlit apps, MetaBlogizer sites, custom URLs
- Three layouts: Grid, Tabs, Sidebar
- Auto-fetches available services from JSON endpoints
- Add streamlit-apps/fabricator/ to repo
- Update HISTORY.md with session changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 22:09:47 +01:00
e3b2b00fbb docs: Track CrowdSec cache, mitmproxy green-known, Control Panel fixes
- Add HISTORY.md entry #49: CrowdSec Dashboard Cache & Control Panel Fixes
  - CrowdSec Overview Collector v4 with background JSON cache
  - RPCD fast path reading from cache first
  - mitmproxy Local IP "Green Known" patch
  - Control Panel file compatibility symlinks
- Update WIP.md Just Completed section with today's changes
- Renumber entries 50-57 in HISTORY.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 21:59:15 +01:00
178e7e7bd2 docs: Track session 2026-02-06 - LED heartbeat, Streamlit emancipate, Console app
Milestone 54:
- Triple-pulse LED heartbeat with staggered cascade (BusyBox-compatible)
- Streamlit emancipate command for KISS ULTIME MODE exposure
- Evolution dashboard real-time upgrade with auto-refresh
- SecuBox Console app live at console.gk2.secubox.in

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 18:16:54 +01:00
13fdab6987 docs: Mark mesh onboarding testing as validated
- Token generation, IPK download, join flow all tested
- Blockchain records peer_approved events correctly
- Threat intel collecting 288 IOCs, 67 chain blocks
- Next: multi-node mesh testing with real P2P sync

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 15:28:44 +01:00
d315f3b861 docs: Track mailserver Maildir path alignment fix
- Add entry 52 to HISTORY.md for Postfix/Dovecot path alignment
- Update WIP.md with fix details under completed items

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 12:16:29 +01:00
fb28b17c3f fix(lxc): Resolve cgroup v2 compatibility and HAProxy stability
- Fix ALL LXC containers with cgroup v2 compatibility
  - Remove cgroup:mixed (incompatible with cgroup v2)
  - Add cgroup2.devices.allow for standard character devices
  - Add proc:mixed sys:ro for HAProxy /proc mount
- Regenerate HAProxy config (was truncated to global/defaults)
- Restore Streamlit apps (add secubox_control:8511)
- Document Punk Exposure emancipate CLI commands

Containers fixed: haproxy, streamlit, gitea, domoticz, glances,
hexojs, lyrion, magicmirror2, mailserver, mitmproxy, picobrew, zigbee2mqtt

Services verified: HAProxy, Streamlit (9 apps), Gitea, CrowdSec, DNS

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 11:42:47 +01:00
708e5656f0 docs: Update HISTORY.md with LED heartbeat and Vortex services
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 09:38:56 +01:00
e21ca8a060 feat(metablogizer): Add KISS ULTIME MODE emancipate workflow
Add `metablogizerctl emancipate <name>` command for one-command full
exposure workflow:
1. DNS A record via dnsctl (Gandi/OVH based on availability)
2. Vortex DNS mesh publication
3. HAProxy vhost with SSL/ACME enabled
4. SSL certificate request (webroot mode)
5. Zero-downtime HAProxy reload

Usage:
  metablogizerctl create myblog blog.example.com
  metablogizerctl emancipate myblog

Bump version to 1.1.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 08:30:58 +01:00
3d26c8a64e docs: Document mail server DNS and firewall fixes
- BIND zone was returning internal IP (192.168.255.1) instead of public IP
- Added IPv6 AAAA records to BIND zone and Gandi DNS
- Fixed nftables forward_wan chain blocking DNAT'd mail traffic
- Added mail port forwarding rules for both IPv4 and IPv6
- Documented Free ISP inbound port 25 blocking issue

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 07:46:38 +01:00
bede51d80c fix(mailserver): Enable submission/smtps/pop3s ports
- Add fix-ports command to enable ports 587, 465, 995
- Install dovecot-pop3d package for POP3S support
- Add submission/smtps services to Postfix master.cf
- Uncomment pop3s/imaps SSL listeners in Dovecot
- Add Fix Ports button to LuCI Quick Actions
- Include dovecot-pop3d in initial container setup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 06:20:21 +01:00
0f4649c1e0 feat(config-advisor): Add ANSSI CSPN compliance checking packages
secubox-config-advisor:
- 7 check categories (network, firewall, auth, encryption, services, logging, updates)
- 25+ security rules with severity-weighted scoring (0-100, grade A-F)
- Auto-remediation for 7 checks with dry-run mode
- LocalAI integration for AI-powered suggestions
- config-advisorctl CLI with 20+ commands

luci-app-config-advisor:
- Dashboard with score circle, grade, risk level, compliance rate
- Compliance view by category with pass/fail/warn badges
- Remediation view with apply/preview buttons
- Settings for framework, weights, categories, LocalAI

Part of v1.0.0 ANSSI CSPN certification roadmap.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 05:56:17 +01:00
006ff03c86 feat(mirrornet): Add v0.19 MirrorNetworking core packages
MirrorNet Core (secubox-mirrornet):
- DID-based identity (did:plc:) with keypair management
- Peer reputation scoring (0-100) with trust levels
- Service mirroring via reverse proxy chaining
- Enhanced gossip protocol with priority routing
- Health monitoring with anomaly detection
- mirrorctl CLI with 30+ commands

Identity Package (secubox-identity):
- Standalone DID generation (AT Protocol compatible)
- HMAC-SHA256 keys with Ed25519 fallback
- Key rotation with backup support
- Trust scoring integration
- identityctl CLI with 25+ commands

P2P Intel Package (secubox-p2p-intel):
- Signed IOC sharing for mesh
- Collectors: CrowdSec, mitmproxy, WAF, DNS Guard
- Cryptographic signing and validation
- Source trust verification
- Application: nftables/iptables/CrowdSec
- Approval workflow for manual review
- p2p-intelctl CLI with 20+ commands

LuCI Dashboard (luci-app-secubox-mirror):
- Identity card with DID, hostname, role
- Peer reputation table with trust levels
- Gossip protocol statistics
- Health alerts with acknowledgment
- RPCD handler with 15 methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 18:43:19 +01:00
223abb1114 feat(vortex-dns): Complete meshed subdomain delegation system
- Add init.d script for daemon mode with procd integration
- Update Makefile to install init script
- Add packages to bonus feed (secubox-vortex-dns, luci-app-vortex-dns)
- Update tracking files with completion status

Features:
- Master/slave hierarchical DNS delegation
- Wildcard domain management (*.domain)
- First Peek auto-registration of services
- Gossip-based exposure config sync via secubox-p2p
- Submastering for nested hierarchies
- LuCI dashboard with mode detection and action buttons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:23:18 +01:00
7f4f34b930 feat(vortex-dns): Add LuCI dashboard for mesh DNS management
New package: luci-app-vortex-dns
- Dashboard showing mode, status, sync info
- Master section with delegated zones table
- Slave section with parent master info
- Mesh peers section with online status
- Actions: Initialize master, Join slave, Delegate zone, Mesh sync
- RPCD handler with 8 methods

Also fixes:
- Mail port hijacking: WAN-only DNAT rules
- Threat-analyst LocalAI port: 8081 → 8091
- Domoticz password reset

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:05:01 +01:00
ffc3138d2b docs: Document mail port hijacking fix
Firewall DNAT rules were redirecting ALL port 993/587/465 traffic
to local mailserver, blocking external mail server connections.

Fix: Add -i $WAN_IF to only redirect inbound WAN traffic.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 12:53:15 +01:00
ae26317815 fix(mailserver): Use LMDB maps instead of hash for Alpine Postfix
Alpine Linux's Postfix is compiled with LMDB support, not BerkeleyDB
hash support. This caused "Temporary lookup failure" errors on send.

Changes:
- Changed virtual_alias_maps and virtual_mailbox_maps to lmdb: prefix
- Copy resolv.conf to Postfix chroot for DNS resolution
- Added `mailctl fix-postfix` command to repair existing installations

Root cause: virtual_alias_maps was configured as hash:/etc/postfix/virtual
but the hash map type is not supported on Alpine, only lmdb.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 12:27:00 +01:00
44493ebfe3 feat: Add CVE Triage Agent and Vortex DNS, fix webmail login
New Packages:
- secubox-cve-triage: AI-powered CVE analysis and vulnerability management
  - NVD API integration for CVE data
  - CrowdSec CVE alert correlation
  - LocalAI-powered impact analysis
  - Approval workflow for patch recommendations
  - Multi-source monitoring (opkg, LXC, Docker)

- luci-app-cve-triage: Dashboard with alerts, pending queue, risk score

- secubox-vortex-dns: Meshed multi-dynamic subdomain delegation
  - Master/slave hierarchical DNS delegation
  - Wildcard domain management
  - First Peek auto-registration
  - Gossip-based exposure config sync
  - Submastering for nested hierarchies

Fixes:
- Webmail 401 login: config.docker.inc.php was overriding IMAP host
  to ssl://mail.secubox.in:993 which Docker couldn't reach
- Fixed mailctl webmail configure to use socat proxy (172.17.0.1:10143)

Documentation:
- Added LXC cgroup:mixed fix to FAQ-TROUBLESHOOTING.md
- Updated CLAUDE.md to include FAQ consultation at startup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 12:19:54 +01:00
c6fb79ed3b feat: Add unified backup manager, custom mail server, DNS subdomain generator
New packages:
- secubox-app-backup: Unified backup for LXC containers, UCI config, services
- luci-app-backup: KISS dashboard with container list and backup history
- secubox-app-mailserver: Custom Postfix+Dovecot in LXC with mesh backup

Enhanced dnsctl with:
- generate: Auto-create subdomain A records
- suggest: Name suggestions by category
- mail-setup: MX, SPF, DMARC record creation
- dkim-add: DKIM TXT record management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 10:40:32 +01:00
e13b6e4c8c feat(vhost-manager): Add centralized VHost manager
- Create secubox-app-vhost-manager package for unified vhost orchestration
- Single CLI tool (secubox-vhost) manages HAProxy, DNS, Tor, Mesh, mitmproxy
- Unified UCI config (/etc/config/vhosts) as single source of truth
- Backend adapters for each component (haproxy.sh, dns.sh, tor.sh, mesh.sh, mitmproxy.sh)
- Centralized backend resolution function (backends.sh)
- Import tool for existing HAProxy vhosts
- Validation of backend reachability before creation

Also includes:
- FAQ-TROUBLESHOOTING.md with LXC cgroup v1/v2 fixes
- Fix mitmproxyctl cgroup v1 -> v2 syntax for container compatibility
- HAProxy backend resolution bugfixes

CLI commands:
  secubox-vhost add <domain> <service> <port> [--ssl] [--tor] [--mesh]
  secubox-vhost remove/list/status/enable/disable/set/sync/validate/import

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 10:16:19 +01:00
0e0749ed08 feat: Add threat-analyst, dns-guard, mcp-server and DNS provider DynDNS
New packages:
- secubox-threat-analyst: AI-powered threat analysis with CrowdSec integration
- luci-app-threat-analyst: LuCI dashboard for threat intelligence
- secubox-dns-guard: DNS security monitoring and blocking
- secubox-mcp-server: Model Context Protocol server for AI assistant integration

Enhancements:
- dns-provider: Add DynDNS support (dyndns, get, update, domains commands)
- gandi.sh: Full DynDNS with WAN IP detection and record updates
- luci-app-dnsguard: Upgrade to v1.1.0 with improved dashboard

Infrastructure:
- BIND9 DNS setup for secubox.in with CAA records
- Wildcard SSL certificates via DNS-01 challenge
- HAProxy config fixes for secubox.in subdomains
- Mail server setup with Roundcube webmail

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 08:30:28 +01:00
57d04c276d docs: Mark LocalAI 3.9 upgrade complete in tracking files
- Update v0.18.0 checklist: LocalAI 3.9 done
- Add HISTORY entry for LocalAI v3.9.0 upgrade
- Update WIP.md progress table

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 05:03:35 +01:00
8cf4039fbb docs: Align tracking files with Fanzine v3 4-layer architecture
Restructure TODO.md and WIP.md to follow SecuBox Fanzine v3 structure:

- Couche 1 — Core Mesh: 35+ modules, v0.18 priorities, CVE Layer 7
- Couche 2 — AI Gateway: Data Classifier, 6 Agents, MCP Server
- Couche 3 — MirrorNetworking: EnigmaBox → MirrorNet, VoIP, Matrix
- Couche 4 — Roadmap: v0.18/v0.19/v1.0/v1.1+ milestones, certifications

Key additions:
- Data classification table (LOCAL ONLY / SANITIZED / CLOUD DIRECT)
- 6 Autonomous Agents with phase assignments
- MCP Server tools specification
- AI provider hierarchy (Mistral > Claude > GPT > Gemini > xAI)
- Certification targets (ANSSI CSPN, ISO 27001, NIS2, CE, GDPR, SOC2)
- Version milestone checklists

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 04:59:59 +01:00
a0d0bb24ca feat(mac-guardian): Add WiFi MAC security packages to bonus feed
- Build and add secubox-app-mac-guardian_0.5.0-r1_all.ipk
- Build and add luci-app-mac-guardian_0.5.0-r1_all.ipk
- Sync luci-app-mac-guardian to local-feed for SDK building
- Update apps-local.json catalog with proper metadata:
  - Category: security, Icon: wifi
  - Descriptions for frontend and backend packages
- Rebuild all bonus feed packages

Package features:
- WiFi MAC address spoofing detection
- OUI anomaly detection for device fingerprinting
- MAC flood protection via hotplug.d integration
- CrowdSec scenarios for automated threat response

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 04:55:53 +01:00
b11aee79c0 docs: Update tracking files for exposure and jellyfin features
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 04:45:35 +01:00
53af5ac2e9 feat(exposure): Add emancipate/revoke commands for multi-channel exposure
- `emancipate <service> <port> <domain> [--tor] [--dns] [--mesh] [--all]`
  Unified multi-channel exposure: Tor + DNS/SSL + Mesh in single command
- `revoke <service> [--tor] [--dns] [--mesh] [--all]`
  Removes exposure from selected channels
- Enhanced `status` command shows emancipated services with active channels
- UCI tracking for emancipation state (port, domain, channel flags)
- Integrates with dnsctl, haproxyctl, and secubox-p2p

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 04:18:33 +01:00
5a856e5da2 feat(monitoring): Add empty-state loading and dynamic bandwidth units
- Add animated "Collecting data..." overlay with pulsing dots during
  5-second chart warmup period
- Chart legend transitions from "Waiting" to "Live" when data arrives
- Add formatBits() helper for network rate display (Kbps/Mbps/Gbps)
- Network rates now use SI units (bits) instead of bytes
- Cyberpunk theme support for empty state styling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 04:04:32 +01:00
c5e22fd08d refactor(nav): Unify navigation component with auto-theme initialization
SecuNav.renderTabs() now automatically initializes theme and loads CSS,
eliminating boilerplate from views. Added renderCompactTabs() for nested
modules and renderBreadcrumb() for back-navigation.

Updated module navs: cdn-cache, client-guardian, crowdsec-dashboard,
media-flow, mqtt-bridge, system-hub. Removed ~1000 lines of duplicate CSS.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 03:42:32 +01:00
ec8d8956df chore: Mark completed TODO items (chip header, smbfs, ksmbd, P2P, Domoticz)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:38:47 +01:00
186cddb163 chore: Update WIP with remaining bonus feed rebuild task
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:34:15 +01:00
304ac7b9a1 feat: P2P App Store, Remote Access & Mesh Media packages
P2P App Store Emancipation:
- secubox-p2p: Package distribution via mesh peers (CGI API, RPCD, CLI)
- packages.js: LuCI view with LOCAL/PEER badges, fetch/install actions
- devstatus.js: Dev Status widget with Gitea commits, v1.0 progress tracking
- secubox-feed: sync-content command for auto-installing content packages
- ACL fix for P2P feed RPCD methods

Remote Access:
- secubox-app-rustdesk: Native hbbs/hbbr relay server from GitHub releases
- secubox-app-guacamole: LXC Debian container with guacd + Tomcat (partial)

Content Distribution:
- secubox-content-pkg: Auto-package Metablogizer/Streamlit as IPKs
- Auto-publish hooks in metablogizerctl and streamlitctl

Mesh Media:
- secubox-app-ksmbd: In-kernel SMB3 server with ksmbdctl CLI
- Pre-configured shares for Jellyfin, Lyrion, Backup

UI Consistency:
- client-guardian: Ported to sh-page-header chip layout
- auth-guardian: Ported to sh-page-header chip layout

Fixes:
- services.js: RPC expect unwrapping bug fix
- metablogizer: Chunked upload for uhttpd 64KB limit

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 00:33:53 +01:00
95dab47f62 chore: Update local tool permissions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 22:06:28 +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
eebc84d0b9 fix(zigbee2mqtt): Fix adapter type, config format, and add MQTT dependency
The z2m 2.x breaking changes required three fixes discovered during
live deployment testing on the router:
- Adapter renamed from `ezsp` to `ember` in zigbee-herdsman 4.0.0
- Config format needs `version: 4` and nested `homeassistant.enabled`
- Start script needs `ZIGBEE2MQTT_DATA` env var for correct config path
- Add `mosquitto-nossl` as package dependency (MQTT broker required)
- Direct `/dev/ttyUSB0` passthrough works; socat TCP bridge does not

Also updates project planning files (HISTORY.md, TODO.md, WIP.md,
CLAUDE.md) and rebuilds bonus feed with latest IPKs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 19:29:59 +01:00
297917e79a feat(jellyfin): Add secubox-app-jellyfin and luci-app-jellyfin packages
Docker-based Jellyfin media server with UCI config (port, image, media
paths, GPU transcoding), procd init, jellyfinctl CLI, and LuCI frontend
with status/config/logs view.

Also adds Punk Exposure Engine architectural README documenting the
Peek/Poke/Emancipate service exposure model and DNS provider API
roadmap. CLAUDE.md updated with architectural directive.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:50:59 +01:00
db486a56ad fix(streamlit): Fix ZIP upload, app management and add rename support
- Fix ZIP upload: install unzip dependency, fix empty array check
  (jsonfilter returns "[ ]" not "[]"), redirect unzip stdout to
  prevent JSON corruption, use readAsArrayBuffer instead of
  deprecated readAsBinaryString, add .catch() error handler
- Fix list_apps to scan subdirectories for ZIP-uploaded apps,
  skip Streamlit pages/ convention dir, prefer app.py as entry point
- Fix set_active_app: replace broken streamlitctl call with direct
  UCI update
- Fix remove_app: replace broken streamlitctl call with direct
  file removal and UCI cleanup
- Fix add_app: replace broken streamlitctl call with direct UCI
- Add rename_app and rename_instance RPCD methods with ACL entries
- Activate now auto-creates an instance with next available port
- Apps list shows UCI display name separate from filesystem ID
- Sanitize uploaded filenames for UCI compatibility
- Add rename buttons and modals for apps and instances
- Add error notifications for failed deletes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:25:01 +01:00
1652b39137 feat(p2p): Add decentralized threat intelligence sharing via mesh
Share CrowdSec bans and mitmproxy detections between mesh nodes using
the existing blockchain chain + gossip sync. Received IOCs from trusted
peers are auto-applied as CrowdSec decisions based on a three-tier trust
model (direct/transitive/unknown).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 11:13:51 +01:00
c4c829a593 fix(master-link): Suppress p2p-mesh.sh stdout noise from sourced libraries
Use >/dev/null 2>&1 instead of just 2>/dev/null when sourcing
master-link.sh and calling chain_add_block, mesh_init, peer_add,
factory_trust_peer, and gossip_sync to prevent p2p-mesh.sh usage
text and block hashes from corrupting CGI JSON responses.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 06:38:11 +01:00
b2f0e23c32 fix(simplex): Use LXC configured path and skip existing rootfs download
- Read LXC path from /etc/lxc/lxc.conf instead of hardcoding /var/lib/lxc
  (OpenWrt uses /srv/lxc by default)
- Skip Alpine rootfs download if file already exists in /tmp

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 05:07:44 +01:00
840d226881 fix(crowdsec): Add capi_enrolled to status response
The settings page was showing "CAPI: Error" because the status
method didn't return the capi_enrolled field. Added CAPI status
check to get_status() so the health display shows correct status.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 10:50:35 +01:00
ed7184f45f fix(dnsguard): Fix subshell issues in provider lookup methods
Replace pipe-to-while loops with grep/cut to avoid subshell variable
scope issues in method_status, method_get_providers, and method_set_provider.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 07:15:38 +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
760408c36f feat(p2p): Release v0.6.0 - MirrorBox NetMesh Catalog
- Distributed service registry with HAProxy vhost discovery
- Multi-endpoint URLs (haproxy/mesh/local) per service
- DNS federation for mesh peers (*.sb.local via dnsmasq)
- Catalog tab with service filtering and QR codes
- Linked peers navigation panel
- Tools panel with DNS management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 11:56:18 +01:00
19b96e50d0 fix(crowdsec-dashboard): Dynamic port and path detection for LAPI/GeoIP
- Replace hardcoded port 8180 with dynamic detection from credentials file
- Extract LAPI port from local_api_credentials.yaml URL
- Convert port to hex for /proc/net/tcp lookup
- Fix GeoIP database path detection (check /srv/crowdsec/data and /var/lib)
- Update default API URL fallback to 8090 (actual CrowdSec default)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 04:55:19 +01:00
97790f0dcb fix(metablogizer): Skip frontend HTTP checks for DNS mismatch sites
When a site's DNS doesn't point to our public IP, skip the external
HTTP check to avoid 5-second timeouts. This significantly speeds up
the get_hosting_status API call which was causing XHR timeouts in
the LuCI frontend.

Sites with DNS mismatch now show frontend_status: "dns_mismatch"
instead of timing out.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 20:43:56 +01:00
374803715f fix(vhost-manager): Remove invalid local declarations in case handlers
BusyBox ash does not support 'local' keyword outside of functions.
Removed 'local' from update_vhost case handler to fix "not in a function"
error that caused ubus calls to fail with no response.

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
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
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
a5cf1cad7a 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-30 19:46:27 +01:00
e4a60dd24e 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-30 19:46:26 +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
9de86dc854 ok 2026-01-27 15:56:39 +01:00
8c062b6d60 docs: Update README v0.16.0 with 38 modules, add CHANGELOG
- README.md: Update to v0.16.0 with all 38 modules categorized
- CHANGELOG.md: Create comprehensive changelog (v0.12.0-v0.16.0)
- CLAUDE.md: Add toolchain build rules for Go/CGO packages
- secubox-tools/README.md: Add SDK vs toolchain build guidance
- TODO-ANALYSE.md: Mark completed tasks, update health score
- HISTORY.md: Document ARM64 toolchain discovery, multi-instance
- dev-status-widget.js: Update stats (38 modules, 1500 commits)

SDK builds produce LSE atomics that crash on some ARM64 CPUs.
Go/CGO packages (crowdsec, netifyd) must use full toolchain.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 10:58:48 +01:00
5a4f7986ac go 2026-01-27 06:42:55 +01:00
6fda6e220d feat(streamlit): Add LuCI instance management for multi-app support
- Add Instances tab to LuCI Streamlit dashboard
- RPCD backend: list/add/remove/enable/disable instances
- API module: instance management methods
- UI: Instance table with status, port, enable/disable/remove actions
- Add Instance form with app selector and auto port assignment
- Apply & Restart button to apply instance changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 12:43:17 +01:00
3132ef9c14 go 2026-01-23 05:44:38 +01:00
13d7e8641f fix(openwrt): Replace pgrep -x with pgrep for BusyBox compatibility
The -x flag requires exact process name match which doesn't work
reliably on OpenWrt/BusyBox. Removed -x from all pgrep calls in:

- luci-app-bandwidth-manager
- luci-app-secubox-security-threats
- luci-app-auth-guardian
- luci-app-media-flow
- luci-app-vhost-manager
- luci-app-network-modes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 06:09:07 +01:00
48deeccb99 feat(luci-app-ollama): Add LuCI dashboard for Ollama LLM
New LuCI application for Ollama management:
- Dashboard with service status and controls
- Model management (pull, remove, list)
- Chat interface with model selection
- Settings page for configuration

Files:
- RPCD backend (luci.ollama)
- Dashboard, Models, Chat, Settings views
- ACL and menu definitions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 19:02:12 +01:00
ec1f722687 fix(localai): Check Docker daemon is running before extracting rootfs
- Add runtime_is_working() to verify daemon connectivity
- Falls back to standalone binary with helpful message if daemon not running
- Provides hint: /etc/init.d/dockerd start

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 18:29:53 +01:00
0afdfc5b78 fix(mitmproxy): Pin werkzeug<3.0 for Flask compatibility
werkzeug 3.0+ removed url_quote from werkzeug.urls which breaks
Flask imports in mitmproxy 8.1.1.

Bump release to r5.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:52:44 +01:00
58b4fbf10d synch 2026-01-17 06:59:37 +01:00
0cd374e2f8 chore: Remove duplicate luci-app-secubox from root
Package is already in package/secubox/luci-app-secubox/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 09:52:32 +01:00
290eed2ba1 feat: Rebuild local feed with 25 SDK-built packages
- Rebuilt all luci-app-* and secubox-app-* packages for aarch64-cortex-a72
- Updated local-build.sh with FORCE=1 to bypass rsync prereq check
- Removed packages that failed SDK build (require full buildroot)
- Updated Packages index and apps-local.json manifest

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 09:10:43 +01:00
a677f8cf49 feat: Media-flow UI + security updates
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-12 07:57:39 +01:00
c090308dbd feat: Add local package store to luci-app-secubox-bonus
- Add embed_local_feed() to local-build.sh that copies built packages
  into bonus app as /www/secubox-feed/ for offline installation
- Generate Packages index and apps-local.json manifest for opkg
- Add RPCD backend (luci.secubox-store) for package install/remove
- Add LuCI view for browsing and managing local packages
- Fix OPENWRT_ONLY_PACKAGES to allow secubox-app-* wrappers in SDK build
- Remove experimental python3-* packages (unfinished mitmproxy native plan)
- Set rootfs partition size to 16GB for larger overlay
- Bump luci-app-secubox-bonus to v0.2.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-11 09:15:19 +01:00
ff799a8016 chore: Add build configuration and update settings
- Add OpenWrt .config for mvebu/cortexa72 target
- Update .gitignore
- Update Claude settings
- Minor portal.js update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 18:32:17 +01:00
327cc5b285 feat: Add smart action buttons and fix CrowdSec settings display (v0.6.0-r29)
- Add service control RPCD method (start/stop/restart/reload)
- Add smart action buttons to CrowdSec Settings (Service Control, Register Bouncer, Hub Update)
- Add CrowdSec Console quick access link button
- Fix LAPI status check (use lapi_status field)
- Fix collections display (handle nested response structure)
- Fix System Hub Quick Status Indicators layout (label/value stacking)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 15:02:03 +01:00
b7fb268f71 feat: Fix Client Guardian RPC, redesign Netifyd devices UI (v0.6.0-r26)
- Fix Client Guardian JS files: replace invalid 'require X as Y' syntax
  with direct RPC declarations (LuCI doesn't support as alias)
- Add factory default profile to Client Guardian profiles.json
- Redesign Netifyd devices page with modern card-based UI:
  - Device type detection with emoji icons
  - Gradient summary cards for stats
  - Responsive grid layout
  - Traffic distribution bars
  - Real-time refresh with pulse animation
- Fix Netifyd RPC calls: use correct luci.secubox-netifyd object name
- Add WAN access control feature to secubox-admin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 13:52:45 +01:00
b610239551 ok 2026-01-08 09:08:46 +01:00
1823913582 chore: Update Claude Code allowed commands configuration (v0.6.1)
- Add SCP file transfer commands for deployment
- Add Node.js and AWK script execution permissions
- Add file iteration and batch deployment commands

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 13:53:27 +01:00
9ce67f2da5 fix: Use correct UCI section types in SecuBox settings view (v0.6.0-r12)
- Changed form sections from type 'secubox' to match actual UCI config
- General/Dashboard/Module/Notification sections now use type 'core'
- Alert Thresholds section now uses type 'diagnostics'
- Security Settings section now uses type 'security'
- Advanced Settings section uses type 'core'
- Fixes "This section contains no values yet" errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-07 12:18:18 +01:00
a7c6b78c30 feat: CrowdSec 1.7.4 Build Success + Netifyd 5.2.1 Confirmed (v0.9.2)
Major achievements:
- Successfully built CrowdSec 1.7.4-r2 (81MB) for aarch64_cortex-a72
- Netifyd 5.2.1-r1 confirmed working with all fixes
- Both packages built with OpenWrt 24.10.5 buildroot

CrowdSec Build:
- Full Go 1.23 compatibility with vendored modules
- Staged all required golang.org/x/* dependencies
- Fixed go.mod directives for OpenWrt toolchain
- Includes crowdsec engine + crowdsec-cli (cscli)
- Complete configuration files and init scripts

Netifyd Status:
- 5.2.1 package with GCC 13.3/C++17 fixes operational
- LuCI dashboard v1.0.2 with working metrics
- Native status.json integration confirmed

Build System Updates:
- Enhanced local-build.sh for OpenWrt-only packages
- Improved package sync and build workflow
- Updated Makefiles for consistency

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 14:18:59 +01:00
8fcd34abd0 feat: Netifyd Integration & Build System Improvements (v0.9.1)
Major updates:
- Replace luci-app-netifyd-dashboard with enhanced luci-app-secubox-netifyd
- Add netifyd 5.2.1 package with GCC 13.3/C++17 build fixes
- Fix nd-risks.cpp compilation errors via inline static maps patch
- Enhance local-build.sh with improved package building workflow
- Update secubox-core scripts version to v0.9.1

New Features:
- Complete netifyd dashboard with flows, devices, applications, and settings
- Local data collection with netifyd-collector
- Automated cron-based data aggregation
- RPCd integration for real-time statistics

Build Fixes:
- Patch 001: Fix C++17 inline static maps in nd-risks.hpp and nd-protos.hpp
- Patch 003: Skip ndpi tests to resolve roaring_v2 dependency issues
- Add libatomic dependency
- Include libnetifyd shared libraries in package

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 17:35:11 +01:00
e258d86eea feat: Admin Control Center with State Management (v0.9.0)
Major feature release implementing comprehensive state management, component registry,
and admin control center with full UI integration.

## Backend Features (secubox-core v0.9.0-1)

State Management System:
-  State database (state-db.json) with 15 states across 4 categories
-  State machine with transition matrix validation
-  secubox-state CLI (8 commands: get, set, history, list, validate, sync, freeze, clear-error)
-  state-machine.sh with atomic transitions using flock
-  State history tracking with timestamps and reasons
-  Error state handling with detailed error info
-  Frozen state support for system-critical components

Component Registry System:
-  Component registry database (component-registry.json)
-  secubox-component CLI (7 commands: list, get, register, unregister, tree, affected, set-setting)
-  Component types: app, module, widget, service, composite
-  Dependency tracking (required/optional)
-  Recursive dependency tree resolution
-  Reverse dependency tracking
-  Component settings management
-  Profile tagging and filtering

Auto-Sync System:
-  secubox-sync-registry CLI for catalog synchronization
-  Auto-populate from catalog.json
-  Plugin catalog directory scanning
-  Installed package detection
-  Automatic state initialization

RPC Backend (luci.secubox):
-  6 state management RPC methods
-  5 component registry RPC methods
-  Bulk operations support
-  State validation endpoints

## Frontend Features (luci-app-secubox-admin v1.0.0-16)

UI Components:
-  state-utils.js: 20+ utility functions, state config, transition validation
-  StateIndicator.js: 5 rendering modes (badge, compact, pill, dot, statistics)
-  StateTimeline.js: 4 visualization modes (vertical, horizontal, compact, transition diagram)
-  state-management.css: 600+ lines with animations, responsive design, accessibility

Admin Control Center Dashboard:
-  System overview panel with health metrics
-  Component state summary with statistics
-  Recent state transitions timeline
-  Alerts panel for warnings and errors
-  Quick actions panel
-  Real-time updates (5-second polling)
-  Metric cards with hover effects
-  State distribution by category

API Integration (api.js):
-  11 RPC method declarations
-  Enhanced methods: getComponentWithState(), getAllComponentsWithStates()
-  Bulk operations: bulkSetComponentState()
-  State statistics: getStateStatistics()
-  Retry logic with exponential backoff
-  Promise-based async operations

## Documentation

Comprehensive Documentation:
-  API-REFERENCE.md (1,200+ lines): Complete API docs for RPC, CLI, JS
-  EXAMPLES.md (800+ lines): 30+ usage examples, shell scripts, integration patterns
-  State definitions table (15 states)
-  State transition matrix
-  Component metadata schemas
-  Error codes reference
-  Testing examples

## State Definitions

15 States Across 4 Categories:
- Persistent: available, installed, active, disabled, frozen
- Transient: installing, configuring, activating, starting, stopping, uninstalling
- Runtime: running, stopped
- Error: error (with subtypes)

State Transition Flow:
available → installing → installed → configuring → configured →
activating → active → starting → running → stopping → stopped

## Technical Details

Files Created (10 backend + 8 frontend):
Backend:
- /usr/sbin/secubox-state (12KB, 8 commands)
- /usr/sbin/secubox-component (12KB, 7 commands)
- /usr/sbin/secubox-sync-registry (8.4KB)
- /usr/share/secubox/state-machine.sh (5.2KB)
- /var/lib/secubox/state-db.json (schema)
- /var/lib/secubox/component-registry.json (schema)

Frontend:
- resources/secubox-admin/state-utils.js (~400 lines)
- resources/secubox-admin/components/StateIndicator.js (~350 lines)
- resources/secubox-admin/components/StateTimeline.js (~450 lines)
- resources/secubox-admin/state-management.css (~600 lines)
- resources/view/secubox-admin/control-center.js (~550 lines)
- resources/secubox-admin/api.js (+145 lines)

Documentation:
- docs/admin-control-center/API-REFERENCE.md (1,200+ lines)
- docs/admin-control-center/EXAMPLES.md (800+ lines)

Files Modified (3):
- package/secubox/secubox-core/Makefile (v0.8.0 → v0.9.0-1)
- package/secubox/luci-app-secubox-admin/Makefile (release 15 → 16)
- package/secubox/secubox-core/root/usr/libexec/rpcd/luci.secubox (+157 lines)

## Installation & Migration

Makefile Updates:
- Added 3 new CLI tools to install section
- Added state-machine.sh to scripts
- Updated package description
- Enhanced postinst to initialize databases
- Auto-sync registry on first install

Postinst Features:
- Automatic state-db.json initialization
- Automatic component-registry.json initialization
- Catalog sync on install
- Version announcement with new features

## Performance & Security

Performance:
- File locking (flock) for atomic state transitions
- State history limited to 100 entries per component
- RPC retry logic with exponential backoff
- Bulk operations use Promise.all for parallel execution
- Component list caching (30 seconds)

Security:
- Frozen state prevents unauthorized modifications
- All state changes logged with timestamp and reason
- System-critical components have additional safeguards
- Proper authentication required for state transitions

## Testing & Validation

Features:
- State transition validation
- Component dependency resolution
- Circular dependency detection
- State consistency checker
- Integration test scripts included in docs

## Breaking Changes

None - Backward Compatible:
- Existing RPC methods remain functional
- State-aware methods are additive
- Components without state default to 'available'
- Migration is automatic on install

## Statistics

Total Implementation:
- Lines of Code: ~4,000
  - Backend: ~1,800 (Bash + JSON)
  - Frontend: ~2,200 (JavaScript + CSS)
  - Documentation: ~2,000 (Markdown)
- Functions/Commands: 40+
- RPC Methods: 11
- CLI Commands: 22
- UI Components: 5
- Documentation Pages: 2

## Next Phase

Remaining from Plan:
- Phase 4: System Hub integration
- Phase 5: Migration script (secubox-migrate-state)
- Phase 6: Additional documentation (ARCHITECTURE.md, STATE-MANAGEMENT.md, etc.)
- Phase 7: Additional UI views (components.js, state-manager.js, debug-panel.js)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 10:05:32 +01:00
e13a3f5b84 hello 2026-01-04 19:50:25 +01:00
3a8831daf1 fix(ci): remove unnecessary Lua header installation step
Our SecuBox packages are PKGARCH:=all (pure scripts) and don't require
Lua headers or lucihttp compilation.  The Lua header installation step
was causing premature compilation attempts of lua/lucihttp which failed
due to API incompatibility between lucihttp (Lua 5.1 API) and lua5.4.

Changes:
- Removed "Install Lua headers" step from GitHub Actions workflow
- Removed Lua header installation from local-build.sh (2 instances)
- Packages will use prebuilt dependencies as intended
- lucihttp/cgi-io remain disabled in .config

This resolves the lualib.h missing error by avoiding the compilation
entirely rather than trying to fix header paths.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-03 09:25:20 +01:00
7209c83e7a fix(ci): compile Lua package to provide headers for lucihttp
The previous fix only installed Lua via feeds but didn't compile it,
so lua.h headers were still missing from staging_dir. This caused
all LuCI packages to fail compilation with:
  fatal error: lua.h: No such file or directory

Root cause: ./scripts/feeds install lua only adds the package to the
build system but doesn't compile it or install headers to staging_dir.

Solution:
1. Install lua package via feeds
2. Enable lua in .config with CONFIG_PACKAGE_lua=m
3. Compile lua package: make package/lua/compile
4. This installs lua.h and other headers to staging_dir/target-*/usr/include/
5. Verify headers are present before continuing

Changes:
- GitHub Actions: Update "Install Lua" step to compile package
- local-build.sh: Update both Lua installation sections (2 places)
- Both: Add verification that lua.h exists in staging_dir

This ensures lucihttp and all LuCI packages can find Lua headers
during compilation, preventing the SDK build failures.

Related: f5c98d9 (previous incomplete fix)
Fixes: #lucihttp-missing-headers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-03 08:40:49 +01:00
31a87c5d7a feat(structure): reorganize luci-app packages into package/secubox/ + appstore migration
Major structural reorganization and feature additions:

## Folder Reorganization
- Move 17 luci-app-* packages to package/secubox/ (except luci-app-secubox core hub)
- Update all tooling to support new structure:
  - secubox-tools/quick-deploy.sh: search both locations
  - secubox-tools/validate-modules.sh: validate both directories
  - secubox-tools/fix-permissions.sh: fix permissions in both locations
  - .github/workflows/test-validate.yml: build from both paths
- Update README.md links to new package/secubox/ paths

## AppStore Migration (Complete)
- Add catalog entries for all remaining luci-app packages:
  - network-tweaks.json: Network optimization tools
  - secubox-bonus.json: Documentation & demos hub
- Total: 24 apps in AppStore catalog (22 existing + 2 new)
- New category: 'documentation' for docs/demos/tutorials

## VHost Manager v2.0 Enhancements
- Add profile activation system for Internal Services and Redirects
- Implement createVHost() API wrapper for template-based deployment
- Fix Virtual Hosts view rendering with proper LuCI patterns
- Fix RPCD backend shell script errors (remove invalid local declarations)
- Extend backend validation for nginx return directives (redirect support)
- Add section_id parameter for named VHost profiles
- Add Remove button to Redirects page for feature parity
- Update README to v2.0 with comprehensive feature documentation

## Network Tweaks Dashboard
- Close button added to component details modal

Files changed: 340+ (336 renames with preserved git history)
Packages affected: 19 luci-app, 2 secubox-app, 1 theme, 4 tools

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 14:59:38 +01:00
12774589fc feat(vhost-manager,network-tweaks): major v2.0 upgrade with dashboards and automation
VHost Manager v2.0:
- Add modern dashboard UI with auto-refresh for Internal Services, Redirects, and Virtual Hosts tabs
- Implement template activation system with one-click deployment (19 services, 6 redirects)
- Add section_id parameter to RPC backend for named VHost profiles
- Enhance API with createVHost() wrapper for template-based creation
- Fix redirect support with nginx return directive validation
- Add action buttons (Edit/Enable/Disable/Remove) to all VHost cards
- Implement confirmation modals for destructive actions
- Update README with comprehensive v2.0 feature documentation
- Add templates.json catalog with pre-configured service/redirect templates

Network Tweaks v1.0:
- Create network services dashboard with dynamic component discovery
- Add RPC backend with component filtering by network capabilities
- Implement cumulative impact tracking (DNS entries, VHosts, ports)
- Add network mode integration for profile-based settings
- Create dashboard.css with responsive grid layouts
- Add 10-second auto-refresh polling for live status updates

New Applications:
- Add luci-app-magicmirror (Smart mirror application)
- Add secubox-app-magicmirror with Docker runtime
- Add luci-app-network-tweaks (Network services monitoring)
- Add secubox-app-adguardhome (DNS filtering)
- Add secubox-app-nextcloud (File sync and sharing)
- Add plugin catalog manifests for AdGuard Home, MagicMirror, Nextcloud

Bug Fixes:
- Fix RPC backend shell script errors (remove local declarations from case statements)
- Fix fs.exec usage in vhosts.js (replace with uci module)
- Fix form rendering in Virtual Hosts view (use proper LuCI patterns)
- Fix file ownership issues (ensure root:root for deployed files)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-01 14:30:57 +01:00
67a9f62c45 chore: sync claude settings 2025-12-30 21:43:51 +01:00
22e0bc9272 feat(system-hub): extend diagnostics + tests 2025-12-30 16:21:37 +01:00
280dd91798 release: bump secubox hub to 0.6.1-0 2025-12-30 14:42:45 +01:00
6f115a3cf3 chore: remove legacy secubox-app symlinks 2025-12-30 13:23:30 +01:00