Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
user 的分流 添加 对应的配置
Browse files Browse the repository at this point in the history
  • Loading branch information
e1732a364fed committed May 12, 2022
1 parent 3bc3540 commit 10f7db9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions netLayer/route_conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 10f7db9

Please sign in to comment.