Commit Graph

1506 Commits

Author SHA1 Message Date
29d309649e feat(wireguard): Implement Reverse MWAN WireGuard v2 Phase 1
WireGuard mesh peers as backup internet uplinks via mwan3 failover.

CLI (wgctl) uplink commands:
- uplink list/add/remove/status/test - Manage peer uplinks
- uplink failover enable/disable - Toggle automatic failover
- uplink priority/offer/withdraw - Priority and mesh advertising

Uplink Library (/usr/lib/wireguard-dashboard/uplink.sh):
- Gossip protocol integration via secubox-p2p
- WireGuard interface creation with IP allocation (172.31.x.x/16)
- mwan3 failover integration
- Connectivity testing and latency measurement

RPCD Backend (9 new methods):
- Read: uplink_status, uplinks
- Write: add_uplink, remove_uplink, test_uplink, offer_uplink,
         withdraw_uplink, set_uplink_priority, set_uplink_failover

UCI Config (/etc/config/wireguard_uplink):
- Global settings: auto_failover, failover_threshold, ping_interval
- Provider settings: offering state, bandwidth/latency advertisement
- Per-uplink config: interface, peer_pubkey, endpoint, priority

Phase 2 pending: LuCI dashboard integration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-01 15:43:17 +01:00
0c55ef6ec1 feat(nextcloud): Enhance integration with WAF, backups, mail, sync URLs
- WAF-safe SSL: Route through mitmproxy_inspector, auto-add routes
- Scheduled backups: setup-backup-cron with hourly/daily/weekly support
- Email/SMTP: setup-mail command for outbound notifications
- CalDAV/CardDAV: connections command shows sync URLs for all clients
- New RPCD methods: get_connections, setup_mail, setup_backup_cron
- ACL updated with new method permissions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-01 09:07:19 +01:00
00d92037b9 feat(tools): Add pre-deploy-lint.sh for syntax validation
- JavaScript validation via Node.js --check (with pattern fallback)
- JSON validation for menu.d and acl.d files
- Shell script validation with shellcheck integration
- CSS validation for unclosed braces and typos
- LuCI-specific checks: require format, console.log, debugger
- Integrated into quick-deploy.sh as default for LuCI apps
- --lint/--no-lint flags for deployment control
- Documentation added to secubox-tools/README.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 18:29:51 +01:00
ecf0ccb9fb docs: Add Reverse MWAN WireGuard design specification
Design spec for WireGuard mesh peers as backup uplinks:
- Architecture for multi-WAN failover over WireGuard tunnels
- mwan3 integration plan for automatic failover
- Uplink capability advertisement via gossip
- CLI commands (wgctl uplink) and RPCD methods
- 4-phase implementation plan

Implementation planned for v2 release.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 18:07:48 +01:00
b542ac7d3c feat: WAF auto-ban, cache busting, deployment docs, CVE Layer 7 docs
Changes:
- Enable WAF auto-ban by default (sensitivity: moderate, min_severity: high)
- Add whitelist for common safe IPs (localhost, router)
- Add browser cache busting via version parameter in CSS loads
- Document deployment scripts in secubox-tools/README.md
- Create CVE Layer 7 architecture documentation

WAF auto-ban now active with:
- 3 threats within 5 minutes triggers ban
- 4-hour ban duration
- Critical CVEs (Log4Shell, SQLi, CMDi) ban immediately

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 18:06:12 +01:00
18987a96dc docs: Mark AI Gateway integration complete in WIP.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 17:59:35 +01:00
d351ae515a feat(ai): Integrate MCP server and threat-analyst with AI Gateway
Route AI requests through the AI Gateway for data sovereignty compliance.

Changes:
- secubox-mcp-server: ai.sh now prefers AI Gateway (port 4050), falls back to LocalAI
- secubox-threat-analyst: UCI config adds ai_gateway_url option
- threat-analyst CLI shows both Gateway and LocalAI status
- analyzer.sh and appliers.sh use ai_url (Gateway preferred)
- README updated with AI Gateway integration section

