1
0
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:
Shelikhoo 2021-03-03 22:27:23 +00:00
parent 837d5e7618
commit 9d653dc708
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316

View File

@ -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 {