Skip to content

Commit

Permalink
Fix some rules not working in sing-box configs
Browse files Browse the repository at this point in the history
  • Loading branch information
tindy2013 committed Nov 10, 2023
1 parent 4620873 commit d08426a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/generator/config/ruleconvert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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")
{
Expand Down

0 comments on commit d08426a

Please sign in to comment.