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
This commit is contained in:
Kenneth authored and GitHub committed 2023-10-03 18:25:16 +08:00
1 parent 09bb2909d0
commit b3ea72de6e
1 file changed
+5 -1
+5 -1
View File
@@ -448,7 +448,9 @@ void proxyToClash(std::vector<Proxy> &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<Proxy> &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;