mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +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:
2 files changed
+4
-1
No files matched your search
@@ -1325,7 +1325,7 @@ bool explodeSurge(std::string surge, const std::string &custom_port, int local_p
|
|||||||
switch(hash_(itemName))
|
switch(hash_(itemName))
|
||||||
{
|
{
|
||||||
case "method"_hash: method = itemVal; break;
|
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 "tag"_hash: remarks = itemVal; break;
|
||||||
case "ssr-protocol"_hash: protocol = itemVal; break;
|
case "ssr-protocol"_hash: protocol = itemVal; break;
|
||||||
case "ssr-protocol-param"_hash: protoparam = 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;
|
break;
|
||||||
case "url-test"_hash:
|
case "url-test"_hash:
|
||||||
case "fallback"_hash:
|
case "fallback"_hash:
|
||||||
|
case "load-balance"_hash:
|
||||||
if(rules_upper_bound < 5)
|
if(rules_upper_bound < 5)
|
||||||
continue;
|
continue;
|
||||||
rules_upper_bound -= 2;
|
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")
|
if(vArray[1] == "url-test" || vArray[1] == "fallback")
|
||||||
proxy += ",url=" + url + ",interval=" + std::to_string(interval);
|
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
|
ini.Set("{NONAME}", vArray[0] + " = " + proxy); //insert order
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user