1
0
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:
xishang0128
2024-03-29 13:43:11 +08:00
parent 11f0983e5c
commit 914bc8a3e9
2 changed files with 4 additions and 3 deletions

View File

@ -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:]