diff --git a/Emby.Server.Implementations/ApplicationHost.cs b/Emby.Server.Implementations/ApplicationHost.cs index 8dc54ecfb2..dd90a89505 100644 --- a/Emby.Server.Implementations/ApplicationHost.cs +++ b/Emby.Server.Implementations/ApplicationHost.cs @@ -475,8 +475,8 @@ namespace Emby.Server.Implementations } var networkConfiguration = ConfigurationManager.GetNetworkConfiguration(); - HttpPort = networkConfiguration.ServerPortNumberHttp; - HttpsPort = networkConfiguration.ServerPortNumberHttps; + HttpPort = networkConfiguration.InternalHttpPort; + HttpsPort = networkConfiguration.InternalHttpsPort; // Safeguard against invalid configuration if (HttpPort == HttpsPort) @@ -785,8 +785,8 @@ namespace Emby.Server.Implementations if (HttpPort != 0 && HttpsPort != 0) { // Need to restart if ports have changed - if (networkConfiguration.ServerPortNumberHttp != HttpPort - || networkConfiguration.ServerPortNumberHttps != HttpsPort) + if (networkConfiguration.InternalHttpPort != HttpPort + || networkConfiguration.InternalHttpsPort != HttpsPort) { if (ConfigurationManager.Configuration.IsPortAuthorized) { diff --git a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs index 6e23c5f46d..d6da597b8b 100644 --- a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs +++ b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs @@ -57,8 +57,8 @@ namespace Emby.Server.Implementations.EntryPoints return new StringBuilder(32) .Append(config.EnableUPnP).Append(Separator) - .Append(config.PublicPortHttp).Append(Separator) - .Append(config.PublicPortHttps).Append(Separator) + .Append(config.PublicHttpPort).Append(Separator) + .Append(config.PublicHttpsPort).Append(Separator) .Append(_appHost.HttpPort).Append(Separator) .Append(_appHost.HttpsPort).Append(Separator) .Append(_appHost.ListenWithHttps).Append(Separator) @@ -146,11 +146,11 @@ namespace Emby.Server.Implementations.EntryPoints private IEnumerable CreatePortMaps(INatDevice device) { var config = _config.GetNetworkConfiguration(); - yield return CreatePortMap(device, _appHost.HttpPort, config.PublicPortHttp); + yield return CreatePortMap(device, _appHost.HttpPort, config.PublicHttpPort); if (_appHost.ListenWithHttps) { - yield return CreatePortMap(device, _appHost.HttpsPort, config.PublicPortHttps); + yield return CreatePortMap(device, _appHost.HttpsPort, config.PublicHttpsPort); } } diff --git a/Jellyfin.Networking/Configuration/NetworkConfiguration.cs b/Jellyfin.Networking/Configuration/NetworkConfiguration.cs index 90c7718ce2..573c36be79 100644 --- a/Jellyfin.Networking/Configuration/NetworkConfiguration.cs +++ b/Jellyfin.Networking/Configuration/NetworkConfiguration.cs @@ -10,12 +10,12 @@ namespace Jellyfin.Networking.Configuration public class NetworkConfiguration { /// - /// The default value for . + /// The default value for . /// public const int DefaultHttpPort = 8096; /// - /// The default value for and . + /// The default value for and . /// public const int DefaultHttpsPort = 8920; @@ -79,28 +79,28 @@ namespace Jellyfin.Networking.Configuration public string CertificatePassword { get; set; } = string.Empty; /// - /// Gets or sets the HTTP server port number. + /// Gets or sets the internal HTTP server port. /// - /// The HTTP server port number. - public int ServerPortNumberHttp { get; set; } = DefaultHttpPort; + /// The HTTP server port. + public int InternalHttpPort { get; set; } = DefaultHttpPort; /// - /// Gets or sets the HTTPS server port number. + /// Gets or sets the internal HTTPS server port. /// - /// The HTTPS server port number. - public int ServerPortNumberHttps { get; set; } = DefaultHttpsPort; + /// The HTTPS server port. + public int InternalHttpsPort { get; set; } = DefaultHttpsPort; /// - /// Gets or sets the public mapped port. + /// Gets or sets the public HTTP port. /// - /// The public mapped port. - public int PublicPortHttp { get; set; } = DefaultHttpPort; + /// The public HTTP port. + public int PublicHttpPort { get; set; } = DefaultHttpPort; /// /// Gets or sets the public HTTPS port. /// /// The public HTTPS port. - public int PublicPortHttps { get; set; } = DefaultHttpsPort; + public int PublicHttpsPort { get; set; } = DefaultHttpsPort; /// /// Gets or sets a value indicating whether Autodiscovery is enabled. diff --git a/Jellyfin.Server/Migrations/PreStartupRoutines/MigrateNetworkConfiguration.cs b/Jellyfin.Server/Migrations/PreStartupRoutines/MigrateNetworkConfiguration.cs index afcf5436c2..3b32e60437 100644 --- a/Jellyfin.Server/Migrations/PreStartupRoutines/MigrateNetworkConfiguration.cs +++ b/Jellyfin.Server/Migrations/PreStartupRoutines/MigrateNetworkConfiguration.cs @@ -57,17 +57,17 @@ public class MigrateNetworkConfiguration : IMigrationRoutine networkConfiguration.EnableRemoteAccess = oldNetworkConfiguration.EnableRemoteAccess; networkConfiguration.EnableUPnP = oldNetworkConfiguration.EnableUPnP; networkConfiguration.IgnoreVirtualInterfaces = oldNetworkConfiguration.IgnoreVirtualInterfaces; + networkConfiguration.InternalHttpPort = oldNetworkConfiguration.HttpServerPortNumber; + networkConfiguration.InternalHttpsPort = oldNetworkConfiguration.HttpsPortNumber; networkConfiguration.IsRemoteIPFilterBlacklist = oldNetworkConfiguration.IsRemoteIPFilterBlacklist; networkConfiguration.KnownProxies = oldNetworkConfiguration.KnownProxies; networkConfiguration.LocalNetworkAddresses = oldNetworkConfiguration.LocalNetworkAddresses; networkConfiguration.LocalNetworkSubnets = oldNetworkConfiguration.LocalNetworkSubnets; - networkConfiguration.PublicPortHttp = oldNetworkConfiguration.PublicPort; - networkConfiguration.PublicPortHttps = oldNetworkConfiguration.PublicHttpsPort; + networkConfiguration.PublicHttpPort = oldNetworkConfiguration.PublicPort; + networkConfiguration.PublicHttpsPort = oldNetworkConfiguration.PublicHttpsPort; networkConfiguration.PublishedServerUriBySubnet = oldNetworkConfiguration.PublishedServerUriBySubnet; networkConfiguration.RemoteIPFilter = oldNetworkConfiguration.RemoteIPFilter; networkConfiguration.RequireHttps = oldNetworkConfiguration.RequireHttps; - networkConfiguration.ServerPortNumberHttp = oldNetworkConfiguration.HttpServerPortNumber; - networkConfiguration.ServerPortNumberHttps = oldNetworkConfiguration.HttpsPortNumber; // Migrate old virtual interface name schema var oldVirtualInterfaceNames = oldNetworkConfiguration.VirtualInterfaceNames;