mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
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:
3 files changed
+40
-12
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user