mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-05-07 21:19:07 -04:00
Apply domain selector choice
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user