Enhancements

Fix compiler warnings.
Add group type fallback when only one node is found for an auto group in Quantumult(X) configuration.
Tweak default Emoji rules.
Optimize codes.
This commit is contained in:
Tindy X committed 2020-03-22 23:33:14 +08:00
1 parent 69847d1043
commit cb218b6329
3 files changed
+40 -12

No files matched your search

+8
View File
@@ -1236,6 +1236,7 @@ std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, s
return std::move(a) + "," + std::move(b);
});
ini.Set("{NONAME}", vArray[0] + " = " + proxy); //insert order
continue;
default:
continue;
}
@@ -1681,6 +1682,9 @@ void netchToQuan(std::vector<nodeInfo> &nodes, INIReader &ini, std::vector<rules
return std::move(a) + "\n" + std::move(b);
});
if(filtered_nodelist.size() < 2) // force groups with 1 node to be static
type = "static";
singlegroup = name + " : " + type;
if(type == "static")
singlegroup += ", " + filtered_nodelist[0];
@@ -1897,6 +1901,9 @@ void netchToQuanX(std::vector<nodeInfo> &nodes, INIReader &ini, std::vector<rule
}
}
if(filtered_nodelist.size() < 2) // force groups with 1 node to be static
type = "static";
proxies = std::accumulate(std::next(filtered_nodelist.begin()), filtered_nodelist.end(), filtered_nodelist[0], [](std::string a, std::string b)
{
return std::move(a) + ", " + std::move(b);
@@ -2399,6 +2406,7 @@ std::string netchToLoon(std::vector<nodeInfo> &nodes, std::string &base_conf, st
return std::move(a) + "," + std::move(b);
});
ini.Set("{NONAME}", vArray[0] + " = " + proxy); //insert order
continue;
default:
continue;
}