Commit Graph

10 Commits

Author SHA1 Message Date
bc5bd8d8ce feat(haproxy,service-registry): Add async cert workflow and fix QR codes
HAProxy Certificates:
- Add async certificate request API (start_cert_request, get_cert_task)
- Non-blocking ACME requests with background processing
- Real-time progress tracking with phases (starting → validating → requesting → verifying → complete)
- Add staging vs production mode toggle for ACME
- New modern UI with visual progress indicators
- Task persistence and polling support

Service Registry:
- Fix QR codes using api.qrserver.com (Google Charts deprecated)
- Fix form prefill with proper _new section selectors
- Add change event dispatch for LuCI form bindings
- Update landing page generator with working QR API

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-28 06:40:57 +01:00
1fb2b11d4a feat(crowdsec+haproxy): Dashboard refactor, custom parsers & scenarios
CrowdSec Dashboard:
- Refactor all views (alerts, bouncers, decisions, overview, settings)
- Add soc.css for Security Operations Center styling
- Remove 3000+ lines of redundant code

CrowdSec Custom Parsers & Scenarios:
- Add secubox-gitea parser and bruteforce scenario
- Add secubox-haproxy parser and bruteforce scenario
- Add secubox-streamlit parser and bruteforce scenario
- Add secubox-webapp parser and bruteforce scenario
- Update Makefile for new parser/scenario files

HAProxy:
- Update api.js, backends.js view improvements
- Update luci.haproxy RPCD backend
- Update haproxyctl helper script

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 11:16:17 +01:00
c9075bc190 feat(haproxy): Add exposed services integration and fix cert key naming
- Fix HAProxy certificate key naming (.key -> .crt.key) for directory loading
- Add auto-fix in container startup script for existing certificates
- Add list_exposed_services RPC method to fetch services from secubox-exposure
- Add dynamic port scanning for running services discovery
- Add "Quick Select" dropdown in Add Server modal for service auto-fill
- Bump luci-app-haproxy to 1.0.0-r8
- Bump secubox-app-haproxy to 1.0.0-r15

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 08:34:57 +01:00
62cf871eeb feat(haproxy): Add emergency health banner and quick restart buttons
- HAProxy overview: Add prominent emergency banner showing service status
  with quick health indicators (Container/HAProxy/Config) and one-click
  Restart/Start/Stop buttons
- SecuBox dashboard: Add Critical Services Quick Restart section with
  buttons for HAProxy, CrowdSec, Tor Shield, and Gitea
- Metabolizer config: Fix portal_path to /www/blog

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 08:13:40 +01:00
7a3b3eca23 fix(haproxy): Parse inline servers and enable port editing
- RPCD _add_backend now parses inline 'server' option format
- Servers embedded in backend response with inline flag
- update_server converts inline servers to separate UCI sections
- delete_server handles both inline and separate server sections
- API and UI pass inline flag for proper handling

Fixes server port editing in LuCI backends interface.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 06:01:44 +01:00
3a5655451e feat(haproxy): Add edit functionality for backends, servers, and vhosts
- Add showEditVhostModal() for editing virtual host properties
- Add showEditBackendModal() for editing backend configuration
- Add showEditServerModal() for editing server properties
- Modern card-based UI with inline edit/delete actions
- Toggle enable/disable for backends
- Fix haproxyctl to read server option from backend UCI sections
- Add debug logging to container startup script

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 05:56:03 +01:00
45c9a4b7dc fix(haproxy): Fix NodeList rendering error in overview dashboard
- Add pollRegistered flag to prevent duplicate poll registration
- Fix refreshDashboard to use replaceChild instead of dom.content
- Build content arrays explicitly to avoid null values in arrays
- Fix disabled attribute handling for action buttons

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:34:40 +01:00
500e020809 feat(haproxy): Enhanced dashboard with SecuBox theme design system
- Complete CSS redesign using SecuBox design system patterns (hp-* classes)
- Added dark/light mode support via CSS variables
- Overview page with:
  - Gradient page header with status badges
  - Stats grid with animated cards (vhosts, backends, certs, status)
  - Health check grid (container, HAProxy, config, ports, stats)
  - Vhosts/backends/certificates preview cards
  - Quick actions with icon buttons (start/stop/reload/validate/generate/stats)
  - Connection details panel
  - Auto-refresh polling every 30 seconds
  - Toast notifications for feedback
- Vhosts page with:
  - Clean form for adding new virtual hosts
  - Enhanced table with SSL/ACME badges
  - Toggle and delete actions with confirmation modals
- Responsive layout for mobile/tablet
- Inter + JetBrains Mono fonts for modern typography

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:27:10 +01:00
22bd4bd445 fix(haproxy): Use module-level RPC declarations in api.js
Fix TypeError "haproxy.api factory yields invalid constructor" by
refactoring api.js to use correct LuCI module pattern:
- Define RPC calls at module level with rpc.declare()
- Reference them in baseclass.extend() object
- Add getDashboardData helper function at module level

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:15:48 +01:00
f3fd676ad1 feat(haproxy): Add HAProxy load balancer packages for OpenWrt
- Add secubox-app-haproxy: LXC-containerized HAProxy service
  - Alpine Linux container with HAProxy
  - Multi-certificate SSL/TLS termination with SNI routing
  - ACME/Let's Encrypt auto-renewal
  - Virtual hosts management
  - Backend health checks and load balancing

- Add luci-app-haproxy: Full LuCI web interface
  - Overview dashboard with service status
  - Virtual hosts management with SSL options
  - Backends and servers configuration
  - SSL certificate management (ACME + import)
  - ACLs and URL-based routing rules
  - Statistics dashboard and logs
  - Settings for ports, timeouts, ACME

- Update luci-app-secubox-portal:
  - Add Services category with HAProxy, HexoJS, PicoBrew,
    Tor Shield, Jellyfin, Home Assistant, AdGuard Home, Nextcloud
  - Make portal dynamic - only shows installed apps
  - Add empty state UI for sections with no apps
  - Remove 404 errors for uninstalled apps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:09:32 +01:00