mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-28 21:17:36 +00:00
Nginx architecture: - Modular config: each module installs /etc/nginx/secubox.d/<module>.conf - Auto-register on install, auto-remove on purge - Main config includes from secubox.d/*.conf - 27 module snippets for dynamic component management Hub enhancements: - Add roadmap widget showing migration progress (84% complete) - Add /api/v1/hub/roadmap endpoint with category breakdown - Shared sidebar.css for consistent styling across modules New modules: - secubox-portal: JWT authentication, session management - secubox-dns: DNS server management - secubox-mail: Mail server (Postfix) management - secubox-webmail: Roundcube webmail - secubox-users: User account management - secubox-publish: Content publishing - secubox-waf: Web Application Firewall - secubox-mail-lxc: Mail LXC container - secubox-webmail-lxc: Webmail LXC container Debian packaging: - All modules updated with modular nginx support - postinst: creates secubox.d/, reloads nginx - prerm: removes snippet, reloads nginx - rules: installs nginx/<module>.conf Scripts: - new-package.sh: generates modular nginx files for new modules - retrofit-nginx-modular.sh: updates existing packages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
5.4 KiB
5.4 KiB
MIGRATION MAP — SecuBox OpenWrt → Debian
Mis à jour : 2026-03-21
Légende : ✅ Terminé · 🔄 En cours · ⬜ À faire · ⏸ Bloqué
Infrastructure
| Composant | Statut | Notes |
|---|---|---|
| Repo structure | ✅ | Structure créée |
| CLAUDE.md | ✅ | Instructions Claude Code |
| secubox_core lib | ✅ | auth, config, logger, system |
| nginx template | ✅ | Reverse proxy complet |
| rewrite-xhr.py | ✅ | Gère accolades imbriquées |
| CI build-image | ✅ | Scaffold créé |
| CI build-packages | ✅ | Scaffold créé |
| build-image.sh | ✅ | arm64 + amd64 (VirtualBox) |
| create-vbox-vm.sh | ✅ | Création VM automatique |
| firstboot.sh | ✅ | JWT + SSH + hostname + nftables |
| APT repo | ✅ | apt.secubox.in (reprepro + GPG + CI) |
| Local cache | ✅ | apt-cacher-ng + repo local |
Boards supportés
| Board | SoC | Arch | Profil | Statut |
|---|---|---|---|---|
| mochabin | Armada 7040 | arm64 | secubox-full | ✅ |
| espressobin-v7 | Armada 3720 | arm64 | secubox-lite | ✅ |
| espressobin-ultra | Armada 3720 | arm64 | secubox-lite | ✅ |
| vm-x64 | x86_64-generic | amd64 | secubox-full | ✅ |
Paquets Debian — 26 modules
| Module | www/ | API | deb/ | Endpoints | Statut |
|---|---|---|---|---|---|
| secubox-core | — | — | ✅ | — | ✅ |
| secubox-hub | ✅ (71) | ✅ | ✅ | 40+ endpoints | ✅ |
| secubox-crowdsec | ✅ (54) | ✅ | ✅ | 54 endpoints | ✅ |
| secubox-netdata | ✅ (16) | ✅ | ✅ | 16 endpoints | ✅ |
| secubox-wireguard | ✅ (28) | ✅ | ✅ | 28+ endpoints | ✅ |
| secubox-vhost | ✅ | ✅ | ✅ | vhosts, ssl, certs | ✅ |
| secubox-mediaflow | ✅ (20) | ✅ | ✅ | streams, alerts... | ✅ |
| secubox-dpi | ✅ | ✅ | ✅ | 40+ endpoints netifyd | ✅ |
| secubox-qos | ✅ (80) | ✅ | ✅ | 60+ endpoints HTB | ✅ |
| secubox-auth | ✅ (11) | ✅ | ✅ | 20+ endpoints | ✅ |
| secubox-cdn | ✅ (36) | ✅ | ✅ | 25+ endpoints | ✅ |
| secubox-system | ✅ (42) | ✅ | ✅ | 35+ endpoints | ✅ |
| secubox-netmodes | ✅ (34) | ✅ | ✅ | 25+ endpoints + templates | ✅ |
| secubox-nac | ✅ (32) | ✅ | ✅ | 25+ endpoints | ✅ |
| secubox-haproxy | ✅ | ✅ | ✅ | stats, backends, acls | ✅ |
| secubox-droplet | ✅ | ✅ | ✅ | upload, publish | ✅ |
| secubox-streamlit | ✅ | ✅ | ✅ | apps, deploy | ✅ |
| secubox-streamforge | ✅ | ✅ | ✅ | apps, templates | ✅ |
| secubox-metablogizer | ✅ | ✅ | ✅ | sites, tor, publish | ✅ |
| secubox-dns | ✅ | ✅ | ✅ | zones, records, BIND | ✅ |
| secubox-mail | ✅ | ✅ | ✅ | Postfix/Dovecot, users | ✅ |
| secubox-users | ✅ | ✅ | ✅ | unified identity | ✅ |
| secubox-webmail | ✅ | ✅ | ✅ | Roundcube/SOGo | ✅ |
| secubox-mail-lxc | ✅ | ✅ | ✅ | LXC Postfix/Dovecot | ✅ |
| secubox-webmail-lxc | ✅ | ✅ | ✅ | LXC Roundcube/SOGo | ✅ |
| secubox-publish | ✅ | ✅ | ✅ | Unified publishing | ✅ |
| secubox-waf | ✅ | ✅ | ✅ | 300+ rules, CrowdSec | ✅ |
Total : 26 modules | ~600+ endpoints API
Phases du projet
Phase 1 — Hardware ✅
- build-image.sh (debootstrap arm64 + amd64)
- Board configs (mochabin, espressobin-v7, espressobin-ultra, vm-x64)
- create-vbox-vm.sh (VirtualBox)
- firstboot.sh (détection board améliorée)
- Templates netplan par board
- Kernel 6.6 LTS cross-compile (optionnel — peut utiliser stock Debian)
Phase 2 — Infrastructure ✅
- secubox_core Python lib
- nginx reverse proxy template
- rewrite-xhr.py script
- CI scaffolds
Phase 3 — Modules ✅
- Tous les frontends portés (13/13)
- Tous les APIs implémentés (14/14)
- Packaging debian complet (14/14)
- Templates netplan pour netmodes
- Frontend secubox-dpi créé
Phase 4 — APT Repo ✅
- apt.secubox.in (reprepro config)
- GPG signing (generate-gpg-key.sh)
- CI publish workflow (publish-packages.yml)
- repo-manage.sh (add/remove/list/sync)
- setup-repo-server.sh (nginx + Let's Encrypt)
- Metapackages (secubox-full, secubox-lite)
- Local cache build (apt-cacher-ng + repo local)
Commandes de build
# Build image ARM (MOCHAbin)
sudo bash image/build-image.sh --board mochabin
# Build image x64 pour VirtualBox
sudo bash image/build-image.sh --board vm-x64 --vdi
# Build image x64 avec cache local (plus rapide)
sudo bash image/build-image.sh --board vm-x64 --local-cache --vdi
# Créer VM VirtualBox
bash image/create-vbox-vm.sh output/secubox-vm-x64-bookworm.vdi
# Build un paquet .deb
cd packages/secubox-crowdsec && dpkg-buildpackage -us -uc -b
# Build et ajouter au repo local
bash scripts/build-add-local.sh secubox-crowdsec bookworm
Prochaines étapes
Phase 1 : build-image.sh + board configs✅ FaitPhase 2 : Infrastructure✅ FaitPhase 3 : Modules✅ FaitPhase 4 : APT repo (apt.secubox.in)✅ Fait- Tests d'intégration sur VM et hardware réel
Build avec cache local
# Setup cache local (une fois)
sudo bash scripts/setup-local-cache.sh
# Builder tous les packages SecuBox
bash scripts/build-all-local.sh bookworm amd64
# Construire image avec cache local
sudo bash image/build-image.sh --board vm-x64 --local-cache