From 1a14ffcec6838ae03068824f44b497454370e58f Mon Sep 17 00:00:00 2001 From: "7. Sun" Date: Sat, 25 Apr 2026 18:08:23 +0100 Subject: [PATCH] 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> --- common/geodata/strmatcher/matchers.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/common/geodata/strmatcher/matchers.go b/common/geodata/strmatcher/matchers.go index 74360771..a9df9d6f 100644 --- a/common/geodata/strmatcher/matchers.go +++ b/common/geodata/strmatcher/matchers.go @@ -100,10 +100,6 @@ func (t Type) New(pattern string) (Matcher, error) { case Substr: return SubstrMatcher(pattern), nil case Domain: - pattern, err := ToDomain(pattern) - if err != nil { - return nil, err - } return DomainMatcher(pattern), nil case Regex: // 1. regex matching is case-sensitive regex, err := regexp.Compile(pattern)