1
0
Fork 0
mirror of https://github.com/M66B/NetGuard.git synced 2025-03-06 11:49:00 +00:00

Check for private DNS when filtering

This commit is contained in:
M66B 2019-10-29 08:54:33 +01:00
parent f09b285ff9
commit ce9a37c00a

View file

@ -212,6 +212,13 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
return;
}
boolean filter = prefs.getBoolean("filter", false);
if (filter && Util.isPrivateDns(ActivityMain.this)) {
swEnabled.setChecked(false);
Toast.makeText(ActivityMain.this, R.string.msg_private_dns, Toast.LENGTH_LONG).show();
return;
}
try {
final Intent prepare = VpnService.prepare(ActivityMain.this);
if (prepare == null) {