mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-25 05:06:45 +00:00
consider ip range 100.64.0.0/10 as local network addresses
This commit is contained in:
parent
96c88b7472
commit
3faf817148
1 changed files with 2 additions and 1 deletions
|
@ -35,6 +35,7 @@ public final class IpAddressMatcher {
|
|||
private static final IpAddressMatcher LOCAL_RANGE_1 = new IpAddressMatcher("10.0.0.0/8");
|
||||
private static final IpAddressMatcher LOCAL_RANGE_2 = new IpAddressMatcher("172.16.0.0/12");
|
||||
private static final IpAddressMatcher LOCAL_RANGE_3 = new IpAddressMatcher("192.168.0.0/16");
|
||||
private static final IpAddressMatcher LOCAL_RANGE_4 = new IpAddressMatcher("100.64.0.0/10");
|
||||
|
||||
private final int nMaskBits;
|
||||
private final InetAddress requiredAddress;
|
||||
|
@ -102,6 +103,6 @@ public final class IpAddressMatcher {
|
|||
}
|
||||
|
||||
public static boolean isLocalNetworkAddress(String address) {
|
||||
return "localhost".equals(address) || "127.0.0.1".equals(address) || LOCAL_RANGE_1.matches(address) || LOCAL_RANGE_2.matches(address) || LOCAL_RANGE_3.matches(address);
|
||||
return "localhost".equals(address) || "127.0.0.1".equals(address) || LOCAL_RANGE_1.matches(address) || LOCAL_RANGE_2.matches(address) || LOCAL_RANGE_3.matches(address) || LOCAL_RANGE_4.matches(address);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue