mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-09-26 23:09:20 +08:00
Use Proxy.Host as alternative tls.server_name in sing-box to support Trojan's sni (#777)
Co-authored-by: Spade Lushen <7971040+SpadeLushen@users.noreply.github.com>
This commit is contained in:
parent
6974910734
commit
0c11565cc9
@ -2268,6 +2268,8 @@ void proxyToSingBox(std::vector<Proxy> &nodes, rapidjson::Document &json, std::v
|
||||
tls.AddMember("enabled", true, allocator);
|
||||
if (!x.ServerName.empty())
|
||||
tls.AddMember("server_name", rapidjson::StringRef(x.ServerName.c_str()), allocator);
|
||||
else if (!x.Host.empty())
|
||||
tls.AddMember("server_name", rapidjson::StringRef(x.Host.c_str()), allocator);
|
||||
tls.AddMember("insecure", buildBooleanValue(scv), allocator);
|
||||
proxy.AddMember("tls", tls, allocator);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user