[PR #3994] [CLOSED] Major Network backend changes (Testing Purposes Only) #9811

Closed
opened 2026-02-07 06:08:55 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/3994
Author: @BaronGreenback
Created: 8/26/2020
Status: Closed

Base: masterHead: networking2


📝 Commits (10+)

📊 Changes

156 files changed (+9472 additions, -6515 deletions)

View changed files

📝 Emby.Dlna/Argument.cs (+0 -0)
Emby.Dlna/Configuration/ConfigurationExtension.cs (+21 -0)
📝 Emby.Dlna/Configuration/DlnaConfigurationFactory.cs (+8 -4)
📝 Emby.Dlna/Configuration/DlnaOptions.cs (+2 -14)
Emby.Dlna/ConfigurationExtension.cs (+0 -16)
📝 Emby.Dlna/ConnectionManager/ConnectionManagerService.cs (+0 -2)
📝 Emby.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs (+2 -4)
📝 Emby.Dlna/ConnectionManager/ControlHandler.cs (+0 -2)
Emby.Dlna/ConnectionManager/IConnectionManager.cs (+12 -0)
📝 Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs (+1 -3)
📝 Emby.Dlna/ContentDirectory/ContentDirectoryService.cs (+1 -2)
📝 Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs (+2 -4)
Emby.Dlna/ContentDirectory/IContentDirectory.cs (+12 -0)
📝 Emby.Dlna/ContentDirectory/ServerItem.cs (+0 -2)
📝 Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs (+1 -1)
📝 Emby.Dlna/DeviceIcon.cs (+0 -0)
📝 Emby.Dlna/DeviceService.cs (+0 -0)
📝 Emby.Dlna/Didl/DidlBuilder.cs (+296 -33)
📝 Emby.Dlna/Didl/Filter.cs (+15 -2)
📝 Emby.Dlna/Didl/StringWriterWithEncoding.cs (+45 -5)

...and 80 more files

📄 Description

A staged rollout of this PR can be found here.

https://github.com/jellyfin/jellyfin/pull/4124
https://github.com/jellyfin/jellyfin/pull/4125
#4404
#4138
#4137
#4136
https://github.com/jellyfin/jellyfin-web/pull/1979

Config Settings:

(Value in brackets is the default setting.)

LocalNetworkSubnets (empty) : Defines local subnets, and is used by the DLNA subsystem.
If blank, all the subnets of any private interfaces will be assumed to be the LAN.
Interface names, descriptions and subnets can be specified, as well as exclusions (addresses beginning with !)
usage:
10.0.0.0/8,!192.168.1.1 means 10.0.0.0/8 is in the LAN, but ignore traffic to/from 192.168.1.1
!eth1 means every interface but exclude the interface eth1.

LocalNetworkAddresses (empty) : lists the interfaces that jellyfin binds to. Default is all interfaces.
Interface names, descriptions and subnets can be specified, as well as exclusions (addresses starting with !)
usage:
10.10.10.10 means listen only on 10.10.10.10
!eth1 means listen on every interface except eth1.

The system intelligently selects the most appropriate interface, so it is possible to specify both internally and externally facing network adapters.

dlna.xml advanced settings: (direct xml edit required)

EnablePlayToTracing (false) : If dlna debugging is enabled in conjunction to this, ssdp packet tracing is enabled. Warning: This has performance implications.

AutoCreatePlayToProfiles (false) : Auto creates user DLNA profiles for customisation.

system.xml advanced settings: (direct xml edit required)

HDHomerunPortRange (Random Port) : Specify a UDP port, or range of UDP ports that HDHomerun uses.

GatewayMonitorPeriod (60 seconds) : How often the gateway is pinged to ensure it's operational.

EnableIPV6 (False) : Disable/enable IPv6 usage.

EnableIPV4 (True) : Disable/enable IPv4 usage. (Useful for IP6 testing).

AutoDiscovery (true) : Enables/Disables network autodiscovery over udp port 7359.

AutoDiscoveryTracing (false) : Enables tracing on jellyfin's autodiscovery.

UDPPortRange (Any) : Port range to use for internal UDP ports. Can be fixed, or in a range. eg. 1024-2048

TrustAllIP6Interfaces (false) ; All IPv6 interfaces are deemed to be local. (See conversation at #3515.)

EnableMultiSocketBinding (true) : System will use specific ip bound sockets. Autocalculated, but can be overridden.

UPnPCreateHttpPortMap (false): Maps the HTTP port in addition to the HTTPS port on any network devices detected via uPNP (if active). Historically, uPnP has mapped both the HTTP and HTTP ports inbound. This is now no longer the case.

UDPSendCount (2) : Sets the number of times each SSDP message is transmitted.

UDPSendDelay (100) : Sets the delay between each group of SSDP messages. (in ms)

EnableSSDPTracing (false) : If dlna debugging is enabled in conjunction to this, ssdp packet tracing is enabled. Warning: This has performance implications.

SSDPTracingFilter (empty) : Used in conjunction with EnableSSDPTracing. Set to an IP address to filter logs to a specific address.

IgnoreVirtualInterfaces (true): Ignores any interface that matches those in VirtualInterfaceNames.

VirtualInterfaceNames (vEthernet*) : The name of the virtual interfaces to ignore.

PublishedServerUriBySubnet (empty) : list of [subnets|interfaces]/[serverUri|host|ip] [port] values that replicate the --published-server-url command line argument, but on a per subnet basis, enabling.
usage:

The following mimics the --published-server-url option but only for external requests.

<PublishedServerUriBySubnet>
<string>external=http://myjellyfin.org</string>
</PublishedServerUriBySubnet>

The following causes any requests from the subnet defined by eth1 to respond with a hostname jellyfin.com

<PublishedServerUriBySubnet>
<string>eth1=jellyfin.com </string>
</PublishedServerUriBySubnet>

The following causes any requests from the subnet defined by eth1 to respond with a hostname jellyfin.com, and everything else to return the address http://jellyexternal.com

<PublishedServerUriBySubnet>
<string>eth1=jellyfin.com</string>
<string>remaining=http://jellyexternal.com</string>
</PublishedServerUriBySubnet>

The following changes the url address dependant upon source request.

<PublishedServerUriBySubnet>
<string>192.168.1.0/24=net1access:1270</string>
<string>192.168.2.1/24=net2access</string>
<string>external=jellyfinoutside</string>
</PublishedServerUriBySubnet> 

Logging

To enable debug logging, edit logging.default.json, and add

    "Serilog": {
        "MinimumLevel": {
            "Override": {
	       "Jellyfin.Networking" : "Debug",
               "Mono.Nat.Upnp.UpnpSearcher ": "Debug",
               "Emby.Dlna" : "Debug"

Retired settings

BlastAliveMessages - no longer valid. Try increasing UDPSendCount, if the server is not detected reliably by other UPnP devices on your network. However, be aware that this may exponentially increase network traffic.

SendOnlyMatchedHost (false)- No longer valid. It causes SSDP replies to be sent to all subnets, not just the local ones.

Docker image crobibero/jellyfin:3257


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/3994 **Author:** [@BaronGreenback](https://github.com/BaronGreenback) **Created:** 8/26/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `networking2` --- ### 📝 Commits (10+) - [`a2f977a`](https://github.com/jellyfin/jellyfin/commit/a2f977a1e7a104bc2222de0e6461955a3865744d) Add files via upload - [`08e5b64`](https://github.com/jellyfin/jellyfin/commit/08e5b64b21a930f3f05dadad146e3afe87766677) reset - [`d37e56d`](https://github.com/jellyfin/jellyfin/commit/d37e56dc0a8c8dbf75ac16683c280598d607ce13) merge with master - [`29bfc95`](https://github.com/jellyfin/jellyfin/commit/29bfc9513cdf29fcdd031da5ffd4bf720e15577d) Merge fix - [`cf43a02`](https://github.com/jellyfin/jellyfin/commit/cf43a02b0a3be1533d0a720a04f21dd500fa8e4a) Moved to Mono.NAT 2.0.2 - [`0c1e9cc`](https://github.com/jellyfin/jellyfin/commit/0c1e9cc487d44896881f7d0fe645eb813371e629) Populate ThemeVideoIds and ThemeSongIds - [`963a3b1`](https://github.com/jellyfin/jellyfin/commit/963a3b1d3470cf66a05ea521cd725fb5e3540e6c) Remove some LINQ queries - [`09f208a`](https://github.com/jellyfin/jellyfin/commit/09f208a311170d75c445b32fcc9a88cfc523d67b) Sort by SortName after scanning - [`efaf197`](https://github.com/jellyfin/jellyfin/commit/efaf197f07c3c39768f5cab34c727ed71132cd08) clean up output formatters - [`0d09ae4`](https://github.com/jellyfin/jellyfin/commit/0d09ae4b8ab1edbd2202799f2a831b1897e06202) Move json profiles to constant strings. ### 📊 Changes **156 files changed** (+9472 additions, -6515 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Dlna/Argument.cs` (+0 -0) ➕ `Emby.Dlna/Configuration/ConfigurationExtension.cs` (+21 -0) 📝 `Emby.Dlna/Configuration/DlnaConfigurationFactory.cs` (+8 -4) 📝 `Emby.Dlna/Configuration/DlnaOptions.cs` (+2 -14) ➖ `Emby.Dlna/ConfigurationExtension.cs` (+0 -16) 📝 `Emby.Dlna/ConnectionManager/ConnectionManagerService.cs` (+0 -2) 📝 `Emby.Dlna/ConnectionManager/ConnectionManagerXmlBuilder.cs` (+2 -4) 📝 `Emby.Dlna/ConnectionManager/ControlHandler.cs` (+0 -2) ➕ `Emby.Dlna/ConnectionManager/IConnectionManager.cs` (+12 -0) 📝 `Emby.Dlna/ConnectionManager/ServiceActionListBuilder.cs` (+1 -3) 📝 `Emby.Dlna/ContentDirectory/ContentDirectoryService.cs` (+1 -2) 📝 `Emby.Dlna/ContentDirectory/ContentDirectoryXmlBuilder.cs` (+2 -4) ➕ `Emby.Dlna/ContentDirectory/IContentDirectory.cs` (+12 -0) 📝 `Emby.Dlna/ContentDirectory/ServerItem.cs` (+0 -2) 📝 `Emby.Dlna/ContentDirectory/ServiceActionListBuilder.cs` (+1 -1) 📝 `Emby.Dlna/DeviceIcon.cs` (+0 -0) 📝 `Emby.Dlna/DeviceService.cs` (+0 -0) 📝 `Emby.Dlna/Didl/DidlBuilder.cs` (+296 -33) 📝 `Emby.Dlna/Didl/Filter.cs` (+15 -2) 📝 `Emby.Dlna/Didl/StringWriterWithEncoding.cs` (+45 -5) _...and 80 more files_ </details> ### 📄 Description A staged rollout of this PR can be found here. https://github.com/jellyfin/jellyfin/pull/4124 https://github.com/jellyfin/jellyfin/pull/4125 #4404 #4138 #4137 #4136 https://github.com/jellyfin/jellyfin-web/pull/1979 Config Settings: ===== (Value in brackets is the default setting.) **LocalNetworkSubnets** (empty) : Defines local subnets, and is used by the DLNA subsystem. If blank, all the subnets of any private interfaces will be assumed to be the LAN. Interface names, descriptions and subnets can be specified, as well as exclusions (addresses beginning with !) usage: 10.0.0.0/8,!192.168.1.1 means 10.0.0.0/8 is in the LAN, but ignore traffic to/from 192.168.1.1 !eth1 means every interface but exclude the interface eth1. **LocalNetworkAddresses** (empty) : lists the interfaces that jellyfin binds to. Default is all interfaces. Interface names, descriptions and subnets can be specified, as well as exclusions (addresses starting with !) usage: 10.10.10.10 means listen only on 10.10.10.10 !eth1 means listen on every interface except eth1. The system intelligently selects the most appropriate interface, so it is possible to specify both internally and externally facing network adapters. dlna.xml advanced settings: (direct xml edit required) ==== **EnablePlayToTracing** (false) : If dlna debugging is enabled in conjunction to this, ssdp packet tracing is enabled. Warning: This has performance implications. **AutoCreatePlayToProfiles** (false) : Auto creates user DLNA profiles for customisation. system.xml advanced settings: (direct xml edit required) ==== **HDHomerunPortRange** (Random Port) : Specify a UDP port, or range of UDP ports that HDHomerun uses. **GatewayMonitorPeriod** (60 seconds) : How often the gateway is pinged to ensure it's operational. **EnableIPV6** (False) : Disable/enable IPv6 usage. **EnableIPV4** (True) : Disable/enable IPv4 usage. (Useful for IP6 testing). **AutoDiscovery** (true) : Enables/Disables network autodiscovery over udp port 7359. **AutoDiscoveryTracing** (false) : Enables tracing on jellyfin's autodiscovery. **UDPPortRange** (Any) : Port range to use for internal UDP ports. Can be fixed, or in a range. eg. 1024-2048 **TrustAllIP6Interfaces** (false) ; All IPv6 interfaces are deemed to be local. (See conversation at #3515.) **EnableMultiSocketBinding** (true) : System will use specific ip bound sockets. Autocalculated, but can be overridden. **UPnPCreateHttpPortMap** (false): Maps the HTTP port in addition to the HTTPS port on any network devices detected via uPNP (if active). Historically, uPnP has mapped both the HTTP and HTTP ports inbound. This is now no longer the case. **UDPSendCount** (2) : Sets the number of times each SSDP message is transmitted. **UDPSendDelay** (100) : Sets the delay between each group of SSDP messages. (in ms) **EnableSSDPTracing** (false) : If dlna debugging is enabled in conjunction to this, ssdp packet tracing is enabled. Warning: This has performance implications. **SSDPTracingFilter** (empty) : Used in conjunction with EnableSSDPTracing. Set to an IP address to filter logs to a specific address. **IgnoreVirtualInterfaces** (true): Ignores any interface that matches those in **VirtualInterfaceNames**. **VirtualInterfaceNames** (vEthernet*) : The name of the virtual interfaces to ignore. **PublishedServerUriBySubnet** (empty) : list of [subnets|interfaces]/[serverUri|host|ip] [port] values that replicate the --published-server-url command line argument, but on a per subnet basis, enabling. usage: The following mimics the --published-server-url option but only for external requests. ``` <PublishedServerUriBySubnet> <string>external=http://myjellyfin.org</string> </PublishedServerUriBySubnet> ``` The following causes any requests from the subnet defined by eth1 to respond with a hostname jellyfin.com ``` <PublishedServerUriBySubnet> <string>eth1=jellyfin.com </string> </PublishedServerUriBySubnet> ``` The following causes any requests from the subnet defined by eth1 to respond with a hostname jellyfin.com, and everything else to return the address http://jellyexternal.com ``` <PublishedServerUriBySubnet> <string>eth1=jellyfin.com</string> <string>remaining=http://jellyexternal.com</string> </PublishedServerUriBySubnet> ``` The following changes the url address dependant upon source request. ``` <PublishedServerUriBySubnet> <string>192.168.1.0/24=net1access:1270</string> <string>192.168.2.1/24=net2access</string> <string>external=jellyfinoutside</string> </PublishedServerUriBySubnet> ``` Logging ==== To enable debug logging, edit logging.default.json, and add ``` "Serilog": { "MinimumLevel": { "Override": { "Jellyfin.Networking" : "Debug", "Mono.Nat.Upnp.UpnpSearcher ": "Debug", "Emby.Dlna" : "Debug" ``` Retired settings ===== **BlastAliveMessages** - no longer valid. Try increasing UDPSendCount, if the server is not detected reliably by other UPnP devices on your network. However, be aware that this may exponentially increase network traffic. **SendOnlyMatchedHost** (false)- No longer valid. It causes SSDP replies to be sent to all subnets, not just the local ones. Docker image crobibero/jellyfin:3257 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 06:08:55 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#9811