Commit Graph

559 Commits

Author SHA1 Message Date
e2a78b0a9c fix(secubox-app-glances): Fix Glances startup issues in LXC container
- Use separate -B and -p args for bind address and port
- Add hostname resolution by populating /etc/hosts dynamically
- Add --disable-autodiscover and --disable-check-update flags
- Fixes DNS resolution errors causing immediate container exit

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 08:10:44 +01:00
4004f2bfe8 feat(glances): Add Glances system monitoring module
Add secubox-app-glances and luci-app-glances packages:

secubox-app-glances:
- LXC container with nicolargo/glances:latest-full Docker image
- Web UI on port 61208, API on port 61209
- UCI configuration for monitoring options and alert thresholds
- glancesctl management script

luci-app-glances:
- Dashboard view with service status and quick actions
- Embedded Web UI view with iframe
- Settings view for configuration
- RPCD backend with proper ACL permissions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:38:37 +01:00
99aa610879 fix(mitmproxy): Fix web UI token access and transparent mode setup
- Add get_web_token to RPCD ACL permissions (was missing, causing 403)
- Add fallback token retrieval from container via lxc-attach
- Improve token capture regex to support alphanumeric tokens
- Fix startup script with background process + tee for reliable capture
- Add IP forwarding enablement for transparent proxy mode
- Fix bypass rule for traffic destined to router itself

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:34:22 +01:00
a960c20124 fix(crowdsec): Fix firewall health sync detection for CAPI blocklists
- Consider sync OK when CAPI blocklists are active (capi_elements > 0)
  even if local decisions = 0
- Add capi_elements_count to health response
- Fixes false "Out of sync" warning when using community blocklists

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:52:31 +01:00
5d3222e26e fix(magicmirror2): Use MMPM for module installation with proper registry
- install_module now uses mmpmctl if available (has module registry)
- Fallback to manual git clone only with explicit URLs
- Add proper Node.js PATH for npm commands
- update_module also uses mmpmctl when available
- Fix npm PATH in both install and update functions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 06:45:17 +01:00
8c72679dea fix(mmpm): Update to MMPM v4.x CLI syntax for UI management
- Use `mmpm ui --start/--stop/--status` instead of `mmpm ui --port --host`
- MMPM v4 manages GUI via pm2, not direct execution
- Update status command to check pm2 status and get URL from mmpm
- Auto-install UI if not present when starting service

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 13:40:11 +01:00
f57303bdeb fix(mmpm): Add Node.js PATH for npm access in MMPM commands
- Add NODE_PATH variable for container npm/pm2 access
- Add run_mmpm helper function with proper PATH export
- Fix module install/remove/upgrade/search/list commands
- Fix MMPM GUI service start with proper PATH
- Fix list command to use --installed flag

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 13:36:46 +01:00
edd170937f docs(portal): Sync devstatus with current modules and changelog
- Update module list to match portal.js apps
- Add MagicMirror2 and MMPM to modules
- Add changelog entries for v0.15.0-alpha1 to alpha3
- Update roadmap with Certification CE/FCC and Phase 2 funding (2027)
- Update version badge to v0.15.0-alpha3

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 13:22:04 +01:00
d2980d84ac feat(mmpm): Complete MMPM integration with LuCI and portal
- Fix pip install with --break-system-packages for Debian Trixie PEP 668
- Fix MMPM binary path detection (/usr/local/bin/mmpm)
- Fix RPCD backend to detect MMPM UI status with correct PATH
- Add Services section to portal navigation
- Update MMPM commands to use full path in container
- Configure MMPM environment for /opt/magic_mirror

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 13:18:35 +01:00
520bfed735 fix(magicmirror2): Fix LXC container startup with default modules symlink
- Add symlink from modules/default to __modules/default (Docker entrypoint logic)
- Copy CSS files from __css to css directory on startup
- Fix shebang escaping issue by using printf instead of heredoc for #!/bin/sh
- Bump release to 0.4.0-r7

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 12:17:13 +01:00
a83cde0885 feat(magicmirror2): Add MagicMirror² and MMPM packages
New packages:
- secubox-app-magicmirror2 (0.4.0): MagicMirror² smart display platform
  - LXC container with Docker image extraction
  - mm2ctl CLI for management
  - Support for gzip/zstd compressed layers
  - Default port 8082

- luci-app-magicmirror2 (0.4.0): LuCI web interface
  - Dashboard, modules, webui, settings views
  - RPCD backend for service control
  - Module management integration

- secubox-app-mmpm (0.2.0): MMPM package manager
  - Installs MMPM in MagicMirror2 container
  - mmpmctl CLI for module management
  - Web GUI on port 7891

- luci-app-mmpm (0.2.0): LuCI interface for MMPM
  - Dashboard with install/update controls
  - Module search and management
  - Embedded web GUI view

Portal integration:
- Added MagicMirror² and MMPM to Services section
- Portal version bumped to 0.6.0

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 12:00:18 +01:00
447e4ab2be fix(secubox-app-mitmproxy): Fix Docker image token capture for LuCI integration
- Add PYTHONUNBUFFERED=1 to ensure mitmweb output is not buffered
- Use inline while loop to capture authentication token from startup output
- Fix RPCD backend to read token from correct path ($DATA_DIR/.mitmproxy_token)
- Add proper shell detection and symlink creation in Docker rootfs extraction
- Remove unnecessary exec in pipeline that prevented output capture

The mitmweb authentication token is now properly captured and available
to the LuCI Web UI view for iframe embedding.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 09:24:45 +01:00
287bd24e3e fix(mitmproxy): Fix token capture with background job and tee
The previous pipe approach didn't work because the while loop
runs in a subshell. Now using a background job to poll the log
file for the token while tee outputs to both console and log.

Bump release to r13.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:55:34 +01:00
1dd0c95a09 feat(mitmproxy): Add embedded Web UI view with token auth
- Add get_web_token RPCD method to retrieve auth token
- Create webui.js view that embeds mitmweb in an iframe
- Capture auth token at startup and save to file
- Add Web UI navigation to all mitmproxy views
- Fix PATH for /usr/local/bin in Docker image
- Change default port from 8080 to 8888 (avoid CrowdSec conflict)

secubox-app-mitmproxy: bump to r12
luci-app-mitmproxy: bump to r2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:49:59 +01:00
63422a07b0 fix(mitmproxy): Disable web authentication for LAN access
Recent mitmproxy versions require web authentication by default.
Disable it with --set web_password= for easier LAN access.

Bump release to r11.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:37:15 +01:00
a530e8abd6 fix(mitmproxy): Change default proxy port from 8080 to 8888
Port 8080 conflicts with CrowdSec API. Using 8888 as default.

Also removes --flow-detail option not available in latest mitmproxy.

Bump release to r10.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:35:51 +01:00
e5f5b9160b fix(mitmproxy): Remove --flow-detail option not in latest mitmproxy
The --flow-detail option doesn't exist in recent mitmproxy versions.

Bump release to r9.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:31:58 +01:00
a4fe5c0a3a feat(mitmproxy): Use official Docker image for latest mitmproxy
Extract rootfs directly from mitmproxy/mitmproxy Docker image.
This provides the latest mitmproxy with all Rust components pre-compiled.

No more version compatibility issues - uses whatever version is in
the official Docker image.

Bump release to r8.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:25:03 +01:00
7f399ec429 fix(mitmproxy): Remove --flow-detail option not available in 7.x
mitmproxy 7.0.4 doesn't support the --flow-detail option which was
causing the startup script to fail.

Bump release to r7.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:20:02 +01:00
6553edba3a fix(mitmproxy): Use mitmproxy 7.0.4 for Python 3.11 compatibility
mitmproxy 8.x has dataclass compatibility issues with Python 3.11
in the grpc contentviews module.

Bump release to r6.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 08:04:18 +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
84a6a01fc8 fix(mitmproxy): Add build-base for zstandard compilation
zstandard requires gcc to compile. Added build-base and dev packages
for compilation, then remove them after pip install to save space.

Bump release to r4.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:49:24 +01:00
8b784ea99e fix(mitmproxy): Use mitmproxy 8.1.1 - last pure Python version
- mitmproxy 9.x requires mitmproxy-wireguard (Rust)
- mitmproxy 10.x requires mitmproxy_rs (Rust)
- mitmproxy 8.1.1 is the last version without any Rust dependencies

Bump release to r3.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:49:24 +01:00
4c7c76743d fix(mitmproxy): Use mitmproxy 9.0.1 to avoid Rust dependency
mitmproxy 10.x requires mitmproxy_rs which needs Rust compilation.
mitmproxy 9.0.1 is the last pure-Python version that works in Alpine
chroot without /proc mounted.

