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:
parent
f09b285ff9
commit
ce9a37c00a
1 changed files with 7 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue