diff --git a/src/generator/config/subexport.cpp b/src/generator/config/subexport.cpp index bdac7a8c6..571115b4e 100644 --- a/src/generator/config/subexport.cpp +++ b/src/generator/config/subexport.cpp @@ -722,7 +722,10 @@ std::string proxyToSurge(std::vector &nodes, const std::string &base_conf case "tcp"_hash: break; case "ws"_hash: - proxy += ", ws=true, ws-path=" + path + ", sni=" + hostname; + if(host.empty()) + proxy += ", ws=true, ws-path=" + path + ", sni=" + hostname; + else + proxy += ", ws=true, ws-path=" + path + ", sni=" + host; if(!host.empty()) headers.push_back("Host:" + host); if(!edge.empty())