Do not add obfs-host to Surge Snell node if empty (#626)

* fix surge obfs-host empty error

* fix comma error
This commit is contained in:
Kenneth authored and GitHub committed 2023-07-26 13:07:30 +08:00
1 parent 7d9881b9bc
commit a7e441a2fe
1 file changed
+3 -1
+3 -1
View File
@@ -754,7 +754,9 @@ 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 + ", obfs-host=" + host;
proxy += ", obfs=" + obfs;
if(!host.empty())
proxy += ", obfs-host=" + host;
break;
default:
continue;