From 9886c6a3259628a1871d8b876a19a3ea241c628c Mon Sep 17 00:00:00 2001 From: xchacha20-poly1305 Date: Fri, 15 Aug 2025 15:00:28 +0800 Subject: [PATCH] Fix rule set version --- option/rule_set.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/option/rule_set.go b/option/rule_set.go index 2775d743..fa839e35 100644 --- a/option/rule_set.go +++ b/option/rule_set.go @@ -258,7 +258,7 @@ func (r *PlainRuleSetCompat) UnmarshalJSON(bytes []byte) error { } var v any switch r.Version { - case C.RuleSetVersion1, C.RuleSetVersion2, C.RuleSetVersion3: + case C.RuleSetVersion1, C.RuleSetVersion2, C.RuleSetVersion3, C.RuleSetVersion4: v = &r.Options case 0: return E.New("missing rule-set version") @@ -275,7 +275,7 @@ func (r *PlainRuleSetCompat) UnmarshalJSON(bytes []byte) error { func (r PlainRuleSetCompat) Upgrade() (PlainRuleSet, error) { switch r.Version { - case C.RuleSetVersion1, C.RuleSetVersion2, C.RuleSetVersion3: + case C.RuleSetVersion1, C.RuleSetVersion2, C.RuleSetVersion3, C.RuleSetVersion4: default: return PlainRuleSet{}, E.New("unknown rule-set version: " + F.ToString(r.Version)) }