fix: IPv6 prefixes not recognized as proxy https://github.com/jellyfin/jellyfin/issues/15710

This commit is contained in:
dwandw
2026-04-21 02:27:11 +00:00
parent 8b94722110
commit 9962fbbe2e
3 changed files with 10 additions and 9 deletions

View File

@@ -23,8 +23,8 @@ namespace Jellyfin.Server.Tests
true,
true,
new string[] { "192.168.t", "127.0.0.1", "::1", "1234.1232.12.1234" },
new IPAddress[] { IPAddress.Loopback },
new IPNetwork[] { new IPNetwork(IPAddress.IPv6Loopback, 128) });
new IPAddress[] { IPAddress.Loopback, IPAddress.IPv6Loopback },
Array.Empty<IPNetwork>());
data.Add(
true,
@@ -37,8 +37,8 @@ namespace Jellyfin.Server.Tests
true,
true,
new string[] { "::1" },
Array.Empty<IPAddress>(),
new IPNetwork[] { new IPNetwork(IPAddress.IPv6Loopback, 128) });
new IPAddress[] { IPAddress.IPv6Loopback },
Array.Empty<IPNetwork>());
data.Add(
false,
@@ -58,15 +58,15 @@ namespace Jellyfin.Server.Tests
false,
true,
new string[] { "localhost" },
Array.Empty<IPAddress>(),
new IPNetwork[] { new IPNetwork(IPAddress.IPv6Loopback, 128) });
new IPAddress[] { IPAddress.IPv6Loopback },
Array.Empty<IPNetwork>());
data.Add(
true,
true,
new string[] { "localhost" },
new IPAddress[] { IPAddress.Loopback },
new IPNetwork[] { new IPNetwork(IPAddress.IPv6Loopback, 128) });
new IPAddress[] { IPAddress.Loopback, IPAddress.IPv6Loopback },
Array.Empty<IPNetwork>());
return data;
}