fix: vpn service issue
This commit is contained in:
@@ -133,7 +133,7 @@ class VPNService : VpnService(), PlatformInterfaceWrapper {
|
||||
} catch (_: NameNotFoundException) {
|
||||
}
|
||||
}
|
||||
builder.addAllowedApplication(packageName)
|
||||
//builder.addAllowedApplication(packageName)
|
||||
} else {
|
||||
appList.forEach {
|
||||
try {
|
||||
@@ -141,6 +141,10 @@ class VPNService : VpnService(), PlatformInterfaceWrapper {
|
||||
} catch (_: NameNotFoundException) {
|
||||
}
|
||||
}
|
||||
try {
|
||||
builder.addDisallowedApplication(packageName)
|
||||
} catch (_: NameNotFoundException) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
val includePackage = options.includePackage
|
||||
@@ -152,7 +156,6 @@ class VPNService : VpnService(), PlatformInterfaceWrapper {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val excludePackage = options.excludePackage
|
||||
if (excludePackage.hasNext()) {
|
||||
while (excludePackage.hasNext()) {
|
||||
@@ -162,6 +165,10 @@ class VPNService : VpnService(), PlatformInterfaceWrapper {
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
builder.addDisallowedApplication(packageName)
|
||||
} catch (_: NameNotFoundException) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user