mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
Use Host as SNI field if exists in Surge configs (#674)
This commit is contained in:
parent
05a542c4f1
commit
fdf983bc1b
@ -722,7 +722,10 @@ std::string proxyToSurge(std::vector<Proxy> &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())
|
||||
|
||||
Loading…
Reference in New Issue
Block a user