mirror of https://github.com/M66B/NetGuard.git
Always allow self
This commit is contained in:
parent
477a624682
commit
af5796f220
|
@ -1345,7 +1345,12 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
||||||
builder.setMtu(mtu);
|
builder.setMtu(mtu);
|
||||||
|
|
||||||
// Add list of allowed applications
|
// Add list of allowed applications
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||||
|
try {
|
||||||
|
builder.addDisallowedApplication(getPackageName());
|
||||||
|
} catch (PackageManager.NameNotFoundException ex) {
|
||||||
|
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
||||||
|
}
|
||||||
if (last_connected && !filter)
|
if (last_connected && !filter)
|
||||||
for (Rule rule : listAllowed)
|
for (Rule rule : listAllowed)
|
||||||
try {
|
try {
|
||||||
|
@ -1353,12 +1358,7 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
||||||
} catch (PackageManager.NameNotFoundException ex) {
|
} catch (PackageManager.NameNotFoundException ex) {
|
||||||
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
||||||
}
|
}
|
||||||
else if (filter) {
|
else if (filter)
|
||||||
try {
|
|
||||||
builder.addDisallowedApplication(getPackageName());
|
|
||||||
} catch (PackageManager.NameNotFoundException ex) {
|
|
||||||
Log.e(TAG, ex.toString() + "\n" + Log.getStackTraceString(ex));
|
|
||||||
}
|
|
||||||
for (Rule rule : listRule)
|
for (Rule rule : listRule)
|
||||||
if (!rule.apply || (!system && rule.system))
|
if (!rule.apply || (!system && rule.system))
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue