Streamd v0.2.0: rename, modules panel, stable/beta channels
All checks were successful
release / build-and-upload (push) Successful in 7m5s

- Rename product/host binary to streamd (drm compat copy still shipped)
- Go module path streamd; STREAMD_* env aliases; agent UA streamd-agent
- Panel Modules store + agent pull sync (modstore / modsync)
- Rolling stable + beta download tags; README/docs channel curl blocks
- Release notes in docs/releases/v0.2.0.md attached by Forgejo Actions
This commit is contained in:
404errordeveloper 2026-10-10 15:58:26 +02:00
parent 066e018749
commit da8e1123ec
140 changed files with 2949 additions and 851 deletions

View file

@ -80,7 +80,7 @@ foreach ($name in $Modules) {
$readme = @"
# $name ($Version)
Unpack this zip into your Null DRM ``modules/$name/`` directory (or point
Unpack this zip into your Streamd ``modules/$name/`` directory (or point
``drm --modules-dir`` at a parent that contains ``$name/``).
1. Edit ``module.yaml`` — fill in any sensitive fields marked in comments.

View file

@ -1,4 +1,5 @@
# Cross-compile host drm + on-device proxy-android-arm64 into dist/release/.
# Cross-compile host streamd (+ drm compat copy) and on-device proxy-android-arm64
# into dist/release/.
# Usage:
# .\scripts\build-release.ps1
# .\scripts\build-release.ps1 -Version v1.2.3
@ -38,11 +39,12 @@ Write-Host "==> using $GoExe"
& $GoExe version
New-Item -ItemType Directory -Force -Path $Out | Out-Null
Get-ChildItem $Out -ErrorAction SilentlyContinue | Where-Object { $_.Name -match '^(drm-|proxy-android-arm64|SHA256SUMS)' } | Remove-Item -Force
Get-ChildItem $Out -ErrorAction SilentlyContinue | Where-Object { $_.Name -match '^(streamd-|drm-|proxy-android-arm64|SHA256SUMS)' } | Remove-Item -Force
function Build-Host([string]$Goos, [string]$Goarch, [string]$Ext = "") {
$name = "drm-$Goos-$Goarch$Ext"
Write-Host " - $name"
$name = "streamd-$Goos-$Goarch$Ext"
$compat = "drm-$Goos-$Goarch$Ext"
Write-Host " - $name (+ $compat)"
$env:GOOS = $Goos
$env:GOARCH = $Goarch
$env:CGO_ENABLED = "0"
@ -50,6 +52,7 @@ function Build-Host([string]$Goos, [string]$Goarch, [string]$Ext = "") {
try {
& $GoExe -C apps/cli build -trimpath -ldflags="-s -w" -o (Join-Path $Out $name) .
if ($LASTEXITCODE -ne 0) { throw "go build failed for $name" }
Copy-Item (Join-Path $Out $name) (Join-Path $Out $compat) -Force
} finally {
Pop-Location
Remove-Item Env:GOOS -ErrorAction SilentlyContinue
@ -58,7 +61,7 @@ function Build-Host([string]$Goos, [string]$Goarch, [string]$Ext = "") {
}
}
Write-Host "==> building on-device MITM (linux/arm64) first (embedded into drm.exe)"
Write-Host "==> building on-device MITM (linux/arm64) first (embedded into streamd.exe)"
$env:GOOS = "linux"
$env:GOARCH = "arm64"
$env:CGO_ENABLED = "0"
@ -73,13 +76,13 @@ try {
Remove-Item Env:CGO_ENABLED -ErrorAction SilentlyContinue
}
# Stage into bootstrap embed so a lone drm.exe can extract bin/proxy-android-arm64.
# Stage into bootstrap embed so a lone streamd.exe can extract bin/proxy-android-arm64.
$embedProxy = Join-Path $Root "apps\pkg\bootstrap\embedded\bin\proxy-android-arm64"
New-Item -ItemType Directory -Force -Path (Split-Path $embedProxy) | Out-Null
Copy-Item (Join-Path $Out "proxy-android-arm64") $embedProxy -Force
Write-Host " staged embed: $embedProxy"
Write-Host "==> building host drm ($Version) into $Out"
Write-Host "==> building host streamd ($Version) into $Out"
Build-Host windows amd64 ".exe"
Build-Host windows arm64 ".exe"
Build-Host linux amd64
@ -91,9 +94,10 @@ New-Item -ItemType Directory -Force -Path (Join-Path $Root "bin"), (Join-Path $R
Copy-Item (Join-Path $Out "proxy-android-arm64") (Join-Path $Root "bin\proxy-android-arm64") -Force
Copy-Item (Join-Path $Out "proxy-android-arm64") (Join-Path $Root "apps\proxy\proxy-android-arm64") -Force
try {
Copy-Item (Join-Path $Out "drm-windows-amd64.exe") (Join-Path $Root "bin\drm.exe") -Force
Copy-Item (Join-Path $Out "streamd-windows-amd64.exe") (Join-Path $Root "bin\streamd.exe") -Force
Copy-Item (Join-Path $Out "streamd-windows-amd64.exe") (Join-Path $Root "bin\drm.exe") -Force
} catch {
Write-Host "WARN: could not refresh bin\drm.exe (file in use): $($_.Exception.Message)"
Write-Host "WARN: could not refresh bin\streamd.exe / bin\drm.exe (file in use): $($_.Exception.Message)"
}
# Restore tiny embed stub so the 9MB MITM binary is not left in the source tree.
$stub = Join-Path $Root "apps\pkg\bootstrap\embedded\bin\proxy-android-arm64"
@ -103,7 +107,7 @@ Write-Host "==> checksums"
$sumsPath = Join-Path $Out "SHA256SUMS.txt"
$tmpSums = Join-Path $Out "SHA256SUMS.txt.tmp"
$lines = Get-ChildItem $Out -File |
Where-Object { $_.Name -match '^(drm-|proxy-android)' } |
Where-Object { $_.Name -match '^(streamd-|drm-|proxy-android)' } |
Get-FileHash -Algorithm SHA256 |
ForEach-Object { "{0} {1}" -f $_.Hash.ToLower(), (Split-Path $_.Path -Leaf) }
[System.IO.File]::WriteAllLines($tmpSums, @($lines))
@ -118,33 +122,30 @@ New-Item -ItemType Directory -Force -Path @(
(Join-Path $win "apps\proxy\device"),
(Join-Path $win "outputs")
) | Out-Null
Copy-Item (Join-Path $Out "drm-windows-amd64.exe") (Join-Path $win "bin\drm.exe") -Force
Copy-Item (Join-Path $Out "streamd-windows-amd64.exe") (Join-Path $win "bin\streamd.exe") -Force
Copy-Item (Join-Path $Out "streamd-windows-amd64.exe") (Join-Path $win "bin\drm.exe") -Force
Copy-Item (Join-Path $Out "proxy-android-arm64") (Join-Path $win "bin\proxy-android-arm64") -Force
# Also beside bin\ for users who cd into bin
Copy-Item (Join-Path $Out "drm-windows-amd64.exe") (Join-Path $win "drm.exe") -Force
Copy-Item (Join-Path $Out "streamd-windows-amd64.exe") (Join-Path $win "streamd.exe") -Force
Copy-Item (Join-Path $Out "streamd-windows-amd64.exe") (Join-Path $win "drm.exe") -Force
Copy-Item (Join-Path $Out "proxy-android-arm64") (Join-Path $win "proxy-android-arm64") -Force
Copy-Item (Join-Path $Root "apps\proxy\device\tproxy_iptables.sh") (Join-Path $win "apps\proxy\device\") -Force
Copy-Item (Join-Path $Root "apps\pkg\go.mod") (Join-Path $win "apps\pkg\") -Force
Copy-Item (Join-Path $Root "README.md") (Join-Path $win "README.md") -Force -ErrorAction SilentlyContinue
# Module YAMLs are NOT shipped in the exe and not required in this zip —
# operators add apps/modules/<name>/module.yaml from the GitHub tree.
@"
Null DRM — Windows portable
Streamd — Windows portable
Scaffold (drm.exe also creates this on first run if you only download the exe):
bin\drm.exe
Scaffold (streamd.exe also creates this on first run if you only download the exe):
bin\streamd.exe
bin\drm.exe (identical compatibility copy)
bin\proxy-android-arm64
apps\proxy\device\tproxy_iptables.sh
Modules are NOT inside the exe. Add your own:
apps\modules\bbc\module.yaml
(copy from the GitHub repo apps/modules/bbc/module.yaml)
Upload provider modules in the streamd Modules page, or add modules/<name>/ locally.
You do NOT need ``drm proxy build``.
bin\drm.exe proxy install-ca --reinject
bin\streamd.exe serve --bind 127.0.0.1:8083
bin\streamd.exe proxy install-ca --reinject
adb shell am force-stop bbc.iplayer.android
bin\drm.exe capture --app bbc --channel bbcone --wait 120
bin\streamd.exe capture --app bbc --channel bbcone --wait 120
NordVPN UK on the phone. First install-ca creates data\proxy-ca.* (private CA).
"@ | Set-Content -Encoding utf8 (Join-Path $win "README.txt")

View file

@ -1,5 +1,6 @@
#!/usr/bin/env bash
# Cross-compile host `drm` + on-device `proxy-android-arm64` into dist/release/.
# Cross-compile host `streamd` (+ `drm` compat copy) and on-device
# `proxy-android-arm64` into dist/release/.
# Usage:
# ./scripts/build-release.sh # VERSION=git describe
# ./scripts/build-release.sh v1.2.3
@ -41,18 +42,20 @@ echo "==> using $GO"
"$GO" version
mkdir -p "$OUT"
rm -f "$OUT"/drm-* "$OUT"/proxy-android-arm64 "$OUT"/SHA256SUMS.txt 2>/dev/null || true
rm -f "$OUT"/streamd-* "$OUT"/drm-* "$OUT"/proxy-android-arm64 "$OUT"/SHA256SUMS.txt 2>/dev/null || true
echo "==> building host drm ($VERSION) into $OUT"
echo "==> building host streamd ($VERSION) into $OUT"
build_host() {
local goos="$1" goarch="$2" ext="${3:-}"
local name="drm-${goos}-${goarch}${ext}"
echo " - $name"
local name="streamd-${goos}-${goarch}${ext}"
local compat="drm-${goos}-${goarch}${ext}"
echo " - $name (+ $compat)"
(
cd "$ROOT"
GOOS="$goos" GOARCH="$goarch" CGO_ENABLED=0 \
"$GO" -C apps/cli build -trimpath -ldflags="-s -w" -o "$OUT/$name" .
)
cp -f "$OUT/$name" "$OUT/$compat"
}
build_host windows amd64 .exe
@ -77,15 +80,27 @@ case "$(uname -s)" in
Linux)
arch="$(uname -m)"
case "$arch" in
x86_64) cp -f "$OUT/drm-linux-amd64" "$ROOT/bin/drm" ;;
aarch64) cp -f "$OUT/drm-linux-arm64" "$ROOT/bin/drm" ;;
x86_64)
cp -f "$OUT/streamd-linux-amd64" "$ROOT/bin/streamd"
cp -f "$OUT/streamd-linux-amd64" "$ROOT/bin/drm"
;;
aarch64)
cp -f "$OUT/streamd-linux-arm64" "$ROOT/bin/streamd"
cp -f "$OUT/streamd-linux-arm64" "$ROOT/bin/drm"
;;
esac
;;
Darwin)
arch="$(uname -m)"
case "$arch" in
x86_64) cp -f "$OUT/drm-darwin-amd64" "$ROOT/bin/drm" ;;
arm64) cp -f "$OUT/drm-darwin-arm64" "$ROOT/bin/drm" ;;
x86_64)
cp -f "$OUT/streamd-darwin-amd64" "$ROOT/bin/streamd"
cp -f "$OUT/streamd-darwin-amd64" "$ROOT/bin/drm"
;;
arm64)
cp -f "$OUT/streamd-darwin-arm64" "$ROOT/bin/streamd"
cp -f "$OUT/streamd-darwin-arm64" "$ROOT/bin/drm"
;;
esac
;;
esac
@ -93,9 +108,9 @@ esac
(
cd "$OUT"
if command -v sha256sum >/dev/null 2>&1; then
sha256sum drm-* proxy-android-arm64 > SHA256SUMS.txt
sha256sum streamd-* drm-* proxy-android-arm64 > SHA256SUMS.txt
else
shasum -a 256 drm-* proxy-android-arm64 > SHA256SUMS.txt
shasum -a 256 streamd-* drm-* proxy-android-arm64 > SHA256SUMS.txt
fi
)

View file

@ -55,26 +55,38 @@ if (-not $ReleaseUrl) {
else { $ReleaseUrl = "$RepoUrl/releases/tag/$Tag" }
}
$Channel = $env:RELEASE_CHANNEL
if (-not $Channel) {
if ($Tag -match '^v\d+\.\d+\.\d+$') { $Channel = "stable" }
elseif ($Tag -match '^v\d+\.\d+\.\d+-') { $Channel = "beta" }
}
if (-not $Title) {
if ($env:RELEASE_TITLE) { $Title = $env:RELEASE_TITLE }
else { $Title = "Null DRM $Tag" }
elseif ($Channel -eq "beta") { $Title = "Streamd $Tag (beta)" }
else { $Title = "Streamd $Tag" }
}
function New-TelegramBody {
param([string]$Kind, [string]$Title, [string]$Tag, [string]$ReleaseUrl)
param([string]$Kind, [string]$Title, [string]$Tag, [string]$ReleaseUrl, [string]$RepoUrl, [string]$Channel)
$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' ), $( & $code 'c4.zip' ), $( & $code 'my5.zip' )" + $nl + $nl +
"Unpack each into $( & $code 'modules/<name>/' ) and edit $( & $code 'module.yaml' ) for secrets." + $nl + $nl +
"Upload in the streamd Modules page, or unpack into $( & $code 'modules/<name>/' ) and edit $( & $code 'module.yaml' )." + $nl + $nl +
"<a href=`"$ReleaseUrl`">Download $Tag</a>"
)
}
$channelLine = ""
if ($Channel) {
$channelLine = $nl + "Rolling channel: <a href=`"$RepoUrl/releases/tag/$Channel`">$Channel</a> -> $( & $code "$RepoUrl/releases/download/$Channel/streamd-..." )"
}
return (
"<b>$Title</b>" + $nl +
"Host CLI ($( & $code 'drm' )) + on-device MITM ($( & $code 'proxy-android-arm64' ))." + $nl + $nl +
"Host CLI ($( & $code 'streamd' ); $( & $code 'drm' ) compat copy) + on-device MITM ($( & $code 'proxy-android-arm64' ))." +
$channelLine + $nl + $nl +
"<a href=`"$ReleaseUrl`">Download $Tag</a>"
)
}
@ -83,7 +95,7 @@ if (-not $Body) {
if ($env:RELEASE_BODY) {
$Body = $env:RELEASE_BODY
} else {
$Body = New-TelegramBody -Kind $Kind -Title $Title -Tag $Tag -ReleaseUrl $ReleaseUrl
$Body = New-TelegramBody -Kind $Kind -Title $Title -Tag $Tag -ReleaseUrl $ReleaseUrl -RepoUrl $RepoUrl -Channel $Channel
}
}

View file

@ -49,10 +49,28 @@ fi
REPO_URL="${RELEASE_REPO_URL:-https://git.nulldrm.com/nulldrm/Null-DRM-Official}"
URL="${RELEASE_URL:-${REPO_URL}/releases/tag/${TAG}}"
CHANNEL="${RELEASE_CHANNEL:-}"
if [[ -z "$CHANNEL" ]]; then
case "$TAG" in
v[0-9]*.[0-9]*.[0-9]) CHANNEL="stable" ;;
v[0-9]*.[0-9]*.[0-9]-*) CHANNEL="beta" ;;
esac
fi
if [[ -n "${RELEASE_TITLE:-}" ]]; then
TITLE="$RELEASE_TITLE"
elif [[ "$CHANNEL" == "beta" ]]; then
TITLE="Streamd ${TAG} (beta)"
else
TITLE="Null DRM ${TAG}"
TITLE="Streamd ${TAG}"
fi
CHANNEL_URL=""
CHANNEL_LINE=""
if [[ -n "$CHANNEL" && "$KIND" == "host" ]]; then
CHANNEL_URL="${REPO_URL}/releases/download/${CHANNEL}"
CHANNEL_LINE="
Rolling channel: <a href=\"${REPO_URL}/releases/tag/${CHANNEL}\">${CHANNEL}</a> -> <code>${CHANNEL_URL}/streamd-...</code>"
fi
if [[ -n "${RELEASE_BODY:-}" ]]; then
@ -61,16 +79,16 @@ elif [[ "$KIND" == "modules" ]]; then
BODY="<b>${TITLE}</b>
Provider module zips: <code>bbc.zip</code>, <code>rte.zip</code>, <code>tg4.zip</code>, <code>itv.zip</code>, <code>c4.zip</code>, <code>my5.zip</code>
Unpack each into <code>modules/&lt;name&gt;/</code> and edit <code>module.yaml</code> for secrets.
Upload in the streamd Modules page, or unpack into <code>modules/&lt;name&gt;/</code> and edit <code>module.yaml</code>.
<a href=\"${URL}\">Download ${TAG}</a>"
else
BODY="<b>${TITLE}</b>
Host CLI (<code>drm</code>) + on-device MITM (<code>proxy-android-arm64</code>).
Host CLI (<code>streamd</code>; <code>drm</code> compat copy) + on-device MITM (<code>proxy-android-arm64</code>).
${CHANNEL_LINE}
<a href=\"${URL}\">Download ${TAG}</a>"
fi
if [[ "${DRY_RUN:-}" == "1" ]]; then
echo "DRY_RUN chat=$CHAT thread=${THREAD:-} tag=$TAG kind=$KIND"
echo "----"