From 3a39977253acf0b1d8903259fcf40ea8aaa1969b Mon Sep 17 00:00:00 2001 From: Tindy X <49061470+tindy2013@users.noreply.github.com> Date: Sat, 11 Jan 2020 16:21:59 +0800 Subject: [PATCH] Tweak filter_deprecated_nodes option --- src/subexport.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/subexport.cpp b/src/subexport.cpp index 722271e..03ea68d 100644 --- a/src/subexport.cpp +++ b/src/subexport.cpp @@ -581,16 +581,19 @@ void netchToClash(std::vector &nodes, YAML::Node &yamlnode, string_arr } else if(x.linkType == SPEEDTEST_MESSAGE_FOUNDSSR && clashR) { - //latest clash core removed support for chacha20 encryption - if(ext.filter_deprecated && method == "chacha20") - continue; - //ignoring all nodes with unsupported obfs and protocols + //ignoring all nodes with unsupported obfs, protocols and encryption protocol = GetMember(json, "Protocol"); - if(std::find(clashr_protocols.cbegin(), clashr_protocols.cend(), protocol) == clashr_protocols.cend()) - continue; obfs = GetMember(json, "OBFS"); - if(std::find(clashr_obfs.cbegin(), clashr_obfs.cend(), obfs) == clashr_obfs.cend()) - continue; + if(ext.filter_deprecated) + { + if(method == "chacha20") + continue; + if(std::find(clashr_protocols.cbegin(), clashr_protocols.cend(), protocol) == clashr_protocols.cend()) + continue; + if(std::find(clashr_obfs.cbegin(), clashr_obfs.cend(), obfs) == clashr_obfs.cend()) + continue; + } + protoparam = GetMember(json, "ProtocolParam"); obfsparam = GetMember(json, "OBFSParam"); singleproxy["type"] = "ssr";