mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08: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:
parent
8e0389d7f2
commit
35d296553b
@ -679,7 +679,10 @@ std::string proxyToSurge(std::vector<Proxy> &nodes, const std::string &base_conf
|
|||||||
case "tcp"_hash:
|
case "tcp"_hash:
|
||||||
break;
|
break;
|
||||||
case "ws"_hash:
|
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())
|
if(!edge.empty())
|
||||||
proxy += "|Edge:" + edge;
|
proxy += "|Edge:" + edge;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user