Add filter_deprecated_nodes flag to filter out nodes that are no longer supported by latest clients

This commit is contained in:
Tindy X committed 2020-01-05 18:54:00 +08:00
1 parent 5870ab2386
commit 15fab8f324
4 files changed
+11 -6

No files matched your search

+2 -2
View File
@@ -542,7 +542,7 @@ void netchToClash(std::vector<nodeInfo> &nodes, YAML::Node &yamlnode, string_arr
if(x.linkType == SPEEDTEST_MESSAGE_FOUNDSS)
{
//latest clash core removed support for chacha20 encryption
if(method == "chacha20")
if(ext.filter_deprecated && method == "chacha20")
continue;
plugin = GetMember(json, "Plugin");
pluginopts = replace_all_distinct(GetMember(json, "PluginOption"), ";", "&");
@@ -594,7 +594,7 @@ void netchToClash(std::vector<nodeInfo> &nodes, YAML::Node &yamlnode, string_arr
else if(x.linkType == SPEEDTEST_MESSAGE_FOUNDSSR && clashR)
{
//latest clash core removed support for chacha20 encryption
if(method == "chacha20")
if(ext.filter_deprecated && method == "chacha20")
continue;
//ignoring all nodes with unsupported obfs and protocols
protocol = GetMember(json, "Protocol");