Skip to content

Commit

Permalink
UDP is not supported yet in clash when using snell. (tindy2013#627)
Browse files Browse the repository at this point in the history
* fix surge obfs-host empty error

* fix comma error

* UDP is not supported for clash when using snell

* fix brace warning
  • Loading branch information
kenxx authored and nftbty committed Oct 10, 2023
1 parent a98bd02 commit b84bd7d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/generator/config/subexport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,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);
Expand Down Expand Up @@ -761,9 +763,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;
Expand Down

0 comments on commit b84bd7d

Please sign in to comment.