From b84bd7d00bb0b9ae97c117f6be0c9cc6c38229e2 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 024f937e95..44e2e38ec8 100644 --- a/src/generator/config/subexport.cpp +++ b/src/generator/config/subexport.cpp @@ -450,7 +450,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); @@ -761,9 +763,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;