mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
More typos
This commit is contained in:
parent
9aec576c76
commit
cbca153132
@ -692,7 +692,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||||||
if (_remoteAddressFilter.Any() && !IsInLocalNetwork(remoteIP))
|
if (_remoteAddressFilter.Any() && !IsInLocalNetwork(remoteIP))
|
||||||
{
|
{
|
||||||
// remoteAddressFilter is a whitelist or blacklist.
|
// remoteAddressFilter is a whitelist or blacklist.
|
||||||
var matches = _remoteAddressFilter.Count(remoteNetwork => NetworkUtils.SubNetContainsAddress(remoteNetwork, remoteIP));
|
var matches = _remoteAddressFilter.Count(remoteNetwork => NetworkUtils.SubnetContainsAddress(remoteNetwork, remoteIP));
|
||||||
if ((!config.IsRemoteIPFilterBlacklist && matches > 0)
|
if ((!config.IsRemoteIPFilterBlacklist && matches > 0)
|
||||||
|| (config.IsRemoteIPFilterBlacklist && matches == 0))
|
|| (config.IsRemoteIPFilterBlacklist && matches == 0))
|
||||||
{
|
{
|
||||||
@ -863,7 +863,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||||||
// (For systems with multiple internal network cards, and multiple subnets)
|
// (For systems with multiple internal network cards, and multiple subnets)
|
||||||
foreach (var intf in availableInterfaces)
|
foreach (var intf in availableInterfaces)
|
||||||
{
|
{
|
||||||
if (NetworkUtils.SubNetContainsAddress(intf.Subnet, source))
|
if (NetworkUtils.SubnetContainsAddress(intf.Subnet, source))
|
||||||
{
|
{
|
||||||
result = NetworkUtils.FormatIPString(intf.Address);
|
result = NetworkUtils.FormatIPString(intf.Address);
|
||||||
_logger.LogDebug("{Source}: Found interface with matching subnet, using it as bind address: {Result}", source, result);
|
_logger.LogDebug("{Source}: Found interface with matching subnet, using it as bind address: {Result}", source, result);
|
||||||
@ -974,7 +974,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||||||
{
|
{
|
||||||
// Only use matching internal subnets
|
// Only use matching internal subnets
|
||||||
// Prefer more specific (bigger subnet prefix) overrides
|
// Prefer more specific (bigger subnet prefix) overrides
|
||||||
validPublishedServerUrls = _publishedServerUrls.Where(x => x.IsInternalOverride && NetworkUtils.SubNetContainsAddress(x.Data.Subnet, source))
|
validPublishedServerUrls = _publishedServerUrls.Where(x => x.IsInternalOverride && NetworkUtils.SubnetContainsAddress(x.Data.Subnet, source))
|
||||||
.OrderByDescending(x => x.Data.Subnet.PrefixLength)
|
.OrderByDescending(x => x.Data.Subnet.PrefixLength)
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
@ -982,7 +982,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||||||
{
|
{
|
||||||
// Only use matching external subnets
|
// Only use matching external subnets
|
||||||
// Prefer more specific (bigger subnet prefix) overrides
|
// Prefer more specific (bigger subnet prefix) overrides
|
||||||
validPublishedServerUrls = _publishedServerUrls.Where(x => x.IsExternalOverride && NetworkUtils.SubNetContainsAddress(x.Data.Subnet, source))
|
validPublishedServerUrls = _publishedServerUrls.Where(x => x.IsExternalOverride && NetworkUtils.SubnetContainsAddress(x.Data.Subnet, source))
|
||||||
.OrderByDescending(x => x.Data.Subnet.PrefixLength)
|
.OrderByDescending(x => x.Data.Subnet.PrefixLength)
|
||||||
.ToList();
|
.ToList();
|
||||||
}
|
}
|
||||||
@ -990,7 +990,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||||||
foreach (var data in validPublishedServerUrls)
|
foreach (var data in validPublishedServerUrls)
|
||||||
{
|
{
|
||||||
// Get interface matching override subnet
|
// Get interface matching override subnet
|
||||||
var intf = _interfaces.OrderBy(x => x.Index).FirstOrDefault(x => NetworkUtils.SubNetContainsAddress(data.Data.Subnet, x.Address));
|
var intf = _interfaces.OrderBy(x => x.Index).FirstOrDefault(x => NetworkUtils.SubnetContainsAddress(data.Data.Subnet, x.Address));
|
||||||
|
|
||||||
if (intf?.Address is not null
|
if (intf?.Address is not null
|
||||||
|| (data.Data.AddressFamily == AddressFamily.InterNetwork && data.Data.Address.Equals(IPAddress.Any))
|
|| (data.Data.AddressFamily == AddressFamily.InterNetwork && data.Data.Address.Equals(IPAddress.Any))
|
||||||
@ -1061,7 +1061,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||||||
// Check to see if any of the external bind interfaces are in the same subnet as the source.
|
// Check to see if any of the external bind interfaces are in the same subnet as the source.
|
||||||
// If none exists, this will select the first external interface if there is one.
|
// If none exists, this will select the first external interface if there is one.
|
||||||
bindAddress = externalInterfaces
|
bindAddress = externalInterfaces
|
||||||
.OrderByDescending(x => NetworkUtils.SubNetContainsAddress(x.Subnet, source))
|
.OrderByDescending(x => NetworkUtils.SubnetContainsAddress(x.Subnet, source))
|
||||||
.ThenByDescending(x => x.Subnet.PrefixLength)
|
.ThenByDescending(x => x.Subnet.PrefixLength)
|
||||||
.ThenBy(x => x.Index)
|
.ThenBy(x => x.Index)
|
||||||
.Select(x => x.Address)
|
.Select(x => x.Address)
|
||||||
@ -1079,7 +1079,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||||||
// Check to see if any of the internal bind interfaces are in the same subnet as the source.
|
// Check to see if any of the internal bind interfaces are in the same subnet as the source.
|
||||||
// If none exists, this will select the first internal interface if there is one.
|
// If none exists, this will select the first internal interface if there is one.
|
||||||
bindAddress = _interfaces.Where(x => IsInLocalNetwork(x.Address))
|
bindAddress = _interfaces.Where(x => IsInLocalNetwork(x.Address))
|
||||||
.OrderByDescending(x => NetworkUtils.SubNetContainsAddress(x.Subnet, source))
|
.OrderByDescending(x => NetworkUtils.SubnetContainsAddress(x.Subnet, source))
|
||||||
.ThenByDescending(x => x.Subnet.PrefixLength)
|
.ThenByDescending(x => x.Subnet.PrefixLength)
|
||||||
.ThenBy(x => x.Index)
|
.ThenBy(x => x.Index)
|
||||||
.Select(x => x.Address)
|
.Select(x => x.Address)
|
||||||
@ -1123,7 +1123,7 @@ public class NetworkManager : INetworkManager, IDisposable
|
|||||||
// (For systems with multiple network cards and/or multiple subnets)
|
// (For systems with multiple network cards and/or multiple subnets)
|
||||||
foreach (var intf in extResult)
|
foreach (var intf in extResult)
|
||||||
{
|
{
|
||||||
if (NetworkUtils.SubNetContainsAddress(intf.Subnet, source))
|
if (NetworkUtils.SubnetContainsAddress(intf.Subnet, source))
|
||||||
{
|
{
|
||||||
result = NetworkUtils.FormatIPString(intf.Address);
|
result = NetworkUtils.FormatIPString(intf.Address);
|
||||||
_logger.LogDebug("{Source}: Found external interface with matching subnet, using it as bind address: {Result}", source, result);
|
_logger.LogDebug("{Source}: Found external interface with matching subnet, using it as bind address: {Result}", source, result);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user