mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-08 14:13:22 +00:00
DomainMatcher: Prevent illegal domain rules from causing core startup failures (#5430)
Closes https://github.com/XTLS/Xray-core/issues/5429
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package strmatcher
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
@@ -44,7 +45,7 @@ func (t Type) New(pattern string) (Matcher, error) {
|
||||
pattern: r,
|
||||
}, nil
|
||||
default:
|
||||
panic("Unknown type")
|
||||
return nil, errors.New("unk type")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user