Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
diegoreymendez committed Oct 31, 2024
1 parent 0287acb commit 5392154
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ final class NetworkProtectionTunnelController: TunnelController, TunnelSessionPr
// 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.
// protocolConfiguration.excludeLocalNetworks = settings.excludeLocalNetworks
protocolConfiguration.excludeLocalNetworks = false

return protocolConfiguration
}()
Expand Down Expand Up @@ -618,6 +618,8 @@ final class NetworkProtectionTunnelController: TunnelController, TunnelSessionPr
options[NetworkProtectionOptionKey.selectedEnvironment] = settings.selectedEnvironment.rawValue as NSString
options[NetworkProtectionOptionKey.selectedServer] = settings.selectedServer.stringValue as? NSString

options[NetworkProtectionOptionKey.excludeLocalNetworks] = NSNumber(value: settings.excludeLocalNetworks)

#if NETP_SYSTEM_EXTENSION
if let data = try? JSONEncoder().encode(settings.selectedLocation) {
options[NetworkProtectionOptionKey.selectedLocation] = NSData(data: data)
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo/Preferences/Model/VPNPreferencesModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ final class VPNPreferencesModel: ObservableObject {
@Published var excludeLocalNetworks: Bool {
didSet {
settings.excludeLocalNetworks = excludeLocalNetworks
Task {
/*Task {
try await vpnXPCClient.command(.restartAdapter)
}
}*/
}
}

Expand Down

0 comments on commit 5392154

Please sign in to comment.