The AI Gateway ensures threat data (IPs, MACs, logs) is classified as
LOCAL_ONLY and never leaves the device, supporting ANSSI CSPN compliance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 17:59:20 +01:00
f3cea01792 feat(ai-gateway): Add Data Classifier (Sovereignty Engine) for ANSSI CSPN
Implement secubox-ai-gateway package with intelligent AI request routing
based on data sensitivity classification for GDPR/ANSSI compliance.

Features:
- 3-tier data classification: LOCAL_ONLY, SANITIZED, CLOUD_DIRECT
- Provider hierarchy: LocalAI > Mistral (EU) > Claude > GPT > Gemini > xAI
- PII sanitizer: IPv4/IPv6, MAC, credentials, private keys scrubbing
- OpenAI-compatible API proxy on port 4050
- aigatewayctl CLI: status, classify, sanitize, provider, audit commands
- RPCD backend with 11 ubus methods for LuCI integration
- ANSSI CSPN audit logging in JSONL format

Classification patterns detect:
- IP addresses, MAC addresses, private keys
- Credentials (password, secret, token, api_key)
- System paths, security tool references
- WireGuard configuration data

All cloud providers are opt-in. Default LOCAL_ONLY ensures data
sovereignty - sensitive data never leaves the device.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 17:55:22 +01:00
4a0ab9530f feat(mesh): Yggdrasil extended peer discovery + bugfixes
## New Features
- secubox-app-yggdrasil-discovery: Mesh peer discovery via gossip protocol
  - yggctl CLI: status, self, peers, announce, discover, bootstrap
  - Auto-peering with trust verification (master-link fingerprint)
  - Daemon for periodic announcements

## Bug Fixes
- tor-shield: Fix opkg downloads failing when Tor active
  - DNS over Tor disabled by default
  - Auto-exclude public DNS servers from iptables rules
  - Excluded domains bypass list (openwrt.org, pool.ntp.org, etc.)

- haproxy: Fix portal 503 "End of Internet" error
  - Corrected malformed vhost backend configuration
  - Regenerated HAProxy config from UCI

- luci-app-nextcloud: Fix users list showing empty
  - RPC expect clause was extracting array, render expected object

## Updated
- Bonus feed: All IPKs rebuilt
- Documentation: HISTORY.md, WIP.md, TODO.md updated

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 17:32:41 +01:00
80f2d2daa7 docs: Add Matrix/Element self-hosted chat to HISTORY.md
- Conduit Matrix homeserver in LXC container
- Element Web client via uhttpd on port 8088
- HAProxy integration with SSL certificates
- Routes added to central secubox-route registry

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 11:27:25 +01:00
55ce42cd6b docs: Add centralized routing to HISTORY.md
Document the new secubox-route centralized WAF route management system
added in the previous commit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 08:57:29 +01:00
19632e38e0 feat(routing): Centralize mitmproxy route management in secubox-core
Add centralized route registry (`secubox-route`) in secubox-core to eliminate
route management duplication across metablogizerctl, streamlitctl, and
mitmproxyctl.

New features:
- `/etc/config/secubox-routes` - UCI config for central route registry
- `/usr/sbin/secubox-route` - CLI for route management (add, remove, sync)
- Import routes from HAProxy, MetaBlogizer, Streamlit with source tracking
- Auto-sync to all mitmproxy instances on route changes
- Skip wildcard domains and LuCI (port 8081) routes

Updated services to use centralized registry:
- metablogizerctl: Use secubox-route add instead of mitmproxyctl sync
- streamlitctl: Use secubox-route add with domain/port params
- peertubectl: Use secubox-route add for emancipation
- vhost-manager/mitmproxy.sh: Prefer secubox-route when available
- mitmproxyctl: Delegate to secubox-route import-all for sync-routes

This prevents route mixups between services and provides a single
source of truth for all WAF routing configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 08:56:04 +01:00
0389f93667 fix(mitmproxy): Wildcard routing fallback and JSON output corruption
- Skip wildcard domains (starting with '.') in sync-routes to allow
  unknown subdomains to show "WAF SAYS NO" 404 page instead of blog
