CoffeeKnyte
0217cce2df
feat(playback): stream kill switch + async over-cap enforcer
...
Add the enforcement layer on top of server-observed monitoring: a revocation
kill switch that stops any stream within ~120s and keeps it dead, plus an async
over-cap enforcer that drives kills off the live monitoring picture — entirely
off the per-segment hot path and with no client-protocol change.
- internal/streamrevoke: the central kill list. IsRevoked is a pure in-memory
lookup safe on the request hot path; a Redis pub/sub + poll mirror keeps edge
caches current, and a Postgres durable mirror lets kills survive a server
restart AND a Redis flush so a restart-resilient stream cannot be reconstructed
and re-served after being killed. A user revocation is a cutoff (kills tokens
minted before it, spares post-reauth tokens), not a 24h ban.
- internal/streamenforcer: async over-cap brain — reads the monitoring snapshot
and per-user limits, selects victims, and collapses every reason (exceeded
limit, admin terminate, abuse) to the same action: write a revocation.
- Edge + native + jellycompat enforcement: proxy refuses revoked sessions on
every request and cuts long direct-play/remux pours mid-stream; the transcode
node guards both serve and the reconstruct path so a killed session is never
re-spawned after a node restart; jellycompat serve surfaces close their
kill-switch coverage holes.
- streamtoken.IssuedTime exposes the token iat the user-kill cutoff compares
against; token IssuedTime + revocation guards wire through router, downloads,
and admin terminate-by-id (with admin-list dedupe).
- Restore sendfile zero-copy on direct-play/remux byte counting so the monitor's
served-byte accounting does not cost the sendfile fast path.
- migrations/sql: stream_revocations durable table.
Part of the stream monitoring & kill-switch epic.
2026-07-29 12:26:03 +00:00
..
2026-05-22 23:26:56 -04:00
2026-07-05 17:38:19 -04:00
2026-07-05 17:38:19 -04:00
2026-07-23 11:24:55 -04:00
2026-07-10 15:48:37 -04:00
2026-07-23 11:24:55 -04:00
2026-06-25 16:20:14 -04:00
2026-07-20 11:13:52 -04:00
2026-05-26 17:57:26 -04:00
2026-05-26 17:57:26 -04:00
2026-07-16 17:33:21 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-07-28 15:01:23 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-06-05 22:43:20 -04:00
2026-06-05 22:43:20 -04:00
2026-07-09 08:53:52 -04:00
2026-06-10 08:58:45 -04:00
2026-07-09 08:53:52 -04:00
2026-07-02 14:07:34 -04:00
2026-07-09 08:53:52 -04:00
2026-05-22 23:26:56 -04:00
2026-07-29 12:26:03 +00:00
2026-05-22 23:26:56 -04:00
2026-06-11 23:04:35 -04:00
2026-07-02 11:42:28 -04:00
2026-06-15 09:34:08 -04:00
2026-06-15 09:34:08 -04:00
2026-07-23 11:24:55 -04:00
2026-07-28 21:49:41 -04:00
2026-07-28 21:49:41 -04:00
2026-07-23 15:14:52 -04:00
2026-07-06 12:23:32 -04:00
2026-07-23 15:06:39 -04:00
2026-07-09 08:53:52 -04:00
2026-07-23 15:14:52 -04:00
2026-07-23 15:14:52 -04:00
2026-07-05 17:38:19 -04:00
2026-07-28 21:49:41 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-06-17 13:48:57 -04:00
2026-07-09 23:08:04 -04:00
2026-07-09 23:08:04 -04:00
2026-05-31 17:34:48 -04:00
2026-05-31 17:34:48 -04:00
2026-07-09 14:13:31 -04:00
2026-07-09 14:13:31 -04:00
2026-07-09 14:13:31 -04:00
2026-07-09 14:13:31 -04:00
2026-07-23 11:24:55 -04:00
2026-05-29 13:55:39 -04:00
2026-07-09 08:53:52 -04:00
2026-06-26 10:46:42 -04:00
2026-06-16 18:17:08 -04:00
2026-06-18 19:17:22 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-05-23 20:26:05 -04:00
2026-05-23 20:26:05 -04:00
2026-07-07 10:46:50 -04:00
2026-05-22 23:26:56 -04:00
2026-06-24 11:03:38 -04:00
2026-07-26 21:07:48 -04:00
2026-07-27 12:07:37 -04:00
2026-07-27 12:07:37 -04:00
2026-07-27 12:07:37 -04:00
2026-07-27 12:07:37 -04:00
2026-07-01 22:05:36 -04:00
2026-07-01 22:05:36 -04:00
2026-07-29 12:26:03 +00:00
2026-06-17 13:09:55 -04:00
2026-07-09 23:07:16 -04:00
2026-06-10 08:18:35 -04:00
2026-06-10 08:18:35 -04:00
2026-06-10 08:18:35 -04:00
2026-07-09 23:07:16 -04:00
2026-06-11 21:34:19 -04:00
2026-07-09 08:53:52 -04:00
2026-06-25 20:50:45 -04:00
2026-07-14 13:44:57 -04:00
2026-06-10 08:18:35 -04:00
2026-07-05 19:04:42 -04:00
2026-07-01 18:10:56 -04:00
2026-07-01 18:10:56 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-06-05 22:43:20 -04:00
2026-07-27 22:58:18 -04:00
2026-06-26 08:34:04 -04:00
2026-06-10 08:18:35 -04:00
2026-06-18 19:17:22 -04:00
2026-07-16 10:37:34 -04:00
2026-06-15 09:34:08 -04:00
2026-06-15 09:34:08 -04:00
2026-07-14 00:21:46 +02:00
2026-07-14 00:21:46 +02:00
2026-05-22 23:26:56 -04:00
2026-07-02 14:07:21 -04:00
2026-07-24 12:18:49 -04:00
2026-06-16 20:13:10 -04:00
2026-07-07 09:42:41 -04:00
2026-07-07 09:42:41 -04:00
2026-07-02 14:08:02 -04:00
2026-07-26 11:19:33 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-05-22 23:26:56 -04:00
2026-06-16 18:17:08 -04:00
2026-06-16 18:17:08 -04:00
2026-07-05 17:38:19 -04:00
2026-07-09 08:53:52 -04:00
2026-05-26 17:57:26 -04:00
2026-07-06 18:52:44 -04:00
2026-06-27 21:44:28 -04:00
2026-07-09 08:53:52 -04:00
2026-05-22 23:26:56 -04:00
2026-07-29 12:23:48 +00:00
2026-07-01 17:25:16 -04:00
2026-06-11 19:51:03 -04:00
2026-06-11 20:55:30 -04:00
2026-07-14 13:44:39 -04:00
2026-07-14 13:44:39 -04:00
2026-06-11 18:10:16 -04:00
2026-06-11 14:55:46 -04:00
2026-07-14 13:44:39 -04:00
2026-05-22 23:26:56 -04:00
2026-07-27 22:58:18 -04:00
2026-07-09 08:53:52 -04:00
2026-05-22 23:26:56 -04:00
2026-05-23 23:48:25 -04:00
2026-07-09 08:53:52 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-07-02 14:23:14 -04:00
2026-05-22 23:26:56 -04:00
2026-07-28 21:27:58 -04:00
2026-07-28 21:27:58 -04:00
2026-07-10 08:21:26 -04:00
2026-07-28 13:07:05 -04:00
2026-07-14 11:51:27 -04:00
2026-07-14 12:13:16 -04:00
2026-07-26 00:12:29 -04:00
2026-07-14 12:13:16 -04:00
2026-07-27 08:15:25 -04:00
2026-07-29 12:23:48 +00:00
2026-06-09 13:00:48 -04:00
2026-07-16 17:55:36 -04:00
2026-07-23 11:24:55 -04:00
2026-07-09 19:06:36 -04:00
2026-07-16 11:24:55 -04:00
2026-07-27 12:07:37 -04:00
2026-07-09 08:53:52 -04:00
2026-07-09 08:53:52 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-07-08 11:20:27 -04:00
2026-07-09 08:53:52 -04:00
2026-06-16 18:32:52 -04:00
2026-07-01 22:05:36 -04:00
2026-07-09 08:53:52 -04:00
2026-05-22 23:26:56 -04:00
2026-07-23 15:14:52 -04:00
2026-07-23 15:14:52 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-05-29 22:40:55 -04:00
2026-06-09 13:00:48 -04:00
2026-06-09 13:00:48 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-06-08 15:25:48 -04:00
2026-06-23 14:16:31 -04:00
2026-07-09 08:53:52 -04:00
2026-06-15 10:51:12 -04:00
2026-06-15 10:51:12 -04:00
2026-06-15 09:34:08 -04:00
2026-07-09 08:53:52 -04:00
2026-06-15 09:34:08 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-07-23 11:24:55 -04:00
2026-06-17 09:51:43 -04:00
2026-07-05 16:45:06 -04:00
2026-07-23 11:24:55 -04:00
2026-07-24 14:22:12 -04:00
2026-07-14 11:51:27 -04:00
2026-07-09 08:53:52 -04:00
2026-07-10 08:21:26 -04:00
2026-07-10 08:21:26 -04:00
2026-07-01 18:13:46 -04:00
2026-07-09 08:53:52 -04:00
2026-05-22 23:26:56 -04:00
2026-07-14 11:51:27 -04:00
2026-05-22 23:26:56 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-07-23 11:24:55 -04:00
2026-07-23 11:24:55 -04:00
2026-06-10 08:58:45 -04:00
2026-07-09 08:53:52 -04:00
2026-06-05 22:43:20 -04:00
2026-06-18 19:17:22 -04:00
2026-06-18 19:17:22 -04:00
2026-05-22 23:26:56 -04:00
2026-06-10 08:58:45 -04:00
2026-07-26 22:01:31 -04:00
2026-05-22 23:26:56 -04:00
2026-07-09 08:53:52 -04:00
2026-07-09 08:53:52 -04:00
2026-05-24 00:04:25 -04:00
2026-07-09 08:53:52 -04:00
2026-05-29 22:40:55 -04:00
2026-05-29 22:40:55 -04:00