mirror of https://github.com/M66B/NetGuard.git
Allow unfiltered UDP traffic
This commit is contained in:
parent
b0c762d133
commit
086bc5e201
|
@ -1843,10 +1843,13 @@ public class ServiceSinkhole extends VpnService implements SharedPreferences.OnS
|
||||||
lock.readLock().lock();
|
lock.readLock().lock();
|
||||||
|
|
||||||
packet.allowed = false;
|
packet.allowed = false;
|
||||||
if (prefs.getBoolean("filter", false) &&
|
if (prefs.getBoolean("filter", false)) {
|
||||||
(packet.protocol != 17 || prefs.getBoolean("filter_udp", false))) {
|
|
||||||
// https://android.googlesource.com/platform/system/core/+/master/include/private/android_filesystem_config.h
|
// https://android.googlesource.com/platform/system/core/+/master/include/private/android_filesystem_config.h
|
||||||
if (packet.uid < 2000 &&
|
if (packet.protocol == 17 /* UDP */ && !prefs.getBoolean("filter_udp", false)) {
|
||||||
|
// Allow unfiltered UDP
|
||||||
|
packet.allowed = true;
|
||||||
|
Log.i(TAG, "Allowing UDP " + packet);
|
||||||
|
} else if (packet.uid < 2000 &&
|
||||||
!last_connected && isSupported(packet.protocol)) {
|
!last_connected && isSupported(packet.protocol)) {
|
||||||
// Allow system applications in disconnected state
|
// Allow system applications in disconnected state
|
||||||
packet.allowed = true;
|
packet.allowed = true;
|
||||||
|
|
Loading…
Reference in New Issue