From 2aeabe6b509b03a55b08e525bf76b717c25706bd Mon Sep 17 00:00:00 2001 From: Deivid Soto Date: Wed, 6 May 2026 14:46:38 +0200 Subject: [PATCH] =?UTF-8?q?feat(wstracker-probe):=20-seed=20FILE=20mode=20?= =?UTF-8?q?for=20browser=20=E2=86=94=20unarr=20e2e=20validation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extends the probe binary so it can do more than verify tracker reach: when given a real file, it builds a single-file torrent in memory, seeds it via the WebTorrent peer wire, and prints the magnet URI (with the WSS tracker injected). Useful for proving the end-to-end streaming path before any actual unarr daemon work lands. Internally uses anacrolix/torrent's metainfo.Info.BuildFromFilePath + bencode.Marshal to mint InfoBytes, then AddTorrent → seed loop. Piece length picked from a libtorrent-like ladder (16 KiB → 4 MiB) so the resulting torrent is interoperable with mainstream clients. Validation: synthesised a 5 s 320×240 H.264+AAC mp4 with ffmpeg (`testsrc + sine`), seeded it via this binary against the production wss://tracker.torrentclaw.com endpoint, opened the in-browser player at /stream/. Browser reported `downloaded: 105 KB / 105 KB` and rendered a working