Bump release to r2.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:49:24 +01:00
8ba910c271 fix(mitmproxy): Pin to mitmproxy 10.1.6 to avoid Rust dependency
mitmproxy 10.2+ requires mitmproxy_rs which needs Rust 1.80+, but
Alpine 3.19 only has Rust 1.76. Using mitmproxy 10.1.6 which is the
last pure-Python version without Rust requirements.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:49:24 +01:00
f977f488e4 chore(mitmproxy): Update version to 0.4.0
Sync internal package versions for luci-app-mitmproxy and
secubox-app-mitmproxy to 0.4.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:49:24 +01:00
484c4e0574 chore(mitmproxy): Update version to 0.4.0
Sync internal package versions for luci-app-mitmproxy and
secubox-app-mitmproxy to 0.4.0.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:08:52 +01:00
159e1945b9 fix(mitmproxy): Install Rust toolchain for mitmproxy_rs compilation
mitmproxy 10.2+ requires mitmproxy_rs which needs Rust.
Install rust and cargo from Alpine packages, compile mitmproxy,
then remove build deps to save space.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:07:43 +01:00
87e6c53872 fix(mitmproxy): Use Alpine package instead of pip install
mitmproxy_rs now requires Rust compilation which fails in chroot
environment without /proc mounted. Switch to Alpine's pre-built
mitmproxy package from the community repository.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 07:03:23 +01:00
58b4fbf10d synch 2026-01-17 06:59:37 +01:00
fe222d542c feat(mitmproxy): Add transparent mode, filtering addon, and whitelist
- Add nftables transparent mode support with automatic REDIRECT rules
- Create SecuBox Python filter addon for CDN/Media/Ad tracking
- Add whitelist/bypass configuration for IPs and domains
- Expand UCI config with transparent, whitelist, filtering sections
- Update RPCD backend with new config methods and firewall control
- Update LuCI settings view with all new configuration options
- Add new API methods: firewall_setup, firewall_clear, list management

Features:
- Transparent proxy with nftables integration
- CDN tracking (Cloudflare, Akamai, Fastly, etc.)
- Media streaming tracking (YouTube, Netflix, Spotify)
- Ad/tracker blocking
- IP and domain whitelist bypass

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 06:55:45 +01:00
4e5d5275f9 refactor: Merge secubox-app-crowdsec-bouncer into cs-firewall-bouncer
- Move UCI defaults script for auto-registration to cs-firewall-bouncer
- Remove redundant secubox-app-crowdsec-bouncer wrapper package
- Update luci-app-crowdsec-dashboard reference to new package name
- Increment PKG_RELEASE to 3

The defaults script handles:
- Automatic bouncer registration with CrowdSec LAPI
- Interface detection for LAN/WAN
- API key generation and UCI config update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 06:46:09 +01:00
c1860b4aea chore: Remove duplicate luci-app-secubox-crowdsec package
luci-app-crowdsec-dashboard is more complete with:
- Overview, Setup Wizard, WAF/AppSec, Metrics views
- Proper location in SecuBox > Security menu
- Bouncers management

luci-app-secubox-crowdsec was a simpler duplicate in Services menu.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 06:44:04 +01:00
c99d49739e feat(secubox-app-mitmproxy): Add LXC container support for mitmproxy
- Create mitmproxyctl script with LXC container management
- Alpine Linux rootfs with Python and mitmproxy via pip
- Support for regular, transparent, upstream, and reverse proxy modes
- UCI configuration for proxy_port, web_port, memory_limit, etc.
- procd init script for service management
- Update luci-app-mitmproxy RPCD backend for LXC container status

Ports:
- 8080: Proxy port
- 8081: Web interface (mitmweb)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 06:40:08 +01:00
c02c3d2a3a fix(secubox-app-lyrion): Add missing perl modules and fix logs path
- Add perl-template-toolkit and perl-file-slurp dependencies
- Remove bundled Template.pm (conflicts with system version 3.101)
- Add Devel::Peek stub module for runtime inspection
- Fix lxc_logs() to read logs from container via lxc-attach

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 13:42:14 +01:00
0799b97c6b fix(secubox-app-lyrion): Fix LXC container installation issues
- Update Lyrion download URLs to downloads.lms-community.org
- Switch from noCPAN to full tarball (noCPAN missing modules)
- Replace perl-image-scale with perl-gd + imagemagick (Alpine)
- Remove conflicting bundled CPAN modules (DBD::SQLite, XML::Parser, YAML, DBI)
- Add Image::Scale stub module for artwork resizing
- Fix permissions for nobody user on /config and /var/log/lyrion
- Add missing perl-digest-sha1 and perl-sub-name dependencies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 13:17:17 +01:00
b9b0be1b9f feat(secubox-portal): Update devstatus page and increment release
- Fixed changelog dates (2025 -> 2026)
- Added v0.15.0-rc2 entry for firewall bouncer fix
- Updated roadmap to match campaign.html planning:
  - Phase 4: Beta Testing (Q1 2026)
  - Phase 5: Crowdfunding (Q2 2026)
  - Phase 6: Production (Q3-Q4 2026)
  - Final Delivery (Q4 2027)
