diff --git a/rule/logic/common.go b/rule/logic/common.go index 001447a4f..61dbe963c 100644 --- a/rule/logic/common.go +++ b/rule/logic/common.go @@ -5,6 +5,7 @@ import ( "github.com/Dreamacro/clash/common/collections" C "github.com/Dreamacro/clash/constant" RC "github.com/Dreamacro/clash/rule/common" + RP "github.com/Dreamacro/clash/rule/provider" "github.com/Dreamacro/clash/rule/ruleparser" "regexp" "strings" @@ -70,6 +71,9 @@ func parseRule(tp, payload string, params []string) (parsed C.Rule, parseErr err parsed, parseErr = NewOR(payload, "") case "NOT": parsed, parseErr = NewNOT(payload, "") + case "RULE-SET": + noResolve := RC.HasNoResolve(params) + parsed, parseErr = RP.NewRuleSet(payload, "", noResolve) default: parseErr = ruleparser.NewUnsupportedError(tp) } diff --git a/rule/ruleparser/ruleparser.go b/rule/ruleparser/ruleparser.go index aafa1e13f..c4bd7badd 100644 --- a/rule/ruleparser/ruleparser.go +++ b/rule/ruleparser/ruleparser.go @@ -62,6 +62,6 @@ func NewUnsupportedError(tp any) *UnsupportedError { } func IsUnsupported(err error) bool { - _, ok := err.(UnsupportedError) + _, ok := err.(*UnsupportedError) return ok }