mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-01-02 15:36:41 -05:00
Apply domain selector choice
This commit is contained in:
parent
837d5e7618
commit
9d653dc708
@ -69,11 +69,21 @@ func (rr *RoutingRule) BuildCondition() (Condition, error) {
|
||||
conds := NewConditionChan()
|
||||
|
||||
if len(rr.Domain) > 0 {
|
||||
matcher, err := NewACAutomatonDomainMatcher(rr.Domain)
|
||||
if err != nil {
|
||||
return nil, newError("failed to build domain condition").Base(err)
|
||||
switch rr.DomainMatcher {
|
||||
case "ac":
|
||||
matcher, err := NewACAutomatonDomainMatcher(rr.Domain)
|
||||
if err != nil {
|
||||
return nil, newError("failed to build domain condition").Base(err)
|
||||
}
|
||||
conds.Add(matcher)
|
||||
default:
|
||||
matcher, err := NewDomainMatcher(rr.Domain)
|
||||
if err != nil {
|
||||
return nil, newError("failed to build domain condition").Base(err)
|
||||
}
|
||||
conds.Add(matcher)
|
||||
}
|
||||
conds.Add(matcher)
|
||||
|
||||
}
|
||||
|
||||
if len(rr.UserEmail) > 0 {
|
||||
|
Loading…
Reference in New Issue
Block a user