- Fix log_info() to output to stderr to prevent JSON corruption in
  sync-routes when log messages mixed with JSON fragments
- Escape CSS curly braces in NOT_FOUND_HTML for Python .format()
  compatibility (fixes KeyError: 'box-sizing')

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 08:45:44 +01:00
356e2814ca fix(streamlit): Add Re-upload and Gitea Sync buttons to Apps table
Restores missing functionality in the Streamlit dashboard:
- Re-upload button: Upload new .py/.zip to replace existing app code
- Gitea Sync button: Pull latest changes from Gitea repository

The buttons appear in the Apps Library table for each app.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 08:15:19 +01:00
07705f458c feat(meshname-dns): Add decentralized .ygg domain resolution
Implements Meshname DNS for Yggdrasil mesh networks with gossip-based
service discovery and dnsmasq integration.

New packages:
- secubox-app-meshname-dns: Core service with meshnamectl CLI
- luci-app-meshname-dns: LuCI dashboard for service management

Features:
- Services announce .ygg domains via gossip protocol (meshname_announce)
- dnsmasq integration via /tmp/hosts/meshname dynamic hosts file
- Cross-node resolution through gossip message propagation
- RPCD handler with 8 methods for LuCI integration

CLI commands: announce, revoke, resolve, list, sync, status, daemon

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 07:57:16 +01:00
af222328ee fix(waf): Add 'strict' sensitivity alias and fix false positives
- secubox_analytics.py: Add 'strict' as alias for 'aggressive' in autoban
- Fix waf_bypass false positives on LuCI static resources
- Root cause: different analytics versions across mitmproxy instances
- Update HISTORY.md with OpenClaw Gemini fix and WAF tuning

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 16:39:49 +01:00
55ec009c13 fix(openclaw): Update Gemini models to 2.0/2.5 versions
Gemini 1.5 models no longer available in API. Updated model list to:
- gemini-2.0-flash
- gemini-2.5-flash
- gemini-2.5-pro
- gemini-flash-latest

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 12:27:25 +01:00
5d905c23ac feat(openclaw): Add Google Gemini API support
- Added gemini provider with models: gemini-1.5-flash, gemini-1.5-pro, gemini-pro
- Updated RPCD handler with Gemini API endpoint
- Updated settings.js with Google AI Studio link
- Updated chat.js to parse Gemini response format
- Changed Ollama default URL to LocalAI (port 8091)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 11:47:17 +01:00
6dca8b3460 docs: Update tracking files for OpenClaw package
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 09:48:45 +01:00
56f5d8c61f feat(openclaw): Add LuCI web interface for OpenClaw AI assistant
Complete LuCI app with:
- Chat view with real-time AI conversation
- Settings view for provider/model/API key configuration
- Integrations view for Telegram/Discord/Slack/Email/Calendar
- RPCD backend handling all ubus calls
- Support for Anthropic, OpenAI, and Ollama providers

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 09:47:35 +01:00
a8dc5f58fe feat(waf): Never fallback to LuCI, add funny 404 page + OpenClaw package
mitmproxy haproxy_router.py:
- Return 404 instead of routing to LuCI (8081) for missing routes
- Block any routes that point to port 8081
- Add "WAF Says NO" themed 404 page with multi-layer WAF visual

HAProxy (deployed on router):
- Configure end_of_internet backend with custom errorfiles
- Add "End of Internet" themed error pages for 5xx errors
- Patched haproxyctl to include errorfile directives

New package: secubox-app-openclaw
- Personal AI assistant integration for SecuBox
- Supports Anthropic Claude, OpenAI, and Ollama providers
- Chat integrations (Telegram, Discord, Slack)
- Email/calendar automation support
- CLI tool: openclawctl

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 09:23:43 +01:00
c453cef5db perf(services-registry): Optimize RPCD handler for 200+ vhosts
Was timing out with 199 HAProxy vhosts due to ~600 UCI calls.

Optimizations:
- get_haproxy_vhosts(): Single uci show + awk parsing instead of
  per-vhost uci -q get calls (600 calls → 1 call)
