Commit Graph

787 Commits

Author SHA1 Message Date
ce512bbda0 feat(p2p): Add mDNS service publishing and REST API for mesh visibility
- Add mDNS service announcement via avahi-publish for _secubox._tcp
- Add REST API endpoints on port 7331 (/api/peers, /api/status, /api/services)
- Add node self-registration to ensure local node visible in mesh view
- Add UCI defaults for uhttpd P2P API instance and firewall rules
- Bump secubox-p2p version to 0.2.0

fix(vhost-manager): Fix uninitialized variable syntax errors

- Add 'local' keyword to variable declarations on lines 606, 621, 693

fix(metablogizer,service-registry): Add HAProxy availability fallback

- Add haproxy_available() helper to check if HAProxy is running
- Gracefully skip HAProxy operations when service unavailable
- Store pending HAProxy config for later when service becomes available
- Prevent crashes when HAProxy container is stopped

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
4166f4574e fix(metablogizer): Ensure file permissions on every upload
- Set umask 022 before file operations
- chmod 644 immediately after base64 decode
- chmod 755 on site_path after each upload
- Prevents 403 Forbidden from restrictive permissions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
0562730b5f feat(metablogizer): Add Tor hidden service integration
Dynamic .onion address generation for hosted sites:
- enable_tor: Create Tor hidden service for a site
- disable_tor: Remove Tor hidden service
- get_tor_status: Get Tor status for all sites
- Sites now include onion_address and onion_url in listings