- Incremented PKG_RELEASE to 2

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 11:50:11 +01:00
2d2231471b fix(secubox-portal): Update roadmap from campaign.html planning
Aligned roadmap with official project phases from campaign page:
- Phase 4: Beta Testing (Q1 2026) - 100 beta testers recruitment
- Phase 5: Crowdfunding (Q2 2026) - €50,000 target
- Phase 6: Production (Q3-Q4 2026) - Manufacturing & QA
- Final Delivery (Q4 2027)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 11:48:35 +01:00
9738123d91 fix(secubox-portal): Update roadmap to match website development status
Removed unrealistic items (AI Threat Detection, Mobile App, Cloud) and
replaced with practical goals based on current module progress:
- Network Modes 1.0 (currently at 35%)
- SecuBox Hub 1.0 (currently at 31%)
- Multi-WAN Failover
- Documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 11:47:05 +01:00
c1249fde7a fix(secubox-portal): Update changelog dates to 2026 and add rc2 entry
- Fixed incorrect year (2025 -> 2026) in changelog dates
- Added v0.15.0-rc2 changelog entry for CrowdSec firewall bouncer fix

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 11:44:00 +01:00
f72ea0da32 fix(cs-firewall-bouncer): Add missing DROP rules for blacklisted IPs
The init script created nftables sets and chains but never added the
actual DROP rules to block traffic from blacklisted IPs. This caused
the bouncer to populate sets correctly but traffic was never blocked.

Added DROP rules for:
- IPv4 input chain (crowdsec-blacklists)
- IPv4 forward chain (crowdsec-blacklists)
- IPv6 input chain (crowdsec6-blacklists)
- IPv6 forward chain (crowdsec6-blacklists)

Each rule respects the deny_log and deny_action configuration options.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:27:46 +01:00
3f2fdaae47 fix(local-build): Add rsync symlink for OpenWrt build environment
OpenWrt uses a restricted PATH that doesn't include system binaries.
The kernel headers build step requires rsync, which fails with Error 127.

This fix automatically creates a symlink to the system rsync in
staging_dir/host/bin/ at the start of firmware and toolchain builds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:46:14 +01:00
1cc95fbd10 fix(local-build): Add Go compiler and target preparation to toolchain build
- Add target/compile step to build kernel and prepare target environment
- Add golang/host/compile step to build host Go compiler for Go packages
- Combine tools/install and toolchain/install with target/compile for complete prereq build
- Use print_warning instead of error for non-fatal build issues

This fixes the toolchain build to properly support Go packages
(secubox-app-cs-firewall-bouncer, secubox-app-crowdsec) which require
the host Go compiler.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:42:19 +01:00
81e4f1c6d6 feat(local-build): Add build-toolchain command for native packages
Adds new command to build Go/C++ packages using full OpenWrt toolchain:
- secubox-app-cs-firewall-bouncer (Go)
- secubox-app-crowdsec (Go)
- secubox-app-ndpid (C++)
- secubox-app-netifyd (C++)
- secubox-app-nodogsplash (C)

Usage: ./local-build.sh build-toolchain <device>
Example: ./local-build.sh build-toolchain mochabin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:40:39 +01:00
e62919eec7 refactor(packages): Rename and reorganize SecuBox packages
- Rename crowdsec-firewall-bouncer to secubox-app-cs-firewall-bouncer
- Rename secubox-auth-logger to secubox-app-auth-logger
- Delete secubox-crowdsec-setup (merged into other packages)
- Fix circular dependencies in luci-app-secubox-crowdsec
- Fix dependency chain in secubox-app-crowdsec-bouncer
- Add consolidated get_overview API to crowdsec-dashboard
- Improve crowdsec-dashboard overview performance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 10:42:52 +01:00
fd7caeb8c3 fix(crowdsec-dashboard): Fix typo in ACL (seccubox_logs -> secubox_logs)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 12:20:12 +01:00
239a68f9de fix(crowdsec-dashboard): Add get_overview to ACL permissions
The new get_overview RPC method was missing from the ACL file,
causing "Access denied" errors in the frontend.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 12:19:58 +01:00
b60ceba2a6 perf(crowdsec-dashboard): Add consolidated get_overview API call
Consolidate multiple dashboard API calls into a single get_overview RPC
method to reduce network overhead and improve page load performance.
The frontend now transforms the consolidated response to maintain
compatibility with existing view logic. Also increases poll interval
from 30s to 60s.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 10:18:41 +01:00
fb22a9146e fix(crowdsec-dashboard): Fix logs display and country data
- Fix typo seccubox_logs -> secubox_logs
- Get country data from alerts (source.cn) instead of decisions
- Display CrowdSec logs instead of non-existent secubox.log
- Rename "SecuBox Log Tail" to "CrowdSec Logs"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 10:07:39 +01:00
024a768243 fix(crowdsec-dashboard): Get country data from alerts instead of decisions
CrowdSec decisions don't contain country data. GeoIP enricher adds
country info to alerts (source.cn or source.country field).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 10:04:24 +01:00