From cb15d568c05a356b69e54842dc31e131609e0458 Mon Sep 17 00:00:00 2001 From: Chi Zhang Date: Wed, 3 Apr 2024 20:15:35 +1100 Subject: [PATCH] Fix missing classical rulesets when exporting Clash configs with expand=false (#715) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 尝试修正缺少RULE-SET问题 --- src/generator/template/templates.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/generator/template/templates.cpp b/src/generator/template/templates.cpp index 7bbea8d23..75ed31ac9 100644 --- a/src/generator/template/templates.cpp +++ b/src/generator/template/templates.cpp @@ -474,6 +474,8 @@ int renderClashScript(YAML::Node &base_rule, std::vector &rulese else rules.emplace_back("RULE-SET," + rule_name + "_ipcidr," + rule_group); } + if(!has_domain[rule_name] && !has_ipcidr[rule_name] && !script) + rules.emplace_back("RULE-SET," + rule_name + "," + rule_group); if(std::find(groups.begin(), groups.end(), rule_name) == groups.end()) groups.emplace_back(rule_name); }