From 59d0e89a8c18efb2b33b0c8aafb64644e823b299 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sun, 15 Feb 2026 17:01:54 +0100 Subject: [PATCH] feat(gk2hub): Use subdomain URLs instead of redirect paths - Infrastructure: media, localai, webmail, feed, tube, social, wazuh - MetaBlogizer: HAProxy vhost lookup for automatic subdomain detection - Added icons for new service types (tube, social, wazuh, etc.) - 67 services now display with proper subdomain URLs Co-Authored-By: Claude Opus 4.5 --- .claude/HISTORY.md | 21 +++++++ .claude/WIP.md | 16 ++++- .../files/usr/bin/gk2hub-generate | 63 ++++++++++++++----- 3 files changed, 84 insertions(+), 16 deletions(-) diff --git a/.claude/HISTORY.md b/.claude/HISTORY.md index 6fe9a174..699d3788 100644 --- a/.claude/HISTORY.md +++ b/.claude/HISTORY.md @@ -1840,3 +1840,24 @@ git checkout HEAD -- index.html - **Fixed** container running check to detect mitmproxy-in and mitmproxy-out - **Result**: Dashboard now shows 997 threats today, 29 pending autobans - **Committed**: 42d85c4d + +### 2026-02-15: PeerTube Transcoding Jobs Fix +- **Root cause**: Videos stuck with `waitTranscoding=true` not showing in public listing +- **Investigation**: Found `runnerJob` table with 6 jobs stuck in state=1 (pending) +- **Problem**: Admin enabled "remote runners" for transcoding but no runners registered +- **Fix**: Set `waitTranscoding=false` directly in PostgreSQL database + ```sql + UPDATE video SET "waitTranscoding" = false WHERE "waitTranscoding" = true; + ``` +- **Result**: 2 videos now visible in public listing +- **Future fix**: Disable remote runners in admin panel, use local ffmpeg transcoding + +### 2026-02-15: GK2 Hub Landing Page Subdomain URLs +- **Updated** `gk2hub-generate` script to use direct subdomain URLs +- **Previous**: Used redirect paths like `https://secubox.in/gk2/jellyfin` +- **New**: Uses subdomain URLs like `https://media.gk2.secubox.in` +- **Changes**: + - Infrastructure section: media, localai, webmail, feed, tube, social, wazuh + - MetaBlogizer: HAProxy vhost lookup for automatic subdomain detection + - Added more icons for new service types +- **Result**: 67 services with proper subdomain URLs diff --git a/.claude/WIP.md b/.claude/WIP.md index 808682f2..22be004b 100644 --- a/.claude/WIP.md +++ b/.claude/WIP.md @@ -1,6 +1,6 @@ # Work In Progress (Claude) -_Last updated: 2026-02-15 (Mitmproxy WAF dashboard data path fix)_ +_Last updated: 2026-02-15 (PeerTube transcoding fix, GK2 Hub subdomain URLs)_ > **Architecture Reference**: SecuBox Fanzine v3 — Les 4 Couches @@ -102,6 +102,20 @@ _Last updated: 2026-02-15 (Mitmproxy WAF dashboard data path fix)_ - Updated: get_status, get_alerts, get_threat_stats, get_subdomain_metrics - Committed: 42d85c4d +- **PeerTube Transcoding Jobs Fix** — DONE (2026-02-15) + - Videos were stuck with `waitTranscoding=true` and not showing in public listing + - Root cause: Admin enabled "remote runners" for transcoding but no runners registered + - `runnerJob` table had 6 jobs stuck in pending state (state=1) + - Fix: Set `waitTranscoding=false` directly in database to make videos visible + - Alternative fix (for future uploads): Disable remote runners in admin panel, use local ffmpeg + +- **GK2 Hub Landing Page Subdomain URLs** — DONE (2026-02-15) + - Previous version used redirect paths (`secubox.in/gk2/service`) + - Updated `gk2hub-generate` to use direct subdomain URLs (`service.gk2.secubox.in`) + - Added HAProxy vhost lookup for automatic subdomain detection + - Added PeerTube, GoToSocial, Wazuh to Infrastructure section + - 67 services now display with proper subdomain URLs + - **PeerTube Video Platform Package** — DONE (2026-02-15) - Created `secubox-app-peertube` package for self-hosted video streaming - LXC Debian Bookworm container with PostgreSQL 15, Redis 7, Node.js 18, FFmpeg diff --git a/package/secubox/secubox-app-gk2hub/files/usr/bin/gk2hub-generate b/package/secubox/secubox-app-gk2hub/files/usr/bin/gk2hub-generate index f36dee9c..0245ba4b 100644 --- a/package/secubox/secubox-app-gk2hub/files/usr/bin/gk2hub-generate +++ b/package/secubox/secubox-app-gk2hub/files/usr/bin/gk2hub-generate @@ -34,6 +34,19 @@ get_icon() { cineposter*|cpf) echo "🎬" ;; wuyun) echo "🌬️" ;; hello) echo "👋" ;; + tube|peertube) echo "📺" ;; + social|gotosocial) echo "🐘" ;; + wazuh) echo "🔒" ;; + webmail|mail) echo "📧" ;; + media|jellyfin) echo "🎬" ;; + pdf|papyrus) echo "📄" ;; + geo|gondwana) echo "🌍" ;; + clock) echo "🕐" ;; + money) echo "💰" ;; + osint) echo "🔍" ;; + flash) echo "⚡" ;; + client) echo "👤" ;; + mvox) echo "🎤" ;; *) echo "🚀" ;; esac } @@ -140,18 +153,23 @@ for site in $(ls -1 /srv/metablogizer/sites/ 2>/dev/null | sort); do section="site_$(echo "$site" | tr '-' '_')" domain=$(uci -q get metablogizer.$section.domain) - # Default URL mapping if no domain configured + # Default URL mapping - try gk2.secubox.in subdomain, fallback to maegia.tv if [ -z "$domain" ]; then - case "$site" in - lldh) url="https://lldh.gk2.secubox.in" ;; - want) url="https://wanted.gk2.secubox.in" ;; - gandalf) url="https://gandalf.maegia.tv" ;; - cyberzine) url="https://cyberzine.maegia.tv" ;; - devel) url="https://devel.maegia.tv" ;; - c3box) url="https://c3box.maegia.tv" ;; - gk2) url="https://gk2.maegia.tv" ;; - *) url="https://secubox.in/gk2/$site" ;; - esac + # Check if HAProxy vhost exists for gk2.secubox.in + vhost_domain=$(uci show haproxy 2>/dev/null | grep -E "\.domain='${site}\.gk2\.secubox\.in'" | head -1 | sed "s/.*domain='\([^']*\)'/\1/") + if [ -n "$vhost_domain" ]; then + url="https://$vhost_domain" + else + # Fallback to maegia.tv for some known sites + case "$site" in + gandalf) url="https://gandalf.maegia.tv" ;; + cyberzine) url="https://cyberzine.maegia.tv" ;; + devel) url="https://devel.maegia.tv" ;; + c3box) url="https://c3box.maegia.tv" ;; + gk2) url="https://gk2.maegia.tv" ;; + *) url="https://${site}.gk2.secubox.in" ;; + esac + fi else url="https://$domain" fi @@ -183,26 +201,41 @@ cat >> "$OUTPUT" << 'INFRA'
Glances
Monitoring
- +
🎬
Jellyfin
Media Server
- +
🤖
LocalAI
AI Gateway
- +
📧
Webmail
Roundcube
- +
📦
Package Feed
IPK Repository
+ +
📺
+
PeerTube
+
Video Streaming
+
+ +
🐘
+
GoToSocial
+
Fediverse
+
+ +
🔒
+
Wazuh
+
SIEM Dashboard
+
INFRA echo ' ' >> "$OUTPUT"