Files
jellyfin-packaging/docker/jellyfin-xbox-proxy
mani ad655ae4c4 Debug: Add test response for PlaybackInfo matching
Testing if path_regexp works by returning debug response
instead of proxying. This will show:
1. If the path is matched correctly
2. What User-Agent header is received

Once confirmed working, uncomment reverse_proxy lines.
2026-01-09 00:24:51 +01:00
..

Jellyfin Xbox Codec Filter Proxy

Intelligenter Caddy-basierter Reverse Proxy mit Python-Filter für Xbox-Clients.

Problem

Die Xbox UWP WebView2 App meldet fälschlicherweise Support für AV1 und Opus Codecs, kann diese aber nicht abspielen.

Lösung

Dieses Setup verwendet Caddy als Hauptproxy mit einem spezialisierten Python-Filter:

  • Caddy routet intelligently:

    • Xbox PlaybackInfo Requests → Python Filter (codec filtering)
    • Alle anderen Requests → direkt zu Jellyfin (WebSockets, Streaming, etc.)
  • Python Filter filtert nur:

    • AV1 aus Video-Codecs
    • Opus aus Audio-Codecs

Installation

cd docker/jellyfin-xbox-proxy
docker-compose up -d

Konfiguration

  1. Passe docker-compose.yml an:

    • Volumes für Jellyfin
    • PublishedServerUrl
  2. Der Stack läuft auf Port 8096 (Standard Jellyfin)

Architektur

Xbox Client → Port 8096 (Caddy) → Check User-Agent
                 ↓                      ↓
         User-Agent enthält "Xbox"?
                 ↓                      ↓
            JA: Python Filter      NEIN: Direkt zu Jellyfin
                 ↓                      ↓
      Filtert DeviceProfile        (WebSocket, Streaming, etc.)
                 ↓
            Jellyfin

Routing-Regeln

Zu Python-Filter:

  • POST /Users/*/Items/*/PlaybackInfo
  • Header: User-Agent: *Xbox*

Direkt zu Jellyfin:

  • Alle anderen Requests
  • WebSocket-Verbindungen (/socket)
  • Video-Streaming
  • API-Calls
  • Web-UI

Logs

Caddy Logs:

docker logs -f jellyfin-caddy

Zeigt Routing-Entscheidungen:

INFO - Routing to xbox-filter (PlaybackInfo + Xbox User-Agent)
INFO - Routing to jellyfin (all other requests)

Xbox Filter Logs:

docker logs -f jellyfin-xbox-filter

Zeigt Codec-Filterung:

INFO - Xbox PlaybackInfo request detected
INFO - Filtering Xbox DeviceProfile in REQUEST
INFO - DeviceProfile filtered successfully

Vorteile

  • Intelligent Routing - Nur Xbox PlaybackInfo zum Filter
  • Keine Latenz - Normaler Traffic direkt zu Jellyfin
  • WebSocket Support - /socket funktioniert einwandfrei
  • Production-Ready - Caddy ist ein echter Production Proxy
  • Flexibel - Caddy kann SSL, Rate-Limiting, etc. hinzufügen
  • Kein Jellyfin-Code-Patch - funktioniert mit allen Versionen

Troubleshooting

503 Errors bei normalen Requests:

  • Python-Filter läuft nicht → docker-compose up -d xbox-filter

400 Errors bei WebSocket:

  • Sollte nicht mehr passieren (direkt zu Jellyfin)

Xbox spielt noch AV1:

  • Check Caddy-Logs: Wird Request zum Filter geroutet?
  • Check Filter-Logs: Wird DeviceProfile gefiltert?
  • User-Agent enthält "Xbox"?