Fix Packet Tunnel options not working

This commit is contained in:
世界
2026-03-05 18:43:04 +08:00
parent 80c866861d
commit c8199ca3da
4 changed files with 51 additions and 17 deletions
+7 -1
View File
@@ -145,8 +145,14 @@ public class ExtensionProfile: ObservableObject {
if let protocolConfiguration = manager.protocolConfiguration {
let includeAllNetworks = await SharedPreferences.includeAllNetworks.get()
protocolConfiguration.includeAllNetworks = includeAllNetworks
protocolConfiguration.excludeLocalNetworks = await SharedPreferences.excludeLocalNetworks.get()
protocolConfiguration.enforceRoutes = await SharedPreferences.enforceRoutes.get()
if #available(iOS 16.4, macOS 13.3, *) {
protocolConfiguration.excludeCellularServices = !includeAllNetworks
protocolConfiguration.excludeAPNs = await SharedPreferences.excludeAPNs.get()
protocolConfiguration.excludeCellularServices = await SharedPreferences.excludeCellularServices.get()
}
if #available(iOS 17.4, macOS 14.4, *) {
protocolConfiguration.excludeDeviceCommunication = await SharedPreferences.excludeDeviceCommunication.get()
}
}
#endif