Always allow self

This commit is contained in:
M66B 2017-11-11 08:42:57 +01:00
parent 477a624682
commit af5796f220
1 changed files with 8 additions and 8 deletions

View File

@ -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 {