v0.1.1: external modules, publish YAML, proxy reset, binary-first README
- Host discovers/builds modules under modules/ (bbc, rte, tg4) - module-publish.yaml tracked; local module.yaml gitignored - drm --modules-dir / DRM_MODULES_DIR - drm proxy reset; Magisk reinject reliability - modules-v* Forgejo release workflow + build scripts - BBC full Explore channel map including S4C - README quickstart based on release binaries
This commit is contained in:
parent
1d36961a7c
commit
f9c28be3f1
52 changed files with 2915 additions and 636 deletions
249
README.md
249
README.md
|
|
@ -1,154 +1,135 @@
|
|||
# DRM-Decryption
|
||||
# Null DRM
|
||||
|
||||
Capture Widevine live sessions from Android streaming apps and restream them.
|
||||
Capture live sessions from Android streaming apps (BBC iPlayer, RTÉ, TG4, …) and
|
||||
restream them. The host is a single binary — **`drm`** — plus drop-in providers
|
||||
under **`modules/`**.
|
||||
|
||||
Everything is one Go binary — `drm` — with every app module compiled in. Each
|
||||
streaming app (RTE, TG4, …) is a Go package under `apps/modules/`; its secrets and
|
||||
IDs live in a local, gitignored values file that you fill in yourself.
|
||||
|
||||
- **[docs/](docs/)** — architecture, module authoring, per-provider setup
|
||||
- **[docs/quickstart.md](docs/quickstart.md)** — the longer version of what follows
|
||||
Releases: [git.nulldrm.com](https://git.nulldrm.com/nulldrm/Null-DRM-Official/releases)
|
||||
Docs: [docs/](docs/)
|
||||
|
||||
---
|
||||
|
||||
## Quick start
|
||||
## Quick start (binaries)
|
||||
|
||||
### 1. Prerequisites
|
||||
### 1. Download
|
||||
|
||||
From the latest **`v*`** release, grab your host binary (e.g. `drm-windows-amd64.exe`)
|
||||
and `proxy-android-arm64`. From a **`modules-v*`** release, grab the module zips you need
|
||||
(`module-bbc-….zip`, `module-rte-….zip`, `module-tg4-….zip`).
|
||||
|
||||
```text
|
||||
Null-DRM/
|
||||
drm.exe # or drm on Linux/macOS
|
||||
bin/proxy-android-arm64 # optional; also embedded in release drm
|
||||
modules/
|
||||
bbc/ # unzip module-bbc-*.zip here
|
||||
rte/
|
||||
tg4/
|
||||
data/ # your .wvd, optional
|
||||
outputs/ # created on first run
|
||||
```
|
||||
|
||||
On first run, `drm` creates the install scaffold next to the exe.
|
||||
|
||||
### 2. Prerequisites
|
||||
|
||||
| Need | Why |
|
||||
|---|---|
|
||||
| **Go 1.25+** | builds everything |
|
||||
| **Python 3.10+** | `apps/wvkey/wvkey.py` talks to the Widevine CDM |
|
||||
| **adb** (platform-tools) on `PATH` | only for phone capture |
|
||||
| A `.wvd` Widevine device file | only for fetching keys |
|
||||
| **adb** on `PATH` | phone capture |
|
||||
| Rooted Android (Magisk) | system CA for HTTPS MITM |
|
||||
| **`.wvd`** in `data/` | Widevine keys (RTE/TG4; BBC mobile streams are clear) |
|
||||
| Python 3.10+ + `.venv` | only if you fetch keys with `wvkey.py` |
|
||||
|
||||
Phone capture additionally needs a rooted Android device (Magisk) so the MITM CA
|
||||
can be injected into the system trust store. Catalog lookups need no phone.
|
||||
### 3. Install a provider
|
||||
|
||||
### 2. Clone and build
|
||||
Unzip into `modules/<name>/`. Edit **`module.yaml`** — fill sensitive fields only
|
||||
(RTE license URL / KIDs; TG4 account + policy key + video ids). BBC needs almost
|
||||
nothing extra.
|
||||
|
||||
```bash
|
||||
drm modules
|
||||
# or: drm --modules-dir D:\mods modules
|
||||
```
|
||||
|
||||
### 4. Phone CA (once per device / CA)
|
||||
|
||||
```bash
|
||||
drm proxy install-ca --reinject
|
||||
adb shell am force-stop bbc.iplayer.android # or the app you will capture
|
||||
```
|
||||
|
||||
### 5. Capture
|
||||
|
||||
```bash
|
||||
# BBC + NordVPN UK on the phone (transparent MITM; --channel auto-plays)
|
||||
drm capture --app bbc --channel bbcone --wait 120
|
||||
drm capture --app bbc --channel s4c --wait 120
|
||||
|
||||
# RTE / TG4 (keys via --wvd when needed)
|
||||
drm capture --app rte --channel rteone --wvd data/device.wvd
|
||||
drm capture --app tg4 --channel ioi --wvd data/device.wvd
|
||||
|
||||
# Catalog only (no phone) — TG4
|
||||
drm catalog --app tg4 --channel ioi --keys --wvd data/device.wvd --json
|
||||
```
|
||||
|
||||
Results: `outputs/<app>/<stamp>/` (and `latest/`).
|
||||
|
||||
### 6. Clean the phone after a run
|
||||
|
||||
```bash
|
||||
drm proxy reset
|
||||
```
|
||||
|
||||
Stops MITM/iptables and deletes pushed CA/binaries so the next capture starts fresh.
|
||||
|
||||
---
|
||||
|
||||
## Command cheat sheet
|
||||
|
||||
```text
|
||||
drm [--modules-dir DIR] <command> …
|
||||
|
||||
drm modules
|
||||
drm capture --app NAME [--channel ID] [--wait N] [--wvd PATH] [--serial S]
|
||||
drm catalog --app NAME --channel ID [--keys] [--wvd PATH] [--json] [--list]
|
||||
drm proxy install-ca [--reinject] | reset [--keep-captures]
|
||||
| transparent --package PKG | start | stop | push | discover | pull
|
||||
drm serve [--bind …] [--data …] [--token …]
|
||||
drm agent run|status|devices|enqueue|cancel [--config …]
|
||||
```
|
||||
|
||||
Global: `--modules-dir DIR` or `$DRM_MODULES_DIR` (default: `./modules`).
|
||||
|
||||
`--channel` implies interactive auto-play (Explore → channel → Watch live for BBC).
|
||||
|
||||
---
|
||||
|
||||
## Config: publish vs local
|
||||
|
||||
| File | In git / zips? | Purpose |
|
||||
|---|---|---|
|
||||
| `module-publish.yaml` | yes | Universal package, channels, UI |
|
||||
| `module.yaml` | **no** (local) | Secrets + overrides; overlays publish |
|
||||
|
||||
Release module zips ship `module-publish.yaml` renamed to `module.yaml`.
|
||||
|
||||
---
|
||||
|
||||
## Building from source (optional)
|
||||
|
||||
```bash
|
||||
git clone https://git.nulldrm.com/nulldrm/Null-DRM-Official.git
|
||||
cd Null-DRM-Official
|
||||
|
||||
# Linux / macOS
|
||||
go -C apps/cli build -o ../../bin/drm .
|
||||
|
||||
# Windows
|
||||
go -C apps/cli build -o ../../bin/drm.exe .
|
||||
go -C apps/cli build -o ../../bin/drm.exe . # Windows
|
||||
# Host release: .\scripts\build-release.ps1 -Version v0.1.1
|
||||
# Modules: .\scripts\build-modules-release.ps1 -Version modules-v0.1.1
|
||||
```
|
||||
|
||||
Check it:
|
||||
|
||||
```bash
|
||||
./bin/drm help
|
||||
./bin/drm modules # which app modules this build contains
|
||||
```
|
||||
|
||||
`drm modules` works immediately, but channel lists stay empty until you add
|
||||
values — that is the next step.
|
||||
|
||||
### 3. Python CDM helper
|
||||
|
||||
```bash
|
||||
python -m venv .venv
|
||||
.venv/bin/pip install -r apps/wvkey/requirements.txt # Windows: .venv\Scripts\pip
|
||||
```
|
||||
|
||||
Put your Widevine device file in `data/` (gitignored), e.g. `data/device.wvd`.
|
||||
|
||||
### 4. Fill in a module's values
|
||||
|
||||
Compiled-in module code carries **no** account IDs, policy keys, video IDs,
|
||||
license URLs or key IDs. Those go in a gitignored file per module, which you create:
|
||||
|
||||
```text
|
||||
apps/modules/tg4/module.yaml
|
||||
apps/modules/rte/module.yaml
|
||||
```
|
||||
|
||||
Where each value comes from:
|
||||
|
||||
- **[docs/providers/tg4.md](docs/providers/tg4.md)** — Brightcove account ID, policy key, video IDs
|
||||
- **[docs/providers/rte.md](docs/providers/rte.md)** — license URL, origin hosts, channel KIDs
|
||||
- **[docs/capture.md](docs/capture.md)** — how to discover all of it for a *new* app
|
||||
|
||||
Any value can be passed per-run instead of stored:
|
||||
|
||||
```bash
|
||||
./bin/drm catalog --app tg4 --channel ioi --tg4.policy-key 'BCpkAD...'
|
||||
TG4_POLICY_KEY='BCpkAD...' ./bin/drm catalog --app tg4 --channel ioi
|
||||
```
|
||||
|
||||
### 5. Run something
|
||||
|
||||
```bash
|
||||
# keys from a public catalog — no phone needed
|
||||
./bin/drm catalog --app tg4 --channel ioi --keys --wvd data/device.wvd
|
||||
|
||||
# phone capture: launch the app, drive it to a channel, grab license + keys
|
||||
./bin/drm proxy build # once: cross-compile the on-device MITM
|
||||
./bin/drm capture --app rte --channel rteone --auto-play --wvd data/device.wvd
|
||||
|
||||
# control plane + dashboard on http://127.0.0.1:8083
|
||||
./bin/drm serve --bind 127.0.0.1:8083 --data .cache/streamd --token SECRET
|
||||
|
||||
# always-on refresher: watches streamd, re-captures dead channels
|
||||
STREAMD_TOKEN=SECRET ./bin/drm agent run --config apps/agent/agent.yaml
|
||||
```
|
||||
|
||||
Results land in `outputs/<app>/<timestamp>/`, with `latest/` kept as a copy.
|
||||
|
||||
---
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Command | What it does |
|
||||
|---|---|
|
||||
| `drm modules` | list compiled-in app modules, their channels and config source |
|
||||
| `drm capture` | one-shot phone MITM capture → `outputs/<app>/<stamp>/` |
|
||||
| `drm catalog` | resolve a channel from its public catalog, no phone |
|
||||
| `drm serve` | streamd: REST API + dashboard + media supervisor |
|
||||
| `drm agent` | `run` / `status` / `devices` / `enqueue` / `cancel` |
|
||||
| `drm proxy` | `build` / `push` / `install-ca` / `start` / `stop` / `discover` / `pull` |
|
||||
|
||||
Run any of them with `--help`.
|
||||
|
||||
## Layout
|
||||
|
||||
```text
|
||||
apps/cli/ the binary -> bin/drm
|
||||
apps/modules/ app modules: Go (tracked) + module.yaml (gitignored)
|
||||
apps/pkg/ shared, provider-neutral libraries
|
||||
apps/capture/ phone capture command
|
||||
apps/agent/ always-on key refresher
|
||||
apps/streamd/ control plane: API, SQLite, dashboard, supervisor
|
||||
apps/proxy/ MITM host CLI + on-device proxy source
|
||||
apps/wvkey/ wvkey.py — CDM only
|
||||
docs/ architecture, authoring, provider setup
|
||||
data/ secrets: .wvd, CA (gitignored)
|
||||
outputs/ capture sessions (gitignored)
|
||||
bin/ built binaries (gitignored)
|
||||
www/ static site
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
```bash
|
||||
go -C apps/pkg test ./...
|
||||
go -C apps/modules test ./...
|
||||
go -C apps/streamd test ./...
|
||||
```
|
||||
|
||||
Tests that hit a live origin are behind a build tag, so they stay out of the
|
||||
normal run:
|
||||
|
||||
```bash
|
||||
go -C apps/modules test -tags live ./rte/ -v
|
||||
```
|
||||
More detail: [docs/quickstart.md](docs/quickstart.md), [docs/architecture.md](docs/architecture.md),
|
||||
[docs/providers/bbc.md](docs/providers/bbc.md).
|
||||
|
||||
## Scope
|
||||
|
||||
For use only on services you are authorised to access, with content you have the
|
||||
right to decrypt. [docs/architecture.md](docs/architecture.md) describes what the
|
||||
system does and where it stops.
|
||||
Only for services you are authorised to access, with content you have the right
|
||||
to decrypt.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue