mirror of
https://github.com/M66B/NetGuard.git
synced 2024-12-22 07:43:15 +00:00
Add standard DNS servers when removing local DNS servers
This commit is contained in:
parent
2e131bde1e
commit
0d0168aa34
1 changed files with 2 additions and 1 deletions
|
@ -1164,6 +1164,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
|||
}
|
||||
|
||||
// Remove local DNS servers when not routing LAN
|
||||
int count = listDns.size();
|
||||
boolean lan = prefs.getBoolean("lan", false);
|
||||
boolean use_hosts = prefs.getBoolean("use_hosts", false);
|
||||
if (lan && use_hosts && filter)
|
||||
|
@ -1199,7 +1200,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
|||
}
|
||||
|
||||
// Always set DNS servers
|
||||
if (listDns.size() == 0)
|
||||
if (listDns.size() == 0 || listDns.size() < count)
|
||||
try {
|
||||
listDns.add(InetAddress.getByName("8.8.8.8"));
|
||||
listDns.add(InetAddress.getByName("8.8.4.4"));
|
||||
|
|
Loading…
Reference in a new issue