[client] Mirror v4 exit selection onto v6 pair and honour SkipAutoApply per route (#6150)

This commit is contained in:
Viktor Liu
2026-05-15 23:58:47 +09:00
committed by GitHub
parent 07e5450117
commit 2ccae7ec47
4 changed files with 197 additions and 33 deletions

View File

@@ -193,7 +193,15 @@ func getOverlappingNetworks(routes []*proto.Network) []*proto.Network {
}
func isDefaultRoute(routeRange string) bool {
return routeRange == "0.0.0.0/0" || routeRange == "::/0"
// routeRange is the merged display string from the daemon, e.g. "0.0.0.0/0",
// "::/0", or "0.0.0.0/0, ::/0" when a v4 exit node has a paired v6 entry.
for _, part := range strings.Split(routeRange, ",") {
switch strings.TrimSpace(part) {
case "0.0.0.0/0", "::/0":
return true
}
}
return false
}
func getExitNodeNetworks(routes []*proto.Network) []*proto.Network {