- get_init_services(): Check only key services, use symlink detection
  instead of executing init scripts
- get_metrics_summary(): Read CrowdSec data from cache file instead
  of slow cscli commands

Result: Handler now responds in <1s with 204 published services.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 08:48:04 +01:00
0d40efea28 feat(kiss-theme): Redesign navigation with service subcategories
Reorganized sidebar menu into 9 logical categories:
- Dashboard: Home, Dashboard, System Hub, App Store
- Security: CrowdSec, mitmproxy WAF, IP Blocklist, Vortex FW, Wazuh, etc.
- Network: HAProxy, WireGuard, Tor Shield, DNS Master, CDN Cache, etc.
- Media: Jellyfin, PeerTube, Lyrion, WebRadio, MagicMirror
- Communication: Mail Server, Jabber, Matrix, SimpleX, Jitsi, VoIP
- Apps: Nextcloud, Gitea, HexoJS, MetaBlogizer, Streamlit
- AI & LLM: AI Insights, Ollama, LocalAI
- P2P & Mesh: Master Link, P2P Network, Exposure, Service Registry
- System: Settings, Cloner, File Sharing, Software

Added section comments for maintainability.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 08:15:34 +01:00
2924707e35 fix(luci): Await form.Map.render() Promise before KissTheme.wrap()
form.Map.render() returns a Promise, not a DOM element. Passing it
directly to KissTheme.wrap() caused "does not implement interface Node"
errors. Fixed by awaiting the Promise with .then() before wrapping.

Affected views:
- metablogizer/settings.js
- localai/settings.js
- domoticz/overview.js
- simplex/overview.js

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-27 07:24:10 +01:00
33bc1e1732 feat(haproxy): Add CrowdSec HAProxy bouncer for dual-layer WAF
- Add lua-load directive for CrowdSec bouncer script
- Add http-request lua.crowdsec_check to HTTP/HTTPS frontends
- Block requests where txn.blocked=1 with 403 status
- Skip CrowdSec check for ACME challenges (HTTP frontend)
- Dual-layer WAF: CrowdSec IP blocking + mitmproxy inspection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 16:05:37 +01:00
14e965d5fa docs: Update Nextcloud Talk fixes in HISTORY.md
- MIME type fix for static assets
- 403 fix for /apps/ routes
- Signaling endpoint URL correction

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 14:12:22 +01:00
d9913c4c17 fix: Mailserver webmail LXC detection, Nextcloud nginx MIME types
- luci.mailserver: Detect LXC containers for webmail status (not just Docker)
- docs: Add nginx static file fix and webmail detection to HISTORY/WIP

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 13:56:06 +01:00
49d88f1314 docs: Update HISTORY.md with MetaBlogizer optimization and Talk signaling
- Added entry 42: MetaBlogizer/Portal RPC performance optimization
- Added entry 43: Nextcloud Talk signaling server LXC migration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 13:32:46 +01:00
27bb26df01 fix(metablogizer): Optimize list_sites RPC for 78 sites performance
- Replace per-site UCI calls with single-pass awk parsing
- Pre-fetch listening ports, HAProxy backends, and Tor services
- Fix getline variable corruption that produced invalid JSON
- Reduce execution time from 30+ seconds to 0.23 seconds
- Update signaling.gk2.secubox.in route to port 8083 (LXC)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 13:30:28 +01:00
33ad337e7d fix(routes): Add missing mitmproxy routes
Added routes for:
- pf.gk2.secubox.in (Streamlit prompt_forge, port 8502)
- secubox.maegia.tv (LuCI, port 8081)
- meet.maegia.tv (Jitsi, port 8088)
- xchat.gk2.secubox.in (XMPP, port 5280)
- fan.gk2.secubox.in (Streamlit, port 8529)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 12:51:45 +01:00
40fcba797f fix(portal): Optimize get_vhosts RPC method for 191 vhosts
- Rewrote method_get_vhosts() to use single-pass awk parsing
- Reduced execution time from 30+ seconds timeout to 0.24 seconds
- Added arm, armada, files42 routes to mitmproxy config

