feat(scripts): prompt for wbstream auth.token in srv/cnc (#116)

This commit is contained in:
Nori
2026-07-01 02:21:43 +03:00
committed by GitHub
parent 9168d8b786
commit 8362b861c0
2 changed files with 34 additions and 0 deletions
+17
View File
@@ -103,6 +103,14 @@ esac
echo "[*] Using auth: $AUTH"
echo ""
WB_TOKEN=""
if [ "$AUTH" = "wbstream" ]; then
echo "wbstream account token (auth.token), optional."
echo "Empty = anonymous guest. Required for datachannel (needs moderator rights, canPublishData=true)."
read -p "wbstream auth.token (Enter to skip): " WB_TOKEN
echo ""
fi
echo "Select transport:"
echo " 1) datachannel"
echo " 2) videochannel"
@@ -363,6 +371,15 @@ cat > "$CONFIG_FILE" <<EOF
mode: cnc
auth:
provider: "$AUTH"
EOF
if [ -n "$WB_TOKEN" ]; then
cat >> "$CONFIG_FILE" <<EOF
token: "$WB_TOKEN"
EOF
fi
cat >> "$CONFIG_FILE" <<EOF
room:
id: "$ROOM_ID"
crypto:
+17
View File
@@ -99,6 +99,14 @@ esac
echo "[*] Using carrier: $CARRIER"
echo ""
WB_TOKEN=""
if [ "$CARRIER" = "wbstream" ]; then
echo "wbstream account token (auth.token), optional."
echo "Empty = anonymous guest. Required for datachannel (needs moderator rights, canPublishData=true)."
read -p "wbstream auth.token (Enter to skip): " WB_TOKEN
echo ""
fi
echo "Select transport:"
echo " 1) datachannel"
echo " 2) videochannel"
@@ -396,6 +404,15 @@ cat > "$CONFIG_FILE" <<EOF
mode: srv
auth:
provider: "$CARRIER"
EOF
if [ -n "$WB_TOKEN" ]; then
cat >> "$CONFIG_FILE" <<EOF
token: "$WB_TOKEN"
EOF
fi
cat >> "$CONFIG_FILE" <<EOF
room:
id: "$ROOM_ID"
crypto: