Video Extensions
Configure Stremio-protocol video and subtitle extensions, understand Bunko's sealed relay and SSRF protection, monitor health.json, and opt in self-hosted addons via BUNKO_VIDEO_ALLOWED_HOSTS.
When an episode or film is not present in Jellyfin, Emby, or Stash, Bunko can query Stremio-protocol video and subtitle extensions that you configure yourself.
No preinstalled extensions or built-in sources
Bunko ships with zero extensions, zero source registries, and zero built-in streams. Bunko never executes third-party addon code, never runs a BitTorrent/P2P engine, never bypasses DRM or paywalls, and never stores streamed video files.
Adding video and subtitle extensions
Accounts with the extensions permission configure extensions under Settings › Extensions › Streaming:
- Paste a manifest URL (
https://addon.example.com/manifest.jsonor astremio://install link). - Bunko fetches and validates the manifest through its SSRF-guarded client (
safe-fetch), then stores the manifest URL encrypted in SQLite (AES-256-GCM). The browser only sees the extension name and host so account keys or debrid tokens embedded in manifest paths never leak to the client. - Choose Version tried first (subtitled original vs. dubbed) and whether Also start other languages by themselves is enabled (off by default).
Only direct HTTP(S) files and HLS playlists are playable. Raw BitTorrent infoHash results are folded away unless the extension itself resolves them to HTTP(S) links.
Sealed relay architecture and SSRF protection
Every manifest fetch, stream lookup, subtitle download, relayed video byte, HLS playlist, segment, and encryption key passes through src/lib/safe-fetch.ts:
- Private-network block by default — Loopback, private LAN, link-local (including cloud metadata
169.254.169.254), CGNAT, multicast, reserved, and documentation IPv4/IPv6 ranges are refused at the socket DNS-lookup layer (defeating DNS rebinding and alternate IP spellings). - Strict redirect & header hygiene — Up to 5 redirects are checked hop-by-hop;
AuthorizationandCookieheaders are stripped on cross-origin redirects. Only allowlistedbehaviorHints.proxyHeadersrequested by the extension are forwarded — never Bunko's cookies or other service credentials. - Sealed relay links — When direct browser playback fails (for example due to CORS or custom headers), Bunko falls back to its own relay using AES-256-GCM sealed links bound to the requesting account and expiring after 12 hours. Relayed responses are served strictly as opaque media (
video/*,audio/*, HLS, orapplication/octet-stream) withX-Content-Type-Options: nosniffand asandboxCSP. - Resource bounds — 8-second response / 10-second total timeout for extension JSON (4 MiB max), 8 MiB max for HLS playlists, 5 MiB max for subtitles, and at most 8 concurrent relayed streams per account (32 server-wide).
Extension catalogs (extvideo)
Extensions may also expose custom catalogs of type extvideo in their manifest. Bunko dynamically registers each declared category under the extension media kind (remembered in extension_sections), allowing users to hide or reorder sections. Extensions setting behaviorHints.adult: true are strictly restricted to an account's 18+ mode and hidden everywhere else.
Per-source telemetry (health.json)
An extension may optionally publish a read-only {manifest base}/health.json document:
{
"schema": 1,
"summary": { "total": 2, "ok": 1, "warning": 1, "down": 0, "off": 0 },
"sources": [
{ "name": "Provider A", "status": "ok", "enabled": true, "success": 42, "empty": 3, "errors": 0, "lastSeen": 1763910000000 }
]
}When present, Settings › Extensions displays per-source status, recent hit/error counts, and last-seen timestamps. If absent or invalid, Bunko silently omits telemetry without treating it as an error.
Opting in self-hosted addons (BUNKO_VIDEO_ALLOWED_HOSTS)
Self-hosted extensions or aggregators running on your LAN or Docker network are blocked by default until an administrator explicitly opts them in via BUNKO_VIDEO_ALLOWED_HOSTS (end users cannot widen this from the UI):
services:
bunko:
environment:
BUNKO_VIDEO_ALLOWED_HOSTS: 'my-addon:7000,aiostreams:3000'- Always allow the narrowest entry possible (
host:portrather than a broad CIDR range). - Every redirect returned by an allowed local service is still checked again by
safe-fetch. - Streams and subtitles hosted on an explicitly allowed Docker/LAN service automatically play through Bunko's sealed relay because the viewer's browser cannot resolve internal container names directly.
Stash and TraDoc
Connect Stash over GraphQL for personal video libraries and HLS playback, and connect TraDoc to translate EPUB, PDF, and DOCX books inside Kavita.
Security and Reverse Proxy
Understand Bunko's threat boundaries, configure a TLS reverse proxy safely, review SSRF and encryption protections, and perform emergency account recovery.