Set DNS matchDomains when include routes have no default route
Without this, the system ignores the NE's DNS server when IPv4 include routes don't contain 0.0.0.0/0 (e.g. segment routing). Only applied conditionally to avoid breaking macOS Internet Sharing.
This commit is contained in:
@@ -146,6 +146,14 @@ public class ExtensionPlatformInterface: NSObject, LibboxPlatformInterfaceProtoc
|
||||
ipv6Settings.includedRoutes = ipv6Routes
|
||||
ipv6Settings.excludedRoutes = ipv6ExcludeRoutes
|
||||
settings.ipv6Settings = ipv6Settings
|
||||
|
||||
let hasDefaultRoute = ipv4Routes.contains(where: {
|
||||
$0.destinationAddress == "0.0.0.0" && $0.destinationSubnetMask == "0.0.0.0"
|
||||
})
|
||||
if !hasDefaultRoute {
|
||||
dnsSettings.matchDomains = [""]
|
||||
dnsSettings.matchDomainsNoSearch = true
|
||||
}
|
||||
}
|
||||
|
||||
if options.isHTTPProxyEnabled() {
|
||||
|
||||
Reference in New Issue
Block a user