fix: vpn service issue
This commit is contained in:
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
@@ -64,19 +64,19 @@ jobs:
|
||||
os: ubuntu-latest
|
||||
targets: apk
|
||||
|
||||
- platform: android-aab
|
||||
os: ubuntu-latest
|
||||
targets: aab
|
||||
# - platform: android-aab
|
||||
# os: ubuntu-latest
|
||||
# targets: aab
|
||||
|
||||
- platform: windows
|
||||
os: windows-2019
|
||||
aarch: amd64
|
||||
targets: exe,msix
|
||||
# - platform: windows
|
||||
# os: windows-2019
|
||||
# aarch: amd64
|
||||
# targets: exe,msix
|
||||
|
||||
- platform: linux
|
||||
os: ubuntu-22.04
|
||||
aarch: amd64
|
||||
targets: AppImage,deb,rpm
|
||||
# - platform: linux
|
||||
# os: ubuntu-22.04
|
||||
# aarch: amd64
|
||||
# targets: AppImage,deb,rpm
|
||||
|
||||
- platform: macos
|
||||
os: macos-13
|
||||
|
||||
@@ -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) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import Cocoa
|
||||
import FlutterMacOS
|
||||
|
||||
import UserNotifications
|
||||
@NSApplicationMain
|
||||
class AppDelegate: FlutterAppDelegate {
|
||||
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||
|
||||
Reference in New Issue
Block a user