Enhancements

Fix bad conversion of DOMAIN-SUFFIX rules when generating Surge DOMAIN-SET. (#667)
Optimize codes.
This commit is contained in:
Tindy X committed 2023-11-27 00:09:25 +08:00
1 parent c3524d04d7
commit 05a542c4f1
6 files changed
+57 -12

No files matched your search

+4
View File
@@ -244,6 +244,8 @@ std::string getRuleset(RESPONSE_CALLBACK_ARGS)
continue;
if(filterLine())
continue;
if(strLine[posb - 2] == 'X')
output_content += '.';
output_content += strLine.substr(posb, pose);
output_content += '\n';
continue;
@@ -251,6 +253,8 @@ std::string getRuleset(RESPONSE_CALLBACK_ARGS)
if(!std::any_of(ClashRuleTypes.begin(), ClashRuleTypes.end(), [&strLine](const std::string& type){return startsWith(strLine, type);}))
continue;
output_content += " - ";
default:
break;
}
lineSize = strLine.size();