mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 02:02:24 +00:00
Enhancements
Fix not processing quotes in ws-headers in Surge VMess configurations. Fix when default_url is set and insert_url is not set in YAML configuration and access /sub without url argument, the nodes in default_url will be added twice. Add /version interface to compatible with some front-end.
This commit is contained in:
6 files changed
+39
-16
No files matched your search
+14
-8
@@ -387,21 +387,27 @@ void readYAMLConf(YAML::Node &node)
|
||||
{
|
||||
section["default_url"] >> tempArray;
|
||||
if(tempArray.size())
|
||||
strLine = std::accumulate(std::next(tempArray.begin()), tempArray.end(), tempArray[0], [](std::string a, std::string b)
|
||||
{
|
||||
return std::move(a) + "|" + std::move(b);
|
||||
});
|
||||
default_url = strLine;
|
||||
strLine = std::accumulate(std::next(tempArray.begin()), tempArray.end(), tempArray[0], [](std::string a, std::string b)
|
||||
{
|
||||
return std::move(a) + "|" + std::move(b);
|
||||
});
|
||||
default_url = strLine;
|
||||
eraseElements(tempArray);
|
||||
}
|
||||
}
|
||||
if(section["insert_url"].IsSequence())
|
||||
{
|
||||
section["insert_url"] >> tempArray;
|
||||
if(tempArray.size())
|
||||
strLine = std::accumulate(std::next(tempArray.begin()), tempArray.end(), tempArray[0], [](std::string a, std::string b)
|
||||
{
|
||||
return std::move(a) + "|" + std::move(b);
|
||||
});
|
||||
insert_url = strLine;
|
||||
strLine = std::accumulate(std::next(tempArray.begin()), tempArray.end(), tempArray[0], [](std::string a, std::string b)
|
||||
{
|
||||
return std::move(a) + "|" + std::move(b);
|
||||
});
|
||||
insert_url = strLine;
|
||||
eraseElements(tempArray);
|
||||
}
|
||||
}
|
||||
if(section["exclude_remarks"].IsSequence())
|
||||
section["exclude_remarks"] >> def_exclude_remarks;
|
||||
|
||||
Reference in new issue
Block a user