diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index f4b7d823b2..6eb3c427ea 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -3864,7 +3864,6 @@ 7B25FE322AD12C990012AFAB /* NetworkProtectionMac */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = NetworkProtectionMac; sourceTree = ""; }; 7B2DDCF72A93A8BB0039D884 /* NetworkProtectionAppEvents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionAppEvents.swift; sourceTree = ""; }; 7B2E52242A5FEC09000C6D39 /* NetworkProtectionAgentNotificationsPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkProtectionAgentNotificationsPresenter.swift; sourceTree = ""; }; - 7B35BF1F2CD1091600879773 /* BrowserServicesKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = BrowserServicesKit; path = ../BrowserServicesKit; sourceTree = SOURCE_ROOT; }; 7B3618C12ADE75C8000D6154 /* NetworkProtectionNavBarPopoverManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionNavBarPopoverManager.swift; sourceTree = ""; }; 7B430EA02A71411A00BAC4A1 /* NetworkProtectionSimulateFailureMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionSimulateFailureMenu.swift; sourceTree = ""; }; 7B4C5CF42BE51D640007A164 /* VPNUninstallerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNUninstallerTests.swift; sourceTree = ""; }; @@ -5576,7 +5575,6 @@ 378E279C2970217400FCADA2 /* LocalPackages */ = { isa = PBXGroup; children = ( - 7B35BF1F2CD1091600879773 /* BrowserServicesKit */, 9D9DE5712C63A96400D20B15 /* AppKitExtensions */, 7B9167A82C09E88800322310 /* AppLauncher */, 378E279D2970217400FCADA2 /* BuildToolPlugins */, @@ -14428,7 +14426,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = revision; - revision = a817b6e2c205f56b4b1e86c5db27a75a44029101; + revision = 828754049a7115e0a607fb552d738e85ddc2124a; }; }; 9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 4ae3608817..dd712522a1 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -27,6 +27,14 @@ "version" : "3.0.0" } }, + { + "identity" : "browserserviceskit", + "kind" : "remoteSourceControl", + "location" : "https://github.com/duckduckgo/BrowserServicesKit", + "state" : { + "revision" : "a817b6e2c205f56b4b1e86c5db27a75a44029101" + } + }, { "identity" : "content-scope-scripts", "kind" : "remoteSourceControl", diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift index c86699e24a..6248185d96 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionTunnelController.swift @@ -296,8 +296,7 @@ final class NetworkProtectionTunnelController: TunnelController, TunnelSessionPr } private func handleSetExcludeLocalNetworks(_ excludeLocalNetworks: Bool) async throws { - guard let tunnelManager = await manager, - tunnelManager.protocolConfiguration?.excludeLocalNetworks == !excludeLocalNetworks else { + guard let tunnelManager = await manager else { return } @@ -361,10 +360,7 @@ final class NetworkProtectionTunnelController: TunnelController, TunnelSessionPr // this setting breaks Connection Tester protocolConfiguration.includeAllNetworks = settings.includeAllNetworks - // This is intentionally not used but left here for documentation purposes. - // The reason for this is that we want to have full control of the routes that - // are excluded, so instead of using this setting we're just configuring the - // excluded routes through our VPNSettings class, which our extension reads directly. + // This messes up the routing, so please keep it always disabled protocolConfiguration.excludeLocalNetworks = false return protocolConfiguration diff --git a/DuckDuckGo/Preferences/Model/VPNPreferencesModel.swift b/DuckDuckGo/Preferences/Model/VPNPreferencesModel.swift index 6e5e8c021c..fd841fcedf 100644 --- a/DuckDuckGo/Preferences/Model/VPNPreferencesModel.swift +++ b/DuckDuckGo/Preferences/Model/VPNPreferencesModel.swift @@ -39,9 +39,13 @@ final class VPNPreferencesModel: ObservableObject { @Published var excludeLocalNetworks: Bool { didSet { settings.excludeLocalNetworks = excludeLocalNetworks - /*Task { + + Task { + // We need to allow some time for the setting to propagate + // But ultimately this should actually be a user choice + try await Task.sleep(interval: 0.1) try await vpnXPCClient.command(.restartAdapter) - }*/ + } } }