diff --git a/netLayer/route_conf.go b/netLayer/route_conf.go index be4dfae2..3c876dbe 100644 --- a/netLayer/route_conf.go +++ b/netLayer/route_conf.go @@ -16,6 +16,7 @@ type RuleConf struct { DialTag any `toml:"toTag"` InTags []string `toml:"fromTag"` + Users []string `toml:"user"` Countries []string `toml:"country"` // 如果类似 !CN, 则意味着专门匹配不为CN 的国家(目前还未实现) IPs []string `toml:"ip"` @@ -106,6 +107,10 @@ func LoadRuleForRouteSet(rule *RuleConf) (rs *RouteSet) { rs.InTags[t] = true } + for _, u := range rule.Users { + rs.Users[u] = true + } + //ip 过滤 需要 分辨 cidr 和普通ip for _, ipStr := range rule.IPs {