mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-26 02:42:25 +00:00
Fix bug on Surge when using WebSocket (#532)
* Fix bug on Surge when using WebSocket. * Change sni from host to hostname
This commit is contained in:
@@ -679,7 +679,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=" + host + ", ws-headers=Host:" + host;
|
||||
if(host.empty())
|
||||
proxy += ", ws=true, ws-path=" + path + ", sni=" + hostname;
|
||||
else
|
||||
proxy += ", ws=true, ws-path=" + path + ", sni=" + hostname + ", ws-headers=Host:" + host;
|
||||
if(!edge.empty())
|
||||
proxy += "|Edge:" + edge;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user