From b3ea72de6ee23e21d059798e68c01e08f34cb023 Mon Sep 17 00:00:00 2001 From: Kenneth Date: Tue, 3 Oct 2023 05:25:16 -0500 Subject: [PATCH] UDP is not supported yet in clash when using snell. (#627) * fix surge obfs-host empty error * fix comma error * UDP is not supported for clash when using snell * fix brace warning --- src/generator/config/subexport.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/generator/config/subexport.cpp b/src/generator/config/subexport.cpp index 59d4413..434a177 100644 --- a/src/generator/config/subexport.cpp +++ b/src/generator/config/subexport.cpp @@ -448,7 +448,9 @@ void proxyToClash(std::vector &nodes, YAML::Node &yamlnode, const ProxyGr continue; } - if(udp) + // UDP is not supported yet in clash using snell + // sees in https://dreamacro.github.io/clash/configuration/outbound.html#snell + if(udp && x.Type != ProxyType::Snell) singleproxy["udp"] = true; if(block) singleproxy.SetStyle(YAML::EmitterStyle::Block); @@ -759,9 +761,11 @@ std::string proxyToSurge(std::vector &nodes, const std::string &base_conf case ProxyType::Snell: proxy = "snell, " + hostname + ", " + port + ", psk=" + password; if(!obfs.empty()) + { proxy += ", obfs=" + obfs; if(!host.empty()) proxy += ", obfs-host=" + host; + } break; default: continue;