mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-30 13:22:39 +00:00
Bugs fix
Fix not exporting load-balance group for Surge configurations. Fix password missing when parsing Quantumult X configurations.
This commit is contained in:
@@ -1325,7 +1325,7 @@ bool explodeSurge(std::string surge, const std::string &custom_port, int local_p
|
||||
switch(hash_(itemName))
|
||||
{
|
||||
case "method"_hash: method = itemVal; break;
|
||||
case "password"_hash: id = itemVal; break;
|
||||
case "password"_hash: password = itemVal; break;
|
||||
case "tag"_hash: remarks = itemVal; break;
|
||||
case "ssr-protocol"_hash: protocol = itemVal; break;
|
||||
case "ssr-protocol-param"_hash: protoparam = itemVal; break;
|
||||
|
||||
@@ -1221,6 +1221,7 @@ std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, s
|
||||
break;
|
||||
case "url-test"_hash:
|
||||
case "fallback"_hash:
|
||||
case "load-balance"_hash:
|
||||
if(rules_upper_bound < 5)
|
||||
continue;
|
||||
rules_upper_bound -= 2;
|
||||
@@ -1258,6 +1259,8 @@ std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, s
|
||||
});
|
||||
if(vArray[1] == "url-test" || vArray[1] == "fallback")
|
||||
proxy += ",url=" + url + ",interval=" + std::to_string(interval);
|
||||
else if(vArray[1] == "load-balance")
|
||||
proxy += ",url=" + url;
|
||||
|
||||
ini.Set("{NONAME}", vArray[0] + " = " + proxy); //insert order
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user