gates / gates (push) Successful in 2m38s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
4.8 KiB
4.8 KiB
R-777 — Jellyfin and Emby treat every internet visitor as the home network — MEASURED and fixed on a held branch
Night 2026-10-06, scratch guest 9202 on demo-hp, 20:39–21:10 local. Baselines: catalog d63ea35, controller v0.301.0 on 9202.
Architecture: audits/visitors-2026-10-01/A/DESIGN.md §3–§5 (the tunnel chain; 10-…/01-topology-and-trust.md carry no more).
Method
- Install through the controller's own endpoint (
POST /api/stacks/<app>/deploy,box_walk.py), setup wizard and users through each app's own API as the household (LAN, setup-gate cookie). Emby has no setup-done probe: its gate was opened with the household's button (POST /apps/emby/setup-gate/open,e6). - A user
r777remoteoffwith remote access OFF (policy read back:EnableRemoteAccess = False). - The internet visitor, simulated as in
visitors-2026-10-01(9202 has no tunnel): a container at cloudflared's fixed172.16.253.2onfelhom-tunnelPOSTs/Users/AuthenticateByNameto traefik with what Cloudflare sends (CF-Connecting-IPandX-Forwarded-For=198.51.100.66) —tunnel.sh; the forged variant sendsX-Forwarded-For: 10.0.0.5, 198.51.100.66(tunnel-forge.sh). - Controls from a different channel: the app's own session list (
RemoteEndPoint) and the app's own log line. - The fix was measured on two paths each: the running install (the changed compose applied to its stack by hand,
docker compose up -d, the controller not involved) and a FRESH volume (a renamed throwaway copy, projectr777jf/r777emby, never known to the controller).
Results
| App | Before | After the fix |
|---|---|---|
| Jellyfin 10.11.11 | tunnel sign-in 200; session address 172.18.0.5 = traefik (j3, j4) |
tunnel 403, log: forbidden: remote access disabled and user not in local network (IP: 198.51.100.66); forged XFF 403, same address; LAN household 200, session 192.168.0.180 (j6–j8); fresh volume: seeded, Jellyfin loaded KnownProxies ['172.16.0.0/12'], tunnel 403 (j10–j12) |
| Emby 4.11.0.4 | tunnel sign-in 200; session address 172.16.253.2 = cloudflared; log X-Real-Ip=172.16.253.2, no XFF (e7–e9) |
with LocalNetworkSubnets = 10.0.0.0/8, 192.168.0.0/16: tunnel 403 (User r777remoteoff is not allowed remote access), forged 403, LAN household 200 (e10–e12); fresh volume: seeded, kept through the wizard, tunnel 403, LAN 200 (e13–e15); empty list → recreate → filled, 403 (e16) |
The row's „Emby: no setting fixes it" was wrong (it was read in source, not measured): Emby counts every private
address as local only while LocalNetworkSubnets is EMPTY. Naming the home ranges without 172.16.0.0/12 (where
traefik and cloudflared live) fixes it. So R-777 needs no operator decision for Emby.
The fix (catalog branch night-r777 commit 7876e71, to be merged onto night-held-2026-10-06; NOT on main)
templates/jellyfin/docker-compose.yml: a start command writesKnownProxies 172.16.0.0/12intonetwork.xml(fresh volume, or<KnownProxies />still empty), thenexec /jellyfin/jellyfin.templates/emby/docker-compose.yml: a start command writesLocalNetworkSubnets 10.0.0.0/8, 192.168.0.0/16intosystem.xml(fresh, or<LocalNetworkSubnets />still empty; chowned to the server'sUID:GID), thenexec /init.- A household's own non-empty list is never touched.
- Cost / what can go wrong: a home network in 172.16–31.x counts as REMOTE in both apps — a user with remote access off then cannot sign in at home (the safe direction; the app's own setting fixes it). Jellyfin's partial seed file is read with defaults (proven: port 8096, remote access on, IPv4 on).
- Gates:
catalog_gates.py --fastgreen;catalog_gates.py jellyfin|embygreen except volume-persistence, which refuses on DooPlex for every app (its canary fails onmaintoo, checked with gokapi) — environmental, not this change.
Teardown (three layers)
- Machine (9202): both apps removed through the product (
remove_hdd_data: false— their drive path was the scratch drive's ROOT, so "delete drive data" would have reached other apps' folders; their volumes were removed by the product); both throwaway copiesdocker compose down -v;/root/r777deleted. App list equal to before: True (t2). No test container or volume left (t3). Left in place, by design: the two pulled images (no hand prune), anduserdata/jellyfin+userdata/embyfolders that predate tonight (2026-09-22). - Host (demo-hp): nothing provisioned;
/tmppush files removed. - Hub: nothing provisioned.
Not done
- No real Cloudflare path (9202 has no tunnel) — the simulation is the established method.
- Not merged to the held branch or pushed (the lead does that).