Skip to content

Commit

Permalink
fix: incompatible clash config parse
Browse files Browse the repository at this point in the history
  • Loading branch information
lonelam committed Mar 23, 2024
1 parent 0a8f1a9 commit acd0a07
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/parser/subparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,21 @@ void hysteriaConstruct(
node.Ports = ports;
node.Protocol = protocol;
node.OBFSParam = obfs_protocol;
node.Up = up;
if (!up.empty())
{
if (up.find("bps") == up.length() - 3)
node.Up = up;
else if (to_int(up))
node.Up = up + " Mbps";
}
node.UpSpeed = to_int(up_speed);
node.Down = down;
if (!down.empty())
{
if (down.find("bps") == down.length() - 3)
node.Down = down;
else if (to_int(down))
node.Down = down + " Mbps";
}
node.DownSpeed = to_int(down_speed);
node.AuthStr = auth_str;
if (!auth.empty())
Expand Down

0 comments on commit acd0a07

Please sign in to comment.