diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2056a244..3efe95dd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/android/app/src/main/kotlin/com/hiddify/hiddify/bg/VPNService.kt b/android/app/src/main/kotlin/com/hiddify/hiddify/bg/VPNService.kt index 7830c1e2..50194472 100644 --- a/android/app/src/main/kotlin/com/hiddify/hiddify/bg/VPNService.kt +++ b/android/app/src/main/kotlin/com/hiddify/hiddify/bg/VPNService.kt @@ -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) { + } } } diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift index 94042bac..a4e2fca6 100644 --- a/macos/Runner/AppDelegate.swift +++ b/macos/Runner/AppDelegate.swift @@ -1,6 +1,7 @@ import Cocoa import FlutterMacOS +import UserNotifications @NSApplicationMain class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {