mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-22 01:57:12 -05:00
Move code to init
This commit is contained in:
parent
d3422597d6
commit
543478a01e
@ -37,9 +37,13 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
compiledMatchers []*RegexpDomainMatcher
|
||||
)
|
||||
|
||||
func init() {
|
||||
compiledMatchers = make([]*RegexpDomainMatcher, 0, 1024)
|
||||
|
||||
regexpDomains = []string{
|
||||
regexpDomains := []string{
|
||||
dotCn,
|
||||
|
||||
anySubDomain + "10010" + dotCom,
|
||||
@ -187,9 +191,7 @@ var (
|
||||
anySubDomain + "youku" + dotCom,
|
||||
anySubDomain + "zhihu" + dotCom,
|
||||
}
|
||||
)
|
||||
|
||||
func init() {
|
||||
for _, pattern := range regexpDomains {
|
||||
matcher, err := NewRegexpDomainMatcher(pattern)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user