Fix compatibility when parsing Clash ShadowsocksR nodes

This commit is contained in:
Tindy X committed 2020-08-01 00:04:19 +08:00
1 parent 2155833a4d
commit f6f28095d8
1 file changed
+8 -2
+8 -2
View File
@@ -1077,9 +1077,15 @@ void explodeClash(Node yamlnode, const std::string &custom_port, std::vector<nod
singleproxy["cipher"] >>= cipher;
singleproxy["password"] >>= password;
singleproxy["protocol"] >>= protocol;
singleproxy["protocolparam"] >>= protoparam;
singleproxy["obfs"] >>= obfs;
singleproxy["obfsparam"] >>= obfsparam;
if(singleproxy["protocol-param"].IsDefined())
singleproxy["protocol-param"] >>= protoparam;
else
singleproxy["protocolparam"] >>= protoparam;
if(singleproxy["obfs-param"].IsDefined())
singleproxy["obfs-param"] >>= obfsparam;
else
singleproxy["obfsparam"] >>= obfsparam;
node.linkType = SPEEDTEST_MESSAGE_FOUNDSSR;
node.proxyStr = ssrConstruct(group, ps, base64_encode(ps), server, port, protocol, cipher, obfs, password, obfsparam, protoparam, ssr_libev, udp, tfo, scv);