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 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-02-15 17:01:54 +01:00
parent 491120609b
commit 59d0e89a8c
3 changed files with 84 additions and 16 deletions

View File

@ -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

View File

@ -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

View File

@ -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'
<div class="card-title">Glances</div>
<div class="card-desc">Monitoring</div>
</a>
<a href="https://secubox.in/gk2/jellyfin" class="card">
<a href="https://media.gk2.secubox.in" class="card">
<div class="card-icon">🎬</div>
<div class="card-title">Jellyfin</div>
<div class="card-desc">Media Server</div>
</a>
<a href="https://secubox.in/gk2/localai" class="card">
<a href="https://localai.gk2.secubox.in" class="card">
<div class="card-icon">🤖</div>
<div class="card-title">LocalAI</div>
<div class="card-desc">AI Gateway</div>
</a>
<a href="https://secubox.in/gk2/webmail" class="card">
<a href="https://webmail.gk2.secubox.in" class="card">
<div class="card-icon">📧</div>
<div class="card-title">Webmail</div>
<div class="card-desc">Roundcube</div>
</a>
<a href="https://secubox.in/gk2/feed" class="card">
<a href="https://feed.gk2.secubox.in" class="card">
<div class="card-icon">📦</div>
<div class="card-title">Package Feed</div>
<div class="card-desc">IPK Repository</div>
</a>
<a href="https://tube.gk2.secubox.in" class="card">
<div class="card-icon">📺</div>
<div class="card-title">PeerTube</div>
<div class="card-desc">Video Streaming</div>
</a>
<a href="https://social.gk2.secubox.in" class="card">
<div class="card-icon">🐘</div>
<div class="card-title">GoToSocial</div>
<div class="card-desc">Fediverse</div>
</a>
<a href="https://wazuh.gk2.secubox.in" class="card">
<div class="card-icon">🔒</div>
<div class="card-title">Wazuh</div>
<div class="card-desc">SIEM Dashboard</div>
</a>
INFRA
echo ' </div>' >> "$OUTPUT"