From daacdb731cbade12815356189ee893ecb2f6e2e7 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sun, 22 Feb 2026 15:13:02 +0100 Subject: [PATCH] feat(talk-hpb): Add Nextcloud Talk High Performance Backend package New package secubox-app-talk-hpb: - Docker-based signaling server and Janus WebRTC gateway - Auto-generates TURN/SIGNALING/INTERNAL secrets - Creates HAProxy vhost with SSL/ACME - STUN/TURN server with UDP+TCP support - CLI tool: talk-hpbctl setup/status/test/logs Hub generator v5: - Add PeerTube videos with thumbnails and duration badges - Fix Streamlit instance detection (=instance vs =app) - Total count now: sites + streamlit + videos MetaBlogizer fix: - Add priority=50 to new vhosts to prevent wildcard catch Co-Authored-By: Claude Opus 4.5 --- .../root/usr/libexec/rpcd/luci.metablogizer | 3 + .../files/usr/sbin/hub-generator | 209 +++++++++--- package/secubox/secubox-app-talk-hpb/Makefile | 47 +++ .../files/etc/config/talk-hpb | 20 ++ .../files/etc/init.d/talk-hpb | 100 ++++++ .../files/usr/sbin/talk-hpbctl | 308 ++++++++++++++++++ 6 files changed, 648 insertions(+), 39 deletions(-) create mode 100644 package/secubox/secubox-app-talk-hpb/Makefile create mode 100644 package/secubox/secubox-app-talk-hpb/files/etc/config/talk-hpb create mode 100644 package/secubox/secubox-app-talk-hpb/files/etc/init.d/talk-hpb create mode 100644 package/secubox/secubox-app-talk-hpb/files/usr/sbin/talk-hpbctl diff --git a/package/secubox/luci-app-metablogizer/root/usr/libexec/rpcd/luci.metablogizer b/package/secubox/luci-app-metablogizer/root/usr/libexec/rpcd/luci.metablogizer index 1d677c78..3f5c7532 100755 --- a/package/secubox/luci-app-metablogizer/root/usr/libexec/rpcd/luci.metablogizer +++ b/package/secubox/luci-app-metablogizer/root/usr/libexec/rpcd/luci.metablogizer @@ -435,6 +435,7 @@ EOF uci set "haproxy.$vhost_name.ssl_redirect=$ssl" uci set "haproxy.$vhost_name.acme=$acme_val" uci set "haproxy.$vhost_name.enabled=1" + uci set "haproxy.$vhost_name.priority=50" uci commit haproxy # Add mitmproxy route for WAF inspection @@ -1117,6 +1118,7 @@ EOF uci set "haproxy.$vhost_name.ssl_redirect=1" uci set "haproxy.$vhost_name.acme=1" uci set "haproxy.$vhost_name.enabled=1" + uci set "haproxy.$vhost_name.priority=50" uci commit haproxy @@ -1914,6 +1916,7 @@ EOF uci set "haproxy.$vhost_name.ssl_redirect=1" uci set "haproxy.$vhost_name.acme=1" uci set "haproxy.$vhost_name.enabled=1" + uci set "haproxy.$vhost_name.priority=50" uci commit haproxy diff --git a/package/secubox/secubox-app-gk2hub/files/usr/sbin/hub-generator b/package/secubox/secubox-app-gk2hub/files/usr/sbin/hub-generator index 5df4de93..5ffe1a03 100755 --- a/package/secubox/secubox-app-gk2hub/files/usr/sbin/hub-generator +++ b/package/secubox/secubox-app-gk2hub/files/usr/sbin/hub-generator @@ -1,28 +1,27 @@ #!/bin/sh -# SecuBox Hub Generator v3 - Dynamic portal with categories and thumbnails +# SecuBox Hub Generator v5 - MetaBlogizer + Streamlit + PeerTube videos OUTPUT="/www/gk2-hub/index.html" TEMP="/tmp/hub_gen_$$.html" -CACHE_DIR="/tmp/hub-cache" DATE=$(date "+%Y-%m-%d %H:%M") +PEERTUBE_API="http://192.168.255.1:9001/api/v1" +PEERTUBE_URL="https://tube.gk2.secubox.in" -mkdir -p "$CACHE_DIR" - -# Categorize site based on name categorize_site() { local name=$(echo "$1" | tr '[:upper:]' '[:lower:]') case "$name" in *intel*|*dgse*|*osint*|*threat*|*secu*|*raid*|*confid*|*mku*|*bdgse*|*camus*) echo "Intelligence" ;; *game*|*play*|*comic*|*virus*|*survie*) echo "Divertissement" ;; - *dev*|*code*|*git*|*sdlc*|*crt*|*fabric*) echo "Développement" ;; + *dev*|*code*|*git*|*sdlc*|*crt*|*fabric*|*hermes*) echo "Développement" ;; *doc*|*manual*|*guide*|*how*|*fm*|*bgp*|*lrh*|*bcf*) echo "Documentation" ;; *media*|*video*|*tube*|*stream*|*radio*|*lyrion*|*jellyfin*) echo "Média" ;; *blog*|*news*|*press*|*zine*|*flash*|*pub*) echo "Actualités" ;; - *cloud*|*file*|*nextcloud*) echo "Cloud" ;; - *admin*|*control*|*status*|*hub*|*glances*|*holo*) echo "Administration" ;; + *cloud*|*file*|*nextcloud*|*photo*) echo "Cloud" ;; + *admin*|*control*|*status*|*hub*|*glances*|*holo*|*console*|*evolution*) echo "Administration" ;; *money*|*coin*|*crypto*|*cgv*|*cpi*|*apr*) echo "Finance" ;; *geo*|*map*|*gondwana*|*earth*) echo "Géographie" ;; - *psy*|*oracle*|*yijing*|*bazi*|*equa*|*lunaquar*|*clock*) echo "Ésotérique" ;; + *psy*|*oracle*|*yijing*|*bazi*|*equa*|*lunaquar*|*clock*|*wuyun*|*yling*|*pix*|*tam*) echo "Ésotérique" ;; + *metabol*|*osint*|*generix*|*swg*|*ftvm*|*cpf*) echo "Outils" ;; *) echo "Projets" ;; esac } @@ -40,11 +39,27 @@ get_emoji() { "Finance") echo "💰" ;; "Géographie") echo "🌍" ;; "Ésotérique") echo "🔮" ;; + "Outils") echo "🛠️" ;; + "Streamlit") echo "📊" ;; + "PeerTube") echo "🎥" ;; *) echo "📄" ;; esac } -# Start HTML +format_duration() { + local sec=$1 + local min=$((sec / 60)) + local s=$((sec % 60)) + if [ $min -ge 60 ]; then + local h=$((min / 60)) + min=$((min % 60)) + printf "%d:%02d:%02d" $h $min $s + else + printf "%d:%02d" $min $s + fi +} + +# HTML Header cat > "$TEMP" << 'HTMLHEAD' @@ -54,7 +69,7 @@ cat > "$TEMP" << 'HTMLHEAD' GK² Hub — Portal SecuBox