When enabled, sites are accessible via both:
- Public domain (https://domain.com)
- Tor hidden service (http://xxx.onion)

Also includes DNS resolution fix using Google DNS API.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
95ff73f6e7 fix(metablogizer): Fix DNS resolution parsing (127.0.0.1:53 bug)
KISS approach to DNS resolution:
1. Primary: Use Google DNS API (https://dns.google/resolve)
   - Most reliable, bypasses local resolver issues
2. Fallback: nslookup with tail -1 to skip DNS server line
3. Fallback: host command

The bug was parsing nslookup output which includes DNS server
address (127.0.0.1) before the actual resolved IP.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
e318ca2ba1 fix(metablogizer): Fix 403 Forbidden with improved permissions
- Enhanced fix_permissions() with umask 022 and parent dir traversal
- Added chmod 644 immediately after file write in upload_file
- Added repair_site RPC method for troubleshooting:
  - Fixes file/dir permissions
  - Creates missing index.html
  - Reloads uhttpd and HAProxy

Usage: ubus call luci.metablogizer repair_site '{"id":"site_sliders"}'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
d2805c35bd feat(streamlit): Add ZIP upload with selective tree extraction
- apps.js: ZIP file upload with tree view file selection
  - Client-side ZIP parsing for file list preview
  - Interactive tree with checkboxes for file selection
  - Select All / Deselect All / Python Only buttons
  - Supports both .py and .zip file uploads

- api.js: Added previewZip() and uploadZip() RPC methods

- luci.streamlit RPCD:
  - preview_zip: List ZIP contents with file sizes
  - upload_zip: Extract selected files to app directory
  - Automatic main .py file detection and registration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
a8ca00b04d docs(console): Complete CLI Tools Lexical Reference
Comprehensive documentation for all 29 secubox-* CLI tools:
- Core System: secubox-core, secubox-swiss, secubox-state, secubox-component
- Recovery: secubox-recover, secubox-recovery, secubox-restore
- Mesh/P2P: secubox-mesh, secubox-p2p, secubox-sync-registry, secubox-catalog-sync
- Registry: secubox-registry, secubox-landing-gen, secubox-exposure, secubox-wan-access
- Apps: secubox-app, secubox-appstore, secubox-skill, secubox-profile
- Feed: secubox-feed, secubox-feed-health, secubox-feed-manager
- Diagnostics: secubox-diagnostics, secubox-log, secubox-stats, secubox-verify
- Specialized: secubox-webapp-setup, secubox-netifyd-configure, secubox-mitm-logs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
d1e713e282 feat(console): Add Linux host frontend with modern TUI
- secubox_frontend.py: Full-featured Textual TUI application
  - Multi-device dashboard with real-time status monitoring
  - Device discovery (network scan, mDNS, mesh API)
  - SSH-based remote command execution and backup orchestration
  - Tabbed interface: Dashboard, Alerts, Mesh, Settings
  - Graceful degradation: Textual → Rich → Simple CLI

- Support files:
  - install.sh: One-line installer with dependency handling
  - requirements.txt: Python dependencies (textual, paramiko, httpx, rich)
  - secubox-frontend: Launcher script with path detection

- Updated README.md: Documents both CLI console and TUI frontend

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +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
e548d210b7 fix: CDN cache ACL permissions and Tor Shield IP detection
CDN Cache:
- Add file read permissions for cache, logs, and SSL dirs
- Add new RPCD methods to ACL (get_ca_cert, set_ssl_bump)

Tor Shield:
- Create tor-ip-update.sh for caching exit/real IPs
- Use --socks5-hostname for DNS through Tor
- Add cron job for periodic IP updates

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
1b6e9881c9 feat(cdn-cache): Add MITM SSL bump support for HTTPS caching
- Generate CA certificate for SSL bumping
- Initialize SSL certificate database with security_file_certgen
- Selective SSL bump: only cache-worthy domains (Windows Update, Steam, etc.)
- Exclude security-sensitive sites (banking, Google accounts, etc.)
- Proper firewall integration for both HTTP and HTTPS redirect
- RPCD methods for CA cert download and SSL bump control

Ports:
- 3128: Forward proxy
- 3129: HTTP transparent intercept
- 3130: HTTPS SSL bump intercept

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
b2fc1b27d8 feat(p2p): Add MirrorBox overview and profiles pages
Overview Page (SOC Admin Landing):
- Architecture diagram with layer visualization
- Modular component cards with status indicators
- Network topology with animated orbital nodes
- System status grid with health indicators
- Development roadmap timeline

Profiles Page (Dynamic Cloning):
- Component readiness tracking with progress bars
- Quick presets for common configurations
- Package feeds management with toggles
- Saved profiles list with load/delete
- Clone & deploy actions (export, import, sync, push)

Menu Structure:
- Renamed P2P Hub to MirrorBox
- Added Overview as landing page
- Added Profiles for cloning management

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
4b2241c86e feat(p2p): Add MirrorBox auto-init, self-recovery, and ACL fixes
MirrorBox Auto-Init:
- Add blockchain-like gigogne P2P structure with peer zero (P0) genesis
- Auto-create self-mesh on page load with configurable depth
- Preserve MirrorBox peers during refresh cycles

Self-Recovery System:
- Add secubox-restore script for bootstrapping new OpenWrt boxes
- Generate customized bootstrap.sh in Gitea backups
- Support interactive and command-line restore modes

ACL Fixes:
- Add missing deploy/pull methods to luci-app-secubox-p2p ACL
- Add luci.gitea and luci.secubox-p2p access to luci-app-secubox ACL
- Fix null display issue in hub.js (changed to empty string)

Backup Enhancements:
- Fix syntax error in RPCD heredoc (openwrt_version line)
- Add branch reference to Gitea API calls (main branch)
- Include bootstrap.sh and secubox-restore in backup push

Documentation:
- Add comprehensive README.md for SecuBox P2P module

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
8c0bed5af0 feat(gitea): Add RPCD methods for user, token, and repo creation
Add new RPCD methods to luci.gitea for P2P mesh auto-setup:

- create_user: Create regular Gitea user via CLI
- generate_token: Generate access token with configurable scopes
- create_repo: Create repository for a user via admin API

These methods enable automated P2P mesh repository setup without
requiring manual token generation in Gitea web UI.

Requires lxc-attach package for container access.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
b7acc04a20 fix(p2p): Add ACL permissions for Gitea and backup RPCD methods
Add missing ACL permissions for new RPCD methods:

Read permissions:
- get_gitea_config
- list_gitea_repos
- get_gitea_commits
- list_local_backups

Write permissions:
- set_gitea_config
- create_gitea_repo
- push_gitea_backup
- pull_gitea_backup
- create_local_backup
- restore_local_backup

Fixes: RPC call failed with error -32002: Access denied

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
d57e954d21 feat(p2p): Auto-create mesh repository without modal parameters
Add autoCreateMeshRepo() function that automatically:
- Generates repo name from hostname: secubox-mesh-{hostname}
- Detects local Gitea server (gitea.local, git.local, etc.)
- Only prompts for access token on first use (one-time setup)
- Creates private repository with README
- Pushes initial mesh state immediately

Replace manual " Create" button with "🚀 Auto Setup" for seamless
mesh repository initialization.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
7c1bcbe585 feat(p2p): Add backend Gitea and backup support via secubox-core RPCD
Add complete backend implementation for Gitea integration and local backups
with admin permissions:

RPCD Methods (luci.secubox-p2p):
- get_gitea_config / set_gitea_config - Gitea server configuration
- create_gitea_repo - Create new Gitea repository via API
- list_gitea_repos - List user's Gitea repositories
- get_gitea_commits - Fetch commit history
- push_gitea_backup - Push config/packages/scripts to Gitea
- pull_gitea_backup - Restore from Gitea commit
- create_local_backup - Create local backup snapshot
- list_local_backups - List available local backups
- restore_local_backup - Restore from local backup

UCI Config (secubox-p2p):
- gitea section: server_url, repo_name, access_token, auto_backup options
- backup section: backup_dir, max_backups, auto_cleanup

Frontend (hub.js):
- Updated createGiteaRepo() to use backend API
- Updated backup functions to use backend storage
- Added refreshGiteaCommits() for real API calls
- Load function now fetches Gitea config and backup list

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
9ed98b7fbc feat(p2p): Add Gitea repository creation feature
Add createGiteaRepo() function with modal interface for creating new Gitea
repositories directly from the P2P Hub. Users can configure server URL,
repo name, description, access token, and options (private, init README,
push current state).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
0d003a4cd1 feat(p2p): Add parallel component sources and auto-self mesh
- Add 6 parallel component sources: ipk, sets, profiles, scripts, macros, workflows
- Add component sources grid with enable/sync controls per source
- Add component list modal with import functionality
- Add auto-self mesh configuration with options:
  - Auto-create self peer
  - Full backup on create
  - Real test mode
  - Parallel sync
- Add runAutoSelfMesh() for automated mesh setup workflow
- Add exportFullState() for complete state export to JSON
- Add syncAllComponents() for parallel synchronization
- Add comprehensive CSS for component sources grid and auto-self section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
b472a7e995 feat(p2p): Add mesh backup, test cloning, and Gitea history feed
- Add Backup & Versioning panel with three cards:
  - Mesh Auto-Backup: scheduled snapshots with configurable targets
  - Test Cloning: clone config from any peer with auto-sync option
  - Gitea History: connect to Gitea for version control and commit feed
- Add backup history modal with restore/delete actions
- Add Gitea configuration modal with server/repo/token settings
- Add formatTime helper for relative timestamps
- Add comprehensive CSS for backup panel, gitea commits, history modal

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
2d91a8f7eb feat(p2p): Add self-peer testing and gigogne distribution mode
- Add self-peer for local mesh testing without remote nodes
- Add gigogne (nested matryoshka) distribution mode with configurable depth
- Add distribution mode selector: gigogne, mono, ring, full-mesh
- Add visual indicators for self/gigogne peers on globe and peers panel
- Add test mode badge and clear test button
- Add rebuildGigogneStructure for dynamic mode switching
- Update CSS with gigogne/self peer styles and animations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
675e4abcc7 feat(p2p): Add master deployment, DNS bridge, and WireGuard mirror
- Add renderServiceItemWithDeploy() for services with mesh deployment status
- Add deployment action handlers: deployAllRegistry, deployRegistryEntry,
  deployAllServices, deployLocalServices, pullAllServices, deployService, pullService
- Add deployment modals: showDeployRegistryModal, showDeployServicesModal
- Add DNS Bridge with load balancing strategies (round-robin, weighted, geo, latency)
- Add Onion Relay integration for privacy/fallback routing
- Add WireGuard Mirror inverse system with modes (active-passive, active-active, ring, full-mesh)
- Add showDNSBridgeModal and showWGMirrorModal configuration dialogs
- Add new API functions for deployment, DNS bridge, and WG mirror
- Add comprehensive CSS styles for deploy banners, mesh status dots, modal styles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
e5fb408744 feat(p2p): Add globe visualization with peer map
- Animated 3D globe with CSS transformations
- Peer nodes positioned around globe with depth sorting
- Master node at center with pulse animation
- Connection lines between master and peers
- Stars background with twinkle animation
- Health indicators with emoji status (💚💛❤️)
- Quick stats (Peers, Online, Services, Registry)
- Quick actions (Discover, Sync All, Add Peer)
- Responsive layout for mobile

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:28 +01:00
5cf4776b8e feat(p2p): Add complete Hub Registry and Services Registry panels
- Hub Registry Panel with:
  - Short URL table with copy, status, hits
  - MaaS toggles (enabled, auto-register, cache)
  - DNS config modal with zone preview
  - Register URL, Sync Peers, Flush Cache actions

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

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

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

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

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

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

Fixes "Permission denied" error when saving theme settings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 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
9b12991c3b fix(crowdsec-dashboard): Use baseclass.singleton for theme manager
Fix "not a constructor" error by using baseclass.singleton()
pattern instead of baseclass.extend() with manual instantiation.
Theme module now exports a singleton directly.

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

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

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

Theme selection available in Settings > Appearance with live preview.

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

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:27 +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
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
f3b6fb71da fix(bonus): Strip libc dependency from local feed packages
- Update local-build.sh to remove libc from Packages index
- Prevents opkg architecture mismatch errors on install
- Regenerate secubox-feed with 74 packages
- Update RPCD scripts for lyrion, mailinabox, metablogizer, nextcloud

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:26 +01:00
3aa4f8d6f9 refactor(menu): Move WireGuard to Services menu
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:26 +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
1621d51660 fix(service-registry): Disable slow direct services aggregation by default
The direct services provider was calling jsonfilter in a loop for each
listening port (~40 ports), causing XHR timeouts in the UI.

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

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

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

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:26 +01:00
43747ffba1 refactor(menu): Move Network Diagnostics to Services menu
- Network Diagnostics: admin/secubox/netdiag -> admin/services/network-diagnostics

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:26 +01:00
6f7ee8e8c2 refactor(menu): Move CrowdSec and Threat Monitor to Services menu
- CrowdSec: admin/secubox/security/crowdsec -> admin/services/crowdsec
- Threat Monitor: admin/secubox/security/threats -> admin/services/threat-monitor

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

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

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:26 +01:00