Enhancements

Fix compatibility with some non-standard Surge configurations.
Refactor Clash Rule generation to speed up the process.
Optimize codes.
This commit is contained in:
Tindy X committed 2020-03-21 15:25:21 +08:00
1 parent f496333ce0
commit 5d2bae1b32
5 files changed
+131 -108

No files matched your search

+3 -1
View File
@@ -1226,7 +1226,9 @@ bool explodeSurge(std::string surge, const std::string &custom_port, int local_p
for(auto &y : headers)
{
header = split(trim(y), ":");
if(regMatch(header[0], "(?i)host"))
if(header.size() != 2)
continue;
else if(regMatch(header[0], "(?i)host"))
host = trim_quote(header[1]);
else if(regMatch(header[0], "(?i)edge"))
edge = trim_quote(header[1]);