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> |
||
|---|---|---|
| .. | ||
| files | ||
| Makefile | ||
| README.md | ||
SecuBox PeerTube
Federated video streaming platform running in an LXC Debian container.
Features
- PeerTube Instance: Self-hosted video platform with ActivityPub federation
- Video Import: Import videos from YouTube, Vimeo, and 1000+ sites via yt-dlp
- Multi-Track Subtitles: Automatic subtitle download and sync in multiple languages
- Video Analysis: Transcript extraction and Claude AI analysis (peertube-analyse)
- Live Streaming: RTMP ingest with HLS output
Components
| Component | Description |
|---|---|
peertubectl |
Main control script for container management |
peertube-import |
Video import with subtitle sync |
peertube-analyse |
Transcript extraction and AI analysis |
Video Import
Import videos from external platforms with automatic subtitle synchronization.
CLI Usage
# Basic import
peertube-import https://youtube.com/watch?v=xxx
# Import with multiple subtitle languages
peertube-import --lang fr,en,de,es https://youtube.com/watch?v=xxx
# Import as unlisted video
peertube-import --privacy 2 https://youtube.com/watch?v=xxx
# Import to specific channel
peertube-import --channel 2 https://vimeo.com/xxx
Options
| Option | Description | Default |
|---|---|---|
--lang <codes> |
Subtitle languages (comma-separated) | fr,en |
--channel <id> |
PeerTube channel ID | 1 |
--privacy <level> |
1=public, 2=unlisted, 3=private | 1 |
--output <dir> |
Temp directory for downloads | /tmp/peertube-import |
--peertube <url> |
PeerTube instance URL | from UCI config |
Portal Integration
Access via SecuBox Portal → Intelligence & Analyse → Video Import
The portal provides:
- URL input for video source
- Language selection checkboxes
- Privacy level selector
- Real-time progress tracking
- Direct link to imported video
CGI Endpoints
# Start import job
curl -X POST http://192.168.255.1/cgi-bin/peertube-import \
-H "Content-Type: application/json" \
-d '{"url":"https://youtube.com/watch?v=xxx","languages":"fr,en"}'
# Response: {"success": true, "job_id": "import_xxx"}
# Check status
curl "http://192.168.255.1/cgi-bin/peertube-import-status?job_id=import_xxx"
# Response (in progress):
# {"status": "downloading", "progress": 45, "job_id": "import_xxx"}
# Response (completed):
# {"success": true, "video_url": "https://tube.example.com/w/uuid"}
Configuration
UCI config file: /etc/config/peertube
config peertube 'main'
option enabled '1'
option data_path '/srv/peertube'
config peertube 'server'
option hostname 'tube.example.com'
option port '9001'
option https '1'
config peertube 'admin'
option username 'root'
option password 'changeme'
config peertube 'transcoding'
option enabled '1'
option threads '2'
list resolutions '480p'
list resolutions '720p'
Dependencies
lxc,lxc-common- Container runtimewget-ssl- HTTPS downloadstar,jsonfilter- Archive and JSON handlingyt-dlp- Video download (pip install)node- JavaScript runtime for yt-dlp (opkg install)
Supported Import Sources
yt-dlp supports 1000+ sites including:
- YouTube, YouTube Music
- Vimeo
- Dailymotion
- Twitch (VODs)
- Twitter/X
- TikTok
- And many more...
See: https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md
Version
- Package: 1.2.0
- yt-dlp: 2026.2.4 (recommended)
- Node.js: 20.20.0 (for YouTube JS runtime)