Add ITVX module, transparent mitm_hosts, and DM Telegram announces.
All checks were successful
release / build-and-upload (push) Successful in 6m21s

Wire module mitm_hosts into StartTransparent for ITVX capture, ship the
itv provider stub with Live-list autoplay, refresh the README, and send
Forgejo release announces to private chat 7314901602.
This commit is contained in:
404errordeveloper 2026-10-09 17:35:53 +02:00
parent 3cb259c9b6
commit 2e43e6c3fa
23 changed files with 996 additions and 84 deletions

View file

@ -31,7 +31,7 @@ function Resolve-Go {
$GoExe = Resolve-Go
New-Item -ItemType Directory -Force -Path $Out | Out-Null
$Modules = @("bbc", "rte", "tg4")
$Modules = @("bbc", "rte", "tg4", "itv")
$Targets = @(
@{ GOOS = "windows"; GOARCH = "amd64"; Ext = ".exe" },
@{ GOOS = "windows"; GOARCH = "arm64"; Ext = ".exe" },
@ -111,4 +111,4 @@ foreach ($z in $builtZips) {
}
[System.IO.File]::WriteAllLines($sumsPath, $lines)
Write-Host "DONE modules release $Version → $Out"
Get-ChildItem $Out -Filter "*.zip" | Where-Object { $_.Name -match '^(bbc|rte|tg4)\.zip$' } | Format-Table Name, Length
Get-ChildItem $Out -Filter "*.zip" | Where-Object { $_.Name -match '^(bbc|rte|tg4|itv)\.zip$' } | Format-Table Name, Length

View file

@ -9,7 +9,7 @@ if [[ -z "$VERSION" ]]; then
fi
mkdir -p "$OUT"
MODULES=(bbc rte tg4)
MODULES=(bbc rte tg4 itv)
TARGETS=(
"windows amd64 .exe"
"windows arm64 .exe"
@ -65,4 +65,4 @@ for z in "${built[@]}"; do
( cd "$(dirname "$z")" && sha256sum "$(basename "$z")" ) >> "$sums"
done
echo "DONE modules release $VERSION → $OUT"
ls -la "$OUT"/bbc.zip "$OUT"/rte.zip "$OUT"/tg4.zip 2>/dev/null || true
ls -la "$OUT"/bbc.zip "$OUT"/rte.zip "$OUT"/tg4.zip "$OUT"/itv.zip 2>/dev/null || true

View file

@ -2,11 +2,15 @@
#
# Required env:
# TELEGRAM_BOT_TOKEN BotFather token (never commit)
# TELEGRAM_CHAT_ID e.g. -1003721978702
# TELEGRAM_CHAT_ID e.g. 7314901602 (private DM) or -100… (group)
#
# Optional:
# TELEGRAM_MESSAGE_THREAD_ID forum topic / "tab" id (groups only)
#
# Usage:
# $env:TELEGRAM_BOT_TOKEN="…"; $env:TELEGRAM_CHAT_ID="-1003721978702"
# $env:TELEGRAM_BOT_TOKEN="..."; $env:TELEGRAM_CHAT_ID="7314901602"
# .\scripts\notify-telegram.ps1 -Tag v0.1.2
# .\scripts\notify-telegram.ps1 -Tag v0.1.2 -ThreadId 16
# .\scripts\notify-telegram.ps1 -Tag modules-v0.1.2 -DryRun
param(
[string]$Tag = "",
@ -15,6 +19,7 @@ param(
[string]$Body = "",
[string]$ReleaseUrl = "",
[string]$RepoUrl = "https://git.nulldrm.com/nulldrm/Null-DRM-Official",
[string]$ThreadId = "",
[switch]$DryRun
)
@ -32,9 +37,14 @@ if (-not $Tag) { throw "usage: notify-telegram.ps1 -Tag v0.1.2" }
$Token = $env:TELEGRAM_BOT_TOKEN
$Chat = $env:TELEGRAM_CHAT_ID
if (-not $Token -or -not $Chat) {
if (-not $ThreadId) { $ThreadId = $env:TELEGRAM_MESSAGE_THREAD_ID }
if (-not $DryRun -and (-not $Token -or -not $Chat)) {
throw "TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID are required"
}
if ($DryRun -and (-not $Token -or -not $Chat)) {
Write-Host "[!] DryRun: TELEGRAM_BOT_TOKEN / TELEGRAM_CHAT_ID not set - showing payload only"
if (-not $Chat) { $Chat = "(unset)" }
}
if ($Kind -eq "auto") {
if ($Tag -like "modules-v*") { $Kind = "modules" } else { $Kind = "host" }
@ -47,40 +57,45 @@ if (-not $ReleaseUrl) {
if (-not $Title) {
if ($env:RELEASE_TITLE) { $Title = $env:RELEASE_TITLE }
elseif ($Kind -eq "modules") { $Title = "Null DRM $Tag" }
else { $Title = "Null DRM $Tag" }
}
function New-TelegramBody {
param([string]$Kind, [string]$Title, [string]$Tag, [string]$ReleaseUrl)
$code = { param($t) "<code>$t</code>" }
$nl = "`n"
if ($Kind -eq "modules") {
return (
"<b>$Title</b>" + $nl +
"Provider module zips: $( & $code 'bbc.zip' ), $( & $code 'rte.zip' ), $( & $code 'tg4.zip' ), $( & $code 'itv.zip' )" + $nl + $nl +
"Unpack each into $( & $code 'modules/<name>/' ) and edit $( & $code 'module.yaml' ) for secrets." + $nl + $nl +
"<a href=`"$ReleaseUrl`">Download $Tag</a>"
)
}
return (
"<b>$Title</b>" + $nl +
"Host CLI ($( & $code 'drm' )) + on-device MITM ($( & $code 'proxy-android-arm64' ))." + $nl + $nl +
"<a href=`"$ReleaseUrl`">Download $Tag</a>"
)
}
if (-not $Body) {
if ($env:RELEASE_BODY) {
$Body = $env:RELEASE_BODY
} elseif ($Kind -eq "modules") {
$Body = @"
<b>$Title</b>
Provider module zips: <code>bbc.zip</code>, <code>rte.zip</code>, <code>tg4.zip</code>
Unpack each into <code>modules/&lt;name&gt;/</code> and edit <code>module.yaml</code> for secrets.
<a href="$ReleaseUrl">Download $Tag</a>
"@
} else {
$Body = @"
<b>$Title</b>
Host CLI (<code>drm</code>) + on-device MITM (<code>proxy-android-arm64</code>).
<a href="$ReleaseUrl">Download $Tag</a>
"@
$Body = New-TelegramBody -Kind $Kind -Title $Title -Tag $Tag -ReleaseUrl $ReleaseUrl
}
}
if ($DryRun) {
Write-Host "DRY_RUN chat=$Chat tag=$Tag kind=$Kind"
Write-Host "DRY_RUN chat=$Chat thread=$ThreadId tag=$Tag kind=$Kind"
Write-Host "----"
Write-Host $Body
return
}
Write-Host "[*] Telegram notify → chat $Chat ($Tag)"
$threadNote = if ($ThreadId) { " topic/thread $ThreadId" } else { "" }
Write-Host "[*] Telegram notify -> chat $Chat$threadNote ($Tag)"
$uri = "https://api.telegram.org/bot$Token/sendMessage"
$form = @{
chat_id = $Chat
@ -88,6 +103,9 @@ $form = @{
parse_mode = "HTML"
disable_web_page_preview = "false"
}
if ($ThreadId) {
$form.message_thread_id = $ThreadId
}
$resp = Invoke-RestMethod -Method Post -Uri $uri -Body $form
if (-not $resp.ok) {
throw "Telegram API error: $($resp | ConvertTo-Json -Compress)"

View file

@ -3,7 +3,7 @@
#
# Required env:
# TELEGRAM_BOT_TOKEN BotFather token (Forgejo secret / local env — never commit)
# TELEGRAM_CHAT_ID Channel chat id, e.g. -1003721978702
# TELEGRAM_CHAT_ID e.g. 7314901602 (private DM) or -100… (group)
#
# Optional:
# RELEASE_TAG / first arg tag name
@ -12,11 +12,12 @@
# RELEASE_BODY full HTML body override
# RELEASE_KIND host | modules | auto
# RELEASE_REPO_URL default https://git.nulldrm.com/nulldrm/Null-DRM-Official
# TELEGRAM_MESSAGE_THREAD_ID forum topic / "tab" id (groups only)
# DRY_RUN=1 print, do not send
#
# Usage:
# TELEGRAM_BOT_TOKEN=… TELEGRAM_CHAT_ID=… ./scripts/notify-telegram.sh v0.1.2
# TELEGRAM_BOT_TOKEN=… TELEGRAM_CHAT_ID=… ./scripts/notify-telegram.sh modules-v0.1.2
# TELEGRAM_BOT_TOKEN=… TELEGRAM_CHAT_ID=7314901602 ./scripts/notify-telegram.sh v0.1.2
# TELEGRAM_BOT_TOKEN=… TELEGRAM_CHAT_ID=… TELEGRAM_MESSAGE_THREAD_ID=16 ./scripts/notify-telegram.sh v0.1.2
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
@ -31,6 +32,7 @@ fi
TOKEN="${TELEGRAM_BOT_TOKEN:-}"
CHAT="${TELEGRAM_CHAT_ID:-}"
THREAD="${TELEGRAM_MESSAGE_THREAD_ID:-}"
if [[ -z "$TOKEN" || -z "$CHAT" ]]; then
echo "TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID are required" >&2
exit 1
@ -57,7 +59,7 @@ if [[ -n "${RELEASE_BODY:-}" ]]; then
BODY="$RELEASE_BODY"
elif [[ "$KIND" == "modules" ]]; then
BODY="<b>${TITLE}</b>
Provider module zips: <code>bbc.zip</code>, <code>rte.zip</code>, <code>tg4.zip</code>
Provider module zips: <code>bbc.zip</code>, <code>rte.zip</code>, <code>tg4.zip</code>, <code>itv.zip</code>
Unpack each into <code>modules/&lt;name&gt;/</code> and edit <code>module.yaml</code> for secrets.
@ -70,18 +72,26 @@ Host CLI (<code>drm</code>) + on-device MITM (<code>proxy-android-arm64</code>).
fi
if [[ "${DRY_RUN:-}" == "1" ]]; then
echo "DRY_RUN chat=$CHAT tag=$TAG kind=$KIND"
echo "DRY_RUN chat=$CHAT thread=${THREAD:-} tag=$TAG kind=$KIND"
echo "----"
echo "$BODY"
exit 0
fi
echo "[*] Telegram notify → chat $CHAT ($TAG)"
THREAD_NOTE=""
CURL_THREAD=()
if [[ -n "$THREAD" ]]; then
THREAD_NOTE=" topic/thread ${THREAD}"
CURL_THREAD=(--data-urlencode "message_thread_id=${THREAD}")
fi
echo "[*] Telegram notify → chat $CHAT${THREAD_NOTE} ($TAG)"
RESP=$(curl -sS -X POST "https://api.telegram.org/bot${TOKEN}/sendMessage" \
--data-urlencode "chat_id=${CHAT}" \
--data-urlencode "text=${BODY}" \
--data-urlencode "parse_mode=HTML" \
--data-urlencode "disable_web_page_preview=false")
--data-urlencode "disable_web_page_preview=false" \
"${CURL_THREAD[@]}")
case "$RESP" in
*"\"ok\":true"*|*"\"ok\": true"*)