mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-27 18:30:09 +00:00
Filter loopback and any local DNS addresses
This commit is contained in:
parent
6abf1a42ed
commit
256344c187
1 changed files with 2 additions and 1 deletions
|
@ -871,7 +871,8 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
|
|||
for (String def_dns : sysDns)
|
||||
try {
|
||||
InetAddress ddns = InetAddress.getByName(def_dns);
|
||||
if (!listDns.contains(ddns))
|
||||
if (!listDns.contains(ddns) &&
|
||||
!(ddns.isLoopbackAddress() || ddns.isAnyLocalAddress()))
|
||||
listDns.add(ddns);
|
||||
} catch (Throwable ignored) {
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue