mirror of https://github.com/M66B/NetGuard.git
Fallback to system DNS
This commit is contained in:
parent
c74455c4b6
commit
e8ba6e24f5
|
@ -670,7 +670,12 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
|
|||
String sysDns = Util.getDefaultDNS(SinkholeService.this);
|
||||
String vpnDns = prefs.getString("dns", sysDns);
|
||||
Log.i(TAG, "DNS system=" + sysDns + " VPN=" + vpnDns);
|
||||
builder.addDnsServer(vpnDns);
|
||||
try {
|
||||
builder.addDnsServer(vpnDns);
|
||||
} catch (Throwable ex) {
|
||||
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
||||
builder.addDnsServer(sysDns);
|
||||
}
|
||||
}
|
||||
|
||||
if (tethering) {
|
||||
|
|
Loading…
Reference in New Issue