The previous implementation made 4 UCI calls per vhost (764 total)
causing the luci-tree page to timeout. New implementation parses
uci show output once with awk.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 12:27:39 +01:00
e5e1151ffb feat(mitmproxy): Add route management and auto-sync for services
- Add route management commands:
  - `mitmproxyctl route list` - List all routes
  - `mitmproxyctl route add <domain> <ip> <port>` - Add manual route
  - `mitmproxyctl route remove <domain>` - Remove route
  - `mitmproxyctl route check` - Check for missing routes

- Improve sync-routes to scan MetaBlogizer and Streamlit services:
  - Auto-detect enabled MetaBlogizer sites and add routes
  - Auto-detect enabled Streamlit instances with matching vhosts
  - Warn about mitmproxy_inspector vhosts with missing routes

- Update routes config with 188 routes

This fixes the issue where services using mitmproxy_inspector backend
would fall back to default because their routes were not configured.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 11:52:01 +01:00
0b3908fb42 config: Add Streamlit mitmproxy routes
Added 22 missing routes for Streamlit apps:
- yijing360, fabricator, pix, wuyun, yling, bweep, bweek, hermes
- ftvm, cpf, pdf, papyrus, osint, swg, prompt, fanzine
- cybfan, tam, files_40, files_42, files42, console

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 11:42:53 +01:00
4038b49293 config: Add mitmproxy haproxy-routes.json for gk2.secubox.in sites
Added missing routes for MetaBlogizer sites:
- tdah.gk2.secubox.in -> 127.0.0.1:8960
- boom.gk2.secubox.in -> 127.0.0.1:8958
- zlib.gk2.secubox.in -> 127.0.0.1:8961
- ccom.gk2.secubox.in -> 127.0.0.1:8949
- tuto.gk2.secubox.in -> 127.0.0.1:8959

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 10:26:25 +01:00
495d5da768 docs: Add Yggdrasil IPv6 overlay network milestone
- Deployed Yggdrasil on master (aarch64) and clone (x86_64)
- Connected to 2 public peers + LAN multicast auto-discovery
- Bidirectional ping6 and SSH over Yggdrasil working
- Fixed firewall zones: device="ygg0" required for nftables
- IPv6: master 201:e4d4:..., clone 201:a9d8:...
- Marks v1.1+ Yggdrasil overlay as complete

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 09:24:17 +01:00
57ff4de960 docs: Mark v1.0.0 roadmap complete - P2P mesh intelligence validated
- P2P Mesh Intelligence: DONE (2026-02-26)
  - Threat IOC propagation tested bidirectionally (116 blocks synced)
  - Real CrowdSec/WAF threats shared between nodes
  - Automatic SSH-based mesh sync configured (5-min cron)

- Mesh Onboarding Testing: DONE
  - ZKP cross-node verification tested (bidirectional ACCEPT)
  - master-link join flow validated

- Factory auto-provisioning: marked DONE (2026-02-24)

