Geodata strmatcher: Restore lenient Type.New(Domain) behavior (#5989)

https://github.com/XTLS/Xray-core/pull/5989#issuecomment-4288238360

Fixes https://github.com/XTLS/Xray-core/issues/5986#issuecomment-4288010800

---------

Co-authored-by: Meow <197331664+Meo597@users.noreply.github.com>
This commit is contained in:
7. Sun
2026-04-25 18:08:23 +01:00
committed by GitHub
parent 454c930d13
commit 1a14ffcec6

View File

@@ -100,10 +100,6 @@ func (t Type) New(pattern string) (Matcher, error) {
case Substr: case Substr:
return SubstrMatcher(pattern), nil return SubstrMatcher(pattern), nil
case Domain: case Domain:
pattern, err := ToDomain(pattern)
if err != nil {
return nil, err
}
return DomainMatcher(pattern), nil return DomainMatcher(pattern), nil
case Regex: // 1. regex matching is case-sensitive case Regex: // 1. regex matching is case-sensitive
regex, err := regexp.Compile(pattern) regex, err := regexp.Compile(pattern)