mirror of https://github.com/M66B/NetGuard.git
parent
c4cf6bf7b2
commit
9b224314eb
|
@ -513,7 +513,7 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
|
||||||
showAccessNotification(packet.uid);
|
showAccessNotification(packet.uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (packet.uid < 0)
|
if (packet.uid < 0 && packet.dport != 53)
|
||||||
Log.w(TAG, "Unknown application packet " + packet);
|
Log.w(TAG, "Unknown application packet " + packet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1191,13 +1191,8 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
|
||||||
|
|
||||||
packet.allowed = false;
|
packet.allowed = false;
|
||||||
if (prefs.getBoolean("filter", false)) {
|
if (prefs.getBoolean("filter", false)) {
|
||||||
// https://android.googlesource.com/platform/system/core/+/master/include/private/android_filesystem_config.h
|
if (packet.uid < 0) // unknown
|
||||||
if (packet.uid < 2000 &&
|
packet.allowed = true;
|
||||||
!(packet.uid == 0 || // root
|
|
||||||
packet.uid == 1000 || // system server
|
|
||||||
packet.uid == 1001 || // telephony subsystem
|
|
||||||
packet.uid == 1013)) // mediaserver
|
|
||||||
packet.allowed = true; // allow unknown traffic
|
|
||||||
else {
|
else {
|
||||||
boolean filtered = false;
|
boolean filtered = false;
|
||||||
// Only TCP (6) and UDP (17) have port numbers
|
// Only TCP (6) and UDP (17) have port numbers
|
||||||
|
|
Loading…
Reference in New Issue