Skip to content

Commit

Permalink
UDP is not supported yet in clash when using snell. (#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 Oct 3, 2023
1 parent 09bb290 commit b3ea72d
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 @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b3ea72d

Please sign in to comment.