Add evaluate DNS rule action and related rule items

This commit is contained in:
nekohasekai
2026-04-07 20:02:32 +08:00
committed by 世界
parent 82d590a752
commit 144a3fbcd2
67 changed files with 5886 additions and 676 deletions
+4
View File
@@ -70,6 +70,10 @@ func NewRouter(ctx context.Context, logFactory log.Factory, options option.Route
func (r *Router) Initialize(rules []option.Rule, ruleSets []option.RuleSet) error {
for i, options := range rules {
err := R.ValidateNoNestedRuleActions(options)
if err != nil {
return E.Cause(err, "parse rule[", i, "]")
}
rule, err := R.NewRule(r.ctx, r.logger, options, false)
if err != nil {
return E.Cause(err, "parse rule[", i, "]")