Commit graph

13 commits

Author SHA1 Message Date
Deivid Soto
4946982783 docs(roadmap): mark hueco #2/2b (HLS-from-URL) closed 2026-05-31 16:23:45 +02:00
Deivid Soto
b8d2b90370 feat(stream): serve /stream from a debrid HTTPS link (hueco #2/2a)
The daemon can now stream a session straight from a server-resolved debrid
direct URL instead of disk/torrent, delivering the "play instantáneo
cache-fast" promise for cache-confirmed torrents the user never downloaded.

- debridFileProvider: an io.ReadSeekCloser over HTTP Range — network-free
  Seek, lazy GET on Read, reopen-on-seek, a HEAD up front for the size, and
  a URL-derived name so the served Content-Type is video/mp4 (not
  octet-stream) when the web's name lacks an extension.
- OnStreamSession branches on StreamSession.DirectURL before the filePath
  checks (no local path, no ffmpeg), builds the provider in a goroutine
  (HEAD off the sync loop) and marks the session ready.
- Bump 0.10.0 -> 0.11.0 as the debrid-stream floor the web gates on.

Validated e2e against a real AllDebrid account: a cached mp4 plays 1080p in
Chrome through the agent, including the high-offset seek for a non-faststart
file's moov atom. 2b (HLS-from-URL for mkv/HEVC) + 2c (cache-fast preference
+ mid-stream fallback) remain.
2026-05-31 15:49:58 +02:00
Deivid Soto
5d80ec57b9 docs(roadmap): hueco #3 fully closed — 3d resolved as 3d-lite auto-downshift 2026-05-31 13:15:29 +02:00
Deivid Soto
89236f13b5 docs(roadmap): hueco #3 3c closed (capability negotiation) + TTFF diagnosis 2026-05-31 12:48:50 +02:00
Deivid Soto
c18876471c docs(roadmap): hueco #3 phase 3b closed (progressive fMP4 remux) + smoke 2026-05-31 11:56:28 +02:00
Deivid Soto
6e8bca2ac4 docs(roadmap): 3b approach = progressive fMP4 remux via /stream 2026-05-31 11:28:37 +02:00
Deivid Soto
5fa8455b21 docs(roadmap): hueco #3 3a smoke e2e passed + brand-isolation fix noted 2026-05-31 11:14:28 +02:00
Deivid Soto
944d6529b2 chore: bump version to 0.10.0 (direct-play floor; local build only, no publish) 2026-05-31 11:03:03 +02:00
Deivid Soto
42fc408947 docs(roadmap): add hueco #4 (pre-transcode on download) design 2026-05-31 10:54:57 +02:00
Deivid Soto
192b474c60 docs(roadmap): hueco #3 phase 3a closed (direct-play) 2026-05-31 10:51:58 +02:00
Deivid Soto
3592b9f95a docs(roadmap): design hueco #3 (device-profile + direct-play + ABR) 2026-05-31 10:30:33 +02:00
Deivid Soto
0f8e0fec53 docs(roadmap): design hueco #2 (debrid in the streaming path) 2026-05-31 01:22:35 +02:00
Deivid Soto
444d7e63fd feat(stream): authenticate /stream and /hls with signed tokens
/stream and /hls were served with no auth (only CORS + rate limit), so a
funnel- or UPnP-exposed daemon leaked active downloads to anyone with the URL.

Bind a short-lived HMAC token (scope + 6h expiry) to every stream URL the
daemon hands out and verify it on each request:
- /stream + VLC playlist: ?t= query, agent-minted, scope "stream"
- /hls: path segment /hls/<session>/<token>/<resource>, web-minted with the
  agent's reported secret, scope "hls:<session>" — relative playlist URIs
  inherit it with no rewriting
- NO loopback exemption: cloudflared relays public funnel traffic over
  localhost, so a loopback source address is not a trust signal
- the agent reports its per-run signing key on register only when enforcing
- require_stream_token config (default true); secret fails hard if rand fails
- /playlist.m3u no longer self-mints a token (was an open token oracle)

Roadmap: Docs/plans/unarr-agent-roadmap.md (hueco #1).
Deploy the web HLS-minting change BEFORE shipping this agent release.
2026-05-31 01:19:14 +02:00