mirror of
https://github.com/snltty/linker.git
synced 2025-10-14 13:23:45 +08:00
sync
This commit is contained in:
@@ -79,11 +79,11 @@ namespace linker.plugins.tunnel
|
||||
{
|
||||
if (c.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
|
||||
{
|
||||
uint ip = BinaryPrimitives.ReadUInt32BigEndian(c.GetAddressBytes());
|
||||
uint ip = NetworkHelper.IP2Value(c);
|
||||
foreach (var item in excludeips)
|
||||
{
|
||||
uint maskValue = NetworkHelper.GetPrefixIP(item.Mask);
|
||||
uint ip1 = BinaryPrimitives.ReadUInt32BigEndian(item.IPAddress.GetAddressBytes());
|
||||
uint maskValue = NetworkHelper.PrefixLength2Value(item.Mask);
|
||||
uint ip1 = NetworkHelper.IP2Value(item.IPAddress);
|
||||
if ((ip & maskValue) == (ip1 & maskValue))
|
||||
{
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user