mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
[PR #15696] Fix playback of .strm files with internal IPs by enforcing DirectStream #14214
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#14214
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/15696
Author: @martenumberto
Created: 12/2/2025
Status: 🔄 Open
Base:
master← Head:fix-wrong-ip-behind-nat📝 Commits (1)
c1386a7Fix: Disable Direct Play for .strm files with HTTP URLs to ensure proper playback via proxy📊 Changes
1 file changed (+11 additions, -0 deletions)
View changed files
📝
Emby.Server.Implementations/Library/MediaSourceManager.cs(+11 -0)📄 Description
Describe the bug
Currently,
.strmfiles containing HTTP links to internal resources (e.g., Docker container IPs like172.x.x.x,localhost, or LAN IPs) are treated as "External Media" eligible for Direct Play.When a client (e.g., Android TV, Web) is located outside the server's immediate network (e.g., different VLAN, external access via reverse proxy), it receives the raw internal IP address from the
.strmfile. Since the client cannot reach this private IP directly, playback fails immediately.The Solution
This PR updates
MediaSourceManagerto intelligently detect if a.strmsource URL points to an internal or private network address.Fixes https://github.com/jellyfin/jellyfin/issues/15411
Previously https://github.com/jellyfin/jellyfin/pull/15575
Changes:
INetworkManagerintoEmby.Server.Implementations.Library.MediaSourceManager.GetPlaybackMediaSources, the code now parses the source URL host._networkManager.IsInLocalNetwork(ip)to check if the IP is local. This respects the user's "LAN Networks" configuration in the Jellyfin Dashboard as well as standard RFC1918 private ranges.SupportsDirectPlayis set tofalse. This forces Jellyfin to act as a proxy (typically utilizingffmpeg -c copy/ Direct Stream), making the stream accessible to the client.Testing Done
.strmfile pointing tohttp://172.19.0.4:8080/video.mkv(another container in the same bridge network).http://172...URL and failed to connect..strmfile pointing to a public URL (e.g., a test file on the internet) still utilizes Direct Play.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.