Use Host as SNI field if exists in Surge configs (#674)

This commit is contained in:
RuyeNet authored and GitHub committed 2023-11-27 00:14:47 +08:00
1 parent 05a542c4f1
commit fdf983bc1b
1 file changed
+3
+3
View File
@@ -722,7 +722,10 @@ std::string proxyToSurge(std::vector<Proxy> &nodes, const std::string &base_conf
case "tcp"_hash:
break;
case "ws"_hash:
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())