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:
世界 committed 2026-03-11 17:53:46 +08:00
1 parent efa6088884
commit f9fa896326
3 files changed
+14 -5

No files matched your search

@@ -28,6 +28,7 @@ public struct ProfileOverrideView: View {
FormToggle("No Default Route", """
By default, segment routing is used in `auto_route` instead of global routing.
If `<route_address/route_exclude_address>` exists in the configuration, this item will not take effect on the corresponding network (commonly used to resolve HomeKit compatibility issues).
On macOS, enabling this option will cause Internet Sharing to not work properly.
""", $autoRouteUseSubRangesByDefault) { newValue in
await SharedPreferences.autoRouteUseSubRangesByDefault.set(newValue)
await reloadService()