Skip to content

Commit

Permalink
Fix Clash rule provider did not trim domains and ip-cidrs
Browse files Browse the repository at this point in the history
  • Loading branch information
tindy2013 committed Jan 16, 2025
1 parent 6911937 commit 223d75a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/handler/interfaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ std::string getRuleset(RESPONSE_CALLBACK_ARGS)
output_content += " - '";
if(strLine[posb - 2] == 'X')
output_content += "+.";
output_content += strLine.substr(posb, pose);
output_content += trim(strLine.substr(posb, pose));
output_content += "'\n";
continue;
case 4:
Expand All @@ -233,7 +233,7 @@ std::string getRuleset(RESPONSE_CALLBACK_ARGS)
if(filterLine())
continue;
output_content += " - '";
output_content += strLine.substr(posb, pose);
output_content += trim(strLine.substr(posb, pose));
output_content += "'\n";
continue;
case 5:
Expand All @@ -243,7 +243,7 @@ std::string getRuleset(RESPONSE_CALLBACK_ARGS)
continue;
if(strLine[posb - 2] == 'X')
output_content += '.';
output_content += strLine.substr(posb, pose);
output_content += trim(strLine.substr(posb, pose));
output_content += '\n';
continue;
case 6:
Expand Down

0 comments on commit 223d75a

Please sign in to comment.