mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2026-11-03 10:12:50 +00:00
Add SNI host support in Surge configurations
This commit is contained in:
1 file changed
+6
-2
@@ -1301,8 +1301,12 @@ bool explodeSurge(std::string surge, const std::string &custom_port, int local_p
|
|||||||
continue;
|
continue;
|
||||||
itemName = trim(vArray[0]);
|
itemName = trim(vArray[0]);
|
||||||
itemVal = trim(vArray[1]);
|
itemVal = trim(vArray[1]);
|
||||||
if(itemName == "password")
|
switch(hash_(itemName))
|
||||||
password = itemVal;
|
{
|
||||||
|
case "password"_hash: password = itemVal; break;
|
||||||
|
case "sni"_hash: host = itemVal; break;
|
||||||
|
default: continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(host.empty() && !isIPv4(server) && !isIPv6(server))
|
if(host.empty() && !isIPv4(server) && !isIPv6(server))
|
||||||
host = server;
|
host = server;
|
||||||
|
|||||||
Reference in new issue
Block a user