Add internal private geoip rule

This commit is contained in:
世界
2022-07-03 15:57:09 +08:00
parent 70c0812606
commit dd56b2584b
2 changed files with 30 additions and 5 deletions

View File

@@ -71,7 +71,11 @@ func hasGeoRule(rules []option.Rule) bool {
}
func isGeoRule(rule option.DefaultRule) bool {
return len(rule.SourceGeoIP) > 0 || len(rule.GeoIP) > 0
return len(rule.SourceGeoIP) > 0 && common.Any(rule.SourceGeoIP, notPrivateNode) || len(rule.GeoIP) > 0 && common.Any(rule.GeoIP, notPrivateNode)
}
func notPrivateNode(code string) bool {
return code == "private"
}
func (r *Router) UpdateOutbounds(outbounds []adapter.Outbound) {