secubox-openwrt/README.md

239 lines
7.2 KiB
Markdown
Raw Permalink Normal View History

# SecuBox - Security Suite for OpenWrt
2025-12-21 08:46:33 +00:00
**Version:** 0.15.3
**Last Updated:** 2025-01-14
**Status:** Active Development
docs: Reorganize documentation structure and add architecture diagrams Major documentation improvements and restructuring for better maintainability and navigation. ## Structural Changes ### New Documentation Organization - Move all documentation to DOCS/ directory for better organization - Create DOCS/archive/ for historical documents - Move deployment scripts to secubox-tools/ directory ### Archived Documents - COMPLETION_REPORT.md → archive/ (project milestone) - MODULE-ENABLE-DISABLE-DESIGN.md → archive/ (feature implemented) - BUILD_ISSUES.md → archive/ (issues resolved) - Add archive/README.md with archiving policy and document index ## Documentation Enhancements ### Version Standardization - Add version headers to CLAUDE.md (v1.0.0) - Add version headers to BUILD_ISSUES.md (v1.0.0) - Standardize date format to YYYY-MM-DD across all docs ### Cross-References & Navigation - Add "See Also" sections to PERMISSIONS-GUIDE.md - Add "See Also" sections to VALIDATION-GUIDE.md - Link quick references to detailed guides - Improve documentation discoverability ### Architecture Diagrams (Mermaid) Add 3 professional diagrams to DEVELOPMENT-GUIDELINES.md: 1. **System Architecture Diagram** (§2) - Complete data flow: Browser → LuCI → RPCD → ubus → System - Color-coded components by layer - Shows JavaScript, RPC, RPCD daemon, UCI, system services 2. **Deployment Workflow Diagram** (§9) - Step-by-step deployment process with validation checkpoints - Error recovery paths for common issues (403, 404, -32000) - Local validation, file transfer, permission fixes, service restarts 3. **Component Hierarchy Diagram** (§1) - Standard page structure and CSS class relationships - Page → Header → Stats → Content → Cards → Buttons - Shows design system component organization ## New Files ### TODO-ANALYSE.md - Comprehensive documentation improvement roadmap - Tasks categorized: Immediate, Short-term, Long-term, Optional - Progress tracking with acceptance criteria - Covers testing, security, performance guides - Documentation automation plans ## Benefits ✅ Cleaner project structure (docs in DOCS/, tools in secubox-tools/) ✅ Better documentation navigation with cross-references ✅ Visual understanding through architecture diagrams ✅ Historical documents archived but accessible ✅ Standardized versioning across all documentation ✅ Clear roadmap for future documentation improvements 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-28 08:47:10 +00:00
[![Build OpenWrt Packages](https://github.com/CyberMind-FR/secubox-openwrt/actions/workflows/build-openwrt-packages.yml/badge.svg)](https://github.com/CyberMind-FR/secubox-openwrt/actions/workflows/build-openwrt-packages.yml)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](LICENSE)
2025-12-21 08:46:33 +00:00
## Overview
2025-12-21 08:46:33 +00:00
SecuBox is a comprehensive security and network management suite for OpenWrt, providing a unified ecosystem of specialized dashboards and tools. All modules are compiled automatically for multiple OpenWrt architectures via GitHub Actions.
2025-12-21 08:46:33 +00:00
**Website:** [secubox.cybermood.eu](https://secubox.cybermood.eu)
**Publisher:** [CyberMind.fr](https://cybermind.fr)
---
## SecuBox Modules
### Core
| Module | Version | Status | Description |
|--------|---------|--------|-------------|
| **luci-app-secubox-portal** | 1.0.2 | Stable | Unified dashboard and navigation |
| **luci-app-system-hub** | 0.5.1 | Stable | Central system management |
| **luci-app-secubox** | 1.0.0 | Stable | SecuBox central hub |
### Security & Monitoring
| Module | Version | Status | Description |
|--------|---------|--------|-------------|
| **luci-app-crowdsec-dashboard** | 0.7.0 | Stable | CrowdSec collaborative threat protection |
| **luci-app-netdata-dashboard** | 0.5.0 | Stable | Real-time system monitoring |
| **secubox-auth-logger** | 1.2.2 | Stable | Authentication failure logging for CrowdSec |
### Network & Access Control
| Module | Version | Status | Description |
|--------|---------|--------|-------------|
| **luci-app-client-guardian** | 0.4.0 | Stable | Parental controls and device management |
| **luci-app-auth-guardian** | 0.4.0 | Stable | Captive portal and authentication |
| **luci-app-network-modes** | 0.5.0 | Stable | Network configuration (router/AP/bridge) |
| **luci-app-wireguard-dashboard** | 0.5.0 | Stable | WireGuard VPN management |
### Bandwidth & Performance
| Module | Version | Status | Description |
|--------|---------|--------|-------------|
| **luci-app-bandwidth-manager** | 0.5.0 | Stable | QoS and bandwidth quotas |
| **luci-app-traffic-shaper** | 0.4.0 | Stable | Traffic prioritization |
| **luci-app-cdn-cache** | 0.5.0 | Stable | Local cache for games and updates |
| **luci-app-media-flow** | 0.6.3 | Beta | Multimedia streaming |
### Services & Integration
| Module | Version | Status | Description |
|--------|---------|--------|-------------|
| **luci-app-vhost-manager** | 0.5.0 | Stable | Virtual hosts management |
| **luci-app-mqtt-bridge** | 0.4.0 | Stable | MQTT home automation integration |
| **luci-app-ksm-manager** | 0.4.0 | Stable | Kernel memory optimization |
| **luci-app-network-tweaks** | 1.0.0 | Stable | Advanced network optimizations |
---
## Supported Architectures
### ARM 64-bit (AArch64)
| Target | Devices |
|--------|---------|
| `aarch64-cortex-a53` | ESPRESSObin, BananaPi R64 |
| `aarch64-cortex-a72` | MOCHAbin, Raspberry Pi 4, NanoPi R4S |
| `mediatek-filogic` | GL.iNet MT3000, BananaPi R3 |
| `rockchip-armv8` | NanoPi R4S/R5S, FriendlyARM |
| `bcm27xx-bcm2711` | Raspberry Pi 4, Compute Module 4 |
### ARM 32-bit
| Target | Devices |
|--------|---------|
| `arm-cortex-a7-neon` | Orange Pi, BananaPi, Allwinner |
| `arm-cortex-a9-neon` | Linksys WRT, Turris Omnia |
| `qualcomm-ipq40xx` | Google WiFi, Zyxel NBG6617 |
### MIPS
| Target | Devices |
|--------|---------|
| `mips-24kc` | TP-Link Archer, Ubiquiti |
| `mipsel-24kc` | Xiaomi, GL.iNet, Netgear |
### x86
| Target | Devices |
|--------|---------|
| `x86-64` | PC, VMs, Docker, Proxmox |
---
2025-12-21 08:46:33 +00:00
## Installation
2025-12-21 08:46:33 +00:00
### From Pre-built Packages
Download from [GitHub Releases](https://github.com/CyberMind-FR/secubox-openwrt/releases):
```bash
opkg update
opkg install luci-app-secubox-portal_*.ipk
opkg install luci-app-system-hub_*.ipk
opkg install luci-app-crowdsec-dashboard_*.ipk
```
### Build from Source
2025-12-21 08:46:33 +00:00
```bash
# Clone into OpenWrt SDK
cd ~/openwrt-sdk/package/
git clone https://github.com/CyberMind-FR/secubox-openwrt.git secubox
# Build
cd ~/openwrt-sdk/
make package/secubox/luci-app-secubox-portal/compile V=s
2025-12-21 08:46:33 +00:00
```
### Add as OpenWrt Feed
Add to `feeds.conf.default`:
```
src-git secubox https://github.com/CyberMind-FR/secubox-openwrt.git
2025-12-21 08:46:33 +00:00
```
Then:
2025-12-21 08:46:33 +00:00
```bash
./scripts/feeds update secubox
./scripts/feeds install -a -p secubox
make menuconfig # Select modules under LuCI > Applications
make V=s
2025-12-21 08:46:33 +00:00
```
---
## Repository Structure
2025-12-21 08:46:33 +00:00
```
secubox-openwrt/
├── package/secubox/ # All SecuBox packages
│ ├── luci-app-secubox-portal/
│ ├── luci-app-system-hub/
│ ├── luci-app-crowdsec-dashboard/
│ ├── luci-app-client-guardian/
│ ├── luci-app-wireguard-dashboard/
│ ├── luci-app-network-modes/
│ ├── luci-app-bandwidth-manager/
│ ├── luci-app-traffic-shaper/
│ ├── luci-app-cdn-cache/
│ ├── luci-app-auth-guardian/
│ ├── luci-app-media-flow/
│ ├── luci-app-vhost-manager/
│ ├── luci-app-mqtt-bridge/
│ ├── luci-app-ksm-manager/
│ ├── luci-app-network-tweaks/
│ ├── secubox-auth-logger/
│ └── ...
├── secubox-tools/ # Build tools and local feed
├── docs/ # Documentation
└── .github/workflows/ # CI/CD
```
2025-12-21 08:46:33 +00:00
---
2025-12-21 08:46:33 +00:00
## OpenWrt Compatibility
2025-12-21 08:46:33 +00:00
| Version | Status | Package Format |
|---------|--------|----------------|
| 25.x | Testing | `.apk` |
| 24.10.x | **Recommended** | `.ipk` |
| 23.05.x | Supported | `.ipk` |
---
## Development
### Developer Documentation
feat: Add support for .apk package format (OpenWrt 25.12+) OpenWrt 25.12.0-rc1 introduced a major change: switching from opkg to apk (Alpine Package Manager). This commit adds full support for building both package formats based on the OpenWrt version. **Package Build Workflow (.github/workflows/build-openwrt-packages.yml):** - Added automatic version detection for package format - 25.12+ and SNAPSHOT → .apk format - 24.10 and earlier → .ipk format - Updated feeds configuration to use correct branch (openwrt-25.12, openwrt-24.10, etc.) - Modified artifact collection to handle both .apk and .ipk files - Updated build summary to show package format - Added PKG_EXT environment variable to track format across workflow steps - Updated dependency download to handle both APKINDEX.tar.gz and Packages formats - Skip dependency downloads for RC versions (repos may not be stable) **Local Build Script (secubox-tools/local-build.sh):** - Added package format detection based on OPENWRT_VERSION - Updated feeds.conf generation to select correct branch dynamically - Modified build_packages() to detect and build correct package format - Updated collect_artifacts() to collect both .apk and .ipk files - Updated SHA256SUMS generation for both formats - Export PKG_EXT variable for use across functions **Documentation:** - CLAUDE.md: Added package format support details - README.md: Updated compatibility table with package format column - Added note explaining apk vs ipk distinction **Key Changes:** - Backwards compatible: existing workflows continue to work for .ipk - Future-proof: ready for OpenWrt 25.12 stable release - Automatic detection: no manual configuration needed - Comprehensive: covers all build scenarios (GitHub Actions, local builds) Tested scenarios: - OpenWrt 24.10.5 → builds .ipk ✅ - OpenWrt 25.12.0-rc1 → builds .apk ✅ - SNAPSHOT → builds .apk ✅ 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-27 07:16:10 +00:00
| Guide | Description |
|-------|-------------|
| [DEVELOPMENT-GUIDELINES.md](./DEVELOPMENT-GUIDELINES.md) | Design System, RPCD/ubus, ACL, JavaScript |
| [QUICK-START.md](./QUICK-START.md) | Quick reference and code templates |
| [CLAUDE.md](./CLAUDE.md) | OpenWrt shell scripting guidelines |
### Critical Rules
1. **RPCD naming**: filename = ubus object (`luci.system-hub`)
2. **Menu paths**: path = view file (`system-hub/overview.js`)
3. **Permissions**: RPCD=755, CSS/JS=644
4. **Validate**: `./secubox-tools/validate-modules.sh`
---
2025-12-21 08:46:33 +00:00
## Public Pages
2025-12-21 08:46:33 +00:00
SecuBox includes public pages accessible without authentication:
- **Crowdfunding Campaign** - Support the project development
- **Bug Bounty Program** - Security vulnerability reporting
- **Development Status** - Modules list, roadmap, changelog
Access at: `https://your-secubox/cgi-bin/luci/secubox-public/`
---
## Links
- **Website**: [secubox.cybermood.eu](https://secubox.cybermood.eu)
- **GitHub**: [github.com/CyberMind-FR/secubox-openwrt](https://github.com/CyberMind-FR/secubox-openwrt)
- **Publisher**: [CyberMind.fr](https://cybermind.fr)
- **Issues**: [GitHub Issues](https://github.com/CyberMind-FR/secubox-openwrt/issues)
---
2025-12-21 08:46:33 +00:00
## License
2025-12-21 08:46:33 +00:00
Apache-2.0 © 2025 CyberMind.fr
---
## Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
---
## Author
**Gandalf** - [CyberMind.fr](https://cybermind.fr)
**Made with love in France**