dns: validate rule-set updates before commit

This commit is contained in:
世界
2026-04-02 00:24:16 +08:00
parent ca43d71152
commit bdfb344955
8 changed files with 470 additions and 762 deletions

View File

@@ -66,6 +66,10 @@ type RuleSet interface {
type RuleSetUpdateCallback func(it RuleSet)
type DNSRuleSetUpdateValidator interface {
ValidateRuleSetMetadataUpdate(tag string, metadata RuleSetMetadata) error
}
// ip_version is not a headless-rule item, so ContainsIPVersionRule is intentionally absent.
type RuleSetMetadata struct {
ContainsProcessRule bool