From d08426a53ea453b40718f933421a59dec6133827 Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Fri, 10 Nov 2023 21:20:54 +0800 Subject: [PATCH] Fix some rules not working in sing-box configs --- src/generator/config/ruleconvert.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/generator/config/ruleconvert.cpp b/src/generator/config/ruleconvert.cpp index 256f4dfa5..d9d48664f 100644 --- a/src/generator/config/ruleconvert.cpp +++ b/src/generator/config/ruleconvert.cpp @@ -462,12 +462,12 @@ static rapidjson::Value transformRuleToSingBox(const std::string& rule, const st auto args = split(rule, ","); if (args.size() < 2) return rapidjson::Value(rapidjson::kObjectType); auto type = toLower(std::string(args[0])); - auto value = args[1]; + auto value = toLower(args[1]); // std::string_view option; // if (args.size() >= 3) option = args[2]; rapidjson::Value rule_obj(rapidjson::kObjectType); - type = replaceAllDistinct(toLower(type), "-", "_"); + type = replaceAllDistinct(type, "-", "_"); type = replaceAllDistinct(type, "ip_cidr6", "ip_cidr"); if (type == "match" || type == "final") {