All v1.0.0 milestones complete. Next: v1.1+ Extended Mesh (Yggdrasil)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 09:04:52 +01:00
fd1324c6a8 docs: Add ZKP cross-node verification and mesh sync testing
- ZKP bidirectional authentication tested between master (aarch64) and clone (x86_64)
- Hamiltonian cycle zero-knowledge proofs verified in both directions
- Mesh blockchain sync tested: 114 blocks synchronized bidirectionally
- Automatic SSH-based mesh-sync cron job configured (every 5 minutes)
- Deployed x86_64 ZKP binaries to clone for cross-architecture support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-26 08:56:36 +01:00
a612bbe199 fix(haproxyctl): Handle multiple users in userlist
- Changed _print_uci_userlist to use config_list_foreach
- Each user now gets separate "user ... password ..." line
- Fixes HAProxy basic auth with multiple users

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 15:25:28 +01:00
a85a7dd39c feat(portal): Add ALERTE.DEPOT to SecuBox portal
- New section: Sécurité & Conformité
- Links to alerte.gk2.secubox.in
- Anonymous whistleblower platform (Loi Waserman)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 15:09:45 +01:00
a1a01b362b feat(alerte-depot): Add SecuBox Users HTTP authentication
- Fix auth for Streamlit container (no ubus access)
- Use HTTP JSON-RPC to /ubus endpoint for authentication
- Add ALERTE.DEPOT app source to repo
- Update HISTORY.md with VoIP and auth fixes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 14:54:33 +01:00
701558f611 fix(luci-app-voip): Remove invalid 'local' keywords from RPCD handler
- Shell 'local' keyword only works inside functions, not case statements
- Remove all 'local' declarations to fix RPCD handler execution
- Fixes "not in a function" error when calling trunk_test and other methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 14:41:43 +01:00
c137296dcd fix(voipctl): Fix JSON output in status command
- Fix active_calls and extensions count to output clean integers
- Remove tr -cd which was causing duplicate values in JSON
- Use simpler variable assignment with fallback to 0
- Prevents malformed JSON output from cmd_status()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 14:37:33 +01:00
4fee9e4c12 feat(secubox-users): Add Gitea integration with password sync
- Add Gitea as a service option in SecuBox Users UI
- Add Gitea checkbox in Add User modal
- Add Gitea service badge in status display
- Implement password sync to Gitea via API on password change
- Fix Gitea API call to include login_name parameter
- Add gitea to check_service() and get_status()
- Sync passwords to all enabled services (email, jabber, nextcloud, gitea)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 13:42:41 +01:00
33426e90e5 fix(streamlit): Fix ZIP extraction - except catches SystemExit
The bare `except:` clause catches SystemExit which is raised by
sys.exit(0), causing the script to fall through to sys.exit(1).

Changed to `except Exception:` which doesn't catch SystemExit,
allowing proper exit code propagation.

Also:
- Simplified Python extraction script
- Use double quotes for string literals (shell compatibility)
- Write Python script to temp file instead of heredoc (RPCD stdin conflict)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 12:51:15 +01:00
d0d1c7d557 docs: Update HISTORY.md with Streamlit KISS upload and service fixes 2026-02-25 12:37:52 +01:00
20cf959185 feat(streamlit): KISS upload - auto-detect ZIP, extract app.py, install deps
Streamlit upload now matches MetaBlogizer KISS pattern:
- Auto-detects ZIP files by magic bytes (PK header)
- Extracts app.py from ZIP archives automatically
- Adds UTF-8 encoding declaration to Python files
- Installs requirements.txt dependencies in background
- Restarts instance on re-upload for immediate update

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 12:32:45 +01:00
af1564821f feat(metablogizer): Add "Set as index" checkbox to upload modal
- Upload modal now defaults to replacing index.html
- "Set as index" checkbox checked by default
- Uncheck to use original filename (shows destination field)
- Fixes issue where uploads weren't updating main page

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 12:16:23 +01:00
ed0c95f8da fix(metablogizer): Use emancipated flag for Expose/Unpublish button
- Changed button logic from exp.vhost_exists to exp.emancipated
- Non-emancipated sites now correctly show "Expose" button
- Emancipated sites show "Unpublish" button
- vhost_exists was incorrectly true for some non-emancipated sites

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 12:14:26 +01:00
3b32d631cb fix(metablogizer): Auto-republish and Gitea push on file upload
- Add auto-republish to method_upload_file (was only in upload_finalize)
- Add Gitea push to cmd_publish when gitea.enabled=1
- Use haproxyctl reload instead of init.d (container-aware)
- Uploaded content now triggers full republish flow for emancipated sites

This fixes the issue where uploading new HTML content didn't update
the live site because republish wasn't triggered.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 12:08:58 +01:00
629c21a75c feat(portal): Add password change feature for authenticated users
- New RPC method `change_password` in luci.secubox-users
  - Verifies current password before allowing change
  - Syncs new password to all enabled services (email, jabber, nextcloud)
  - Matrix/PeerTube require manual password update (noted in response)
- Portal UI updates:
  - New "Account" section with "Change Password" card
  - Password change modal with current/new/confirm fields
  - "My Services" card showing enabled services
- ACL updated to include new authentication methods

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 12:05:29 +01:00