mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
Support icon-url in Surge Proxy Groups
This commit is contained in:
parent
c2610a3804
commit
e1c0b95388
@ -980,7 +980,9 @@ std::string proxyToSurge(std::vector<Proxy> &nodes, const std::string &base_conf
|
|||||||
if(ext.nodelist)
|
if(ext.nodelist)
|
||||||
return output_nodelist;
|
return output_nodelist;
|
||||||
|
|
||||||
|
string_multimap original_groups;
|
||||||
ini.set_current_section("Proxy Group");
|
ini.set_current_section("Proxy Group");
|
||||||
|
ini.get_items(original_groups);
|
||||||
ini.erase_section();
|
ini.erase_section();
|
||||||
for(const ProxyGroupConfig &x : extra_proxy_group)
|
for(const ProxyGroupConfig &x : extra_proxy_group)
|
||||||
{
|
{
|
||||||
@ -1041,6 +1043,18 @@ std::string proxyToSurge(std::vector<Proxy> &nodes, const std::string &base_conf
|
|||||||
group += ",evaluate-before-use=" + x.EvaluateBeforeUse.get_str();
|
group += ",evaluate-before-use=" + x.EvaluateBeforeUse.get_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto iter = original_groups.find(x.Name);
|
||||||
|
if(iter != original_groups.end())
|
||||||
|
{
|
||||||
|
string_array vArray = split(iter->second, ",");
|
||||||
|
if(vArray.size() > 1)
|
||||||
|
{
|
||||||
|
std::string content = trim(vArray[vArray.size() - 1]);
|
||||||
|
if(content.find("icon-url") == 0)
|
||||||
|
group += content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ini.set("{NONAME}", x.Name + " = " + group); //insert order
|
ini.set("{NONAME}", x.Name + " = " + group); //insert order
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user