mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2025-09-19 12:06:01 +08:00
fix: Fix DOMAIN-REGEX
parsing
This commit is contained in:
@ -2,9 +2,10 @@ package provider
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
C "github.com/metacubex/mihomo/constant"
|
||||
"github.com/metacubex/mihomo/log"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type classicalStrategy struct {
|
||||
@ -76,7 +77,7 @@ func ruleParse(ruleRaw string) (string, string, []string) {
|
||||
} else if len(item) == 2 {
|
||||
return item[0], item[1], nil
|
||||
} else if len(item) > 2 {
|
||||
if item[0] == "NOT" || item[0] == "OR" || item[0] == "AND" || item[0] == "SUB-RULE" {
|
||||
if item[0] == "NOT" || item[0] == "OR" || item[0] == "AND" || item[0] == "SUB-RULE" || item[0] == "DOMAIN-REGEX" {
|
||||
return item[0], strings.Join(item[1:len(item)], ","), nil
|
||||
} else {
|
||||
return item[0], item[1], item[2:]
|
||||
|
Reference in New Issue
Block a user