Commit Graph

23 Commits

Author SHA1 Message Date
7c1c3993e0 feat(gitea): Auto-push to Gitea after file uploads
- Add automatic Gitea push after upload_finalize in Streamlit RPCD
- Add automatic Gitea push after upload_finalize in MetaBlogizer RPCD
- Fix MetaBlogizer to use site name instead of UCI section ID for push
- Fix metablogizerctl to read Gitea config from dedicated gitea section

Uploaded files via LuCI are now automatically synced to Gitea repos.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-10 07:13:47 +01:00
df34698acb feat(metablogizer): Add LuCI Emancipate button with async workflow
- Add Emancipate button to dashboard sites table
- Implement async RPC with job polling to avoid XHR timeout
- Add emancipate + emancipate_status RPCD methods
- Add ACL permissions for new RPC methods
- Change HAProxy reload to restart for clean state
- Document RPCD ACL requirements in CLAUDE.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 08:52:53 +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
60ed796b5a fix(metablogizer): Fix require path and async hosting status load
- Fix qrcode require path (slash to dot notation)
- Load hosting status asynchronously to prevent XHR timeout
- Dashboard now loads instantly with sites, HAProxy/IP populate after

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:33:30 +01:00
6e247800a4 fix(metablogizer): Remove incorrect expect clauses from API declarations
The RPCD returns data directly without wrapping in a 'result' object,
but api.js was using expect: { result: {} } which caused empty data
in the UI (0 sites shown instead of 6).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:13:49 +01:00
163364843e feat(metablogizer): KISS UI redesign with backend status
- Replace overview.js with dashboard.js using standard cbi-* classes
- Add api.js module for RPC declarations
- Show port, runtime, backend_running status in sites table
- Add sync_config, discover_vhosts, import_vhost RPC methods
- Update ACL with new method permissions
- Menu: Sites -> Dashboard

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 08:06:22 +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
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
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
e079014dfb fix(metablogizer): Improve site creation and HAProxy integration
- Add reload_haproxy() helper function for consistent reloads
- Use 127.0.0.1 for uhttpd backend address instead of 192.168.255.1
- Call fix_permissions() on upload_file to ensure correct file access
- Update delete_site to use reload_haproxy helper
- Bump PKG_RELEASE to 3

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

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

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

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

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

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 19:46:26 +01:00
888ad50f79 2026-01-27 15:56:27 +01:00
5a9627a2d6 fix(multi): Tor Shield API, ACL restart permission, menu moves
- Fix tor-shield/api.js: Use baseclass.extend() pattern correctly
- Fix tor-shield ACL: Add missing 'restart' write permission
- Fix secubox-app-tor: Disable conflicting default tor init in postinst
- Move metablogizer menu from secubox/services to admin/services

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 15:45:20 +01:00
fa5d573755 feat(multi): New LuCI apps, MetaBlogizer dual-runtime, service watchdog
- Add luci-app-lyrion: Music server dashboard
- Add luci-app-mailinabox: Email server management
- Add luci-app-nextcloud: Cloud storage dashboard
- Add luci-app-mitmproxy: Security proxy in security section
- Add luci-app-magicmirror2: Smart display dashboard
- Add secubox-app-metablogizer: CLI tool with uhttpd/nginx support
- Update luci-app-metablogizer: Runtime selection, QR codes, social share
- Update secubox-core v0.8.1: Service watchdog (auto-restart crashed services)
- Update haproxyctl: Hostname validation to prevent config errors
- Fix portal.js app discovery

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 15:23:53 +01:00
585a5d0f6c fix(metablogizer): Fix sites list not rendering
The RPC declaration with `expect: { sites: [] }` extracts the array
directly, so data[1] IS the sites array, not an object with .sites property.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:51:46 +01:00
2bf005f428 fix(metablogizer): Add default UCI config for menu visibility
- Add /etc/config/metablogizer with default settings
- Update Makefile to install config as conffile
- Fixes 404 error when accessing MetaBlogizer in LuCI

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:35:58 +01:00
bca0ba5ada fix(multi): CrowdSec health check, MetaBlogizer menu, Portal apps
- CrowdSec Dashboard: Add bouncer_count, geoip_enabled, acquisition_count,
  scenario_count fields to get_overview and get_health_check RPCD functions
- MetaBlogizer: Fix menu path to admin/secubox/services/metablogizer
- Portal: Add MetaBlogizer and Gitea to apps registry for services section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 12:34:50 +01:00
51c2f9d1a1 feat(metablogizer): Add KISS static site publisher with auto-vhost
New luci-app-metablogizer package replacing metabolizer with simplified
static site publishing:

- RPCD backend with create/delete/sync site methods
- Auto HAProxy vhost creation with SSL/ACME
- Nginx LXC container integration for serving static files
- Git sync from Gitea repositories
- QR code generation for published URLs
- Social share buttons (Twitter, LinkedIn, Facebook, Telegram, WhatsApp, Email)
- Drag-and-drop file upload UI
- SecuBox light theme styling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:56:06 +01:00