Fix SNI host missing in Surge configurations

This commit is contained in:
Tindy X committed 2020-04-03 23:10:53 +08:00
1 parent a034e872cf
commit bcc4422e87
2 files changed
+4 -1

No files matched your search

+3
View File
@@ -1181,7 +1181,10 @@ std::string netchToSurge(std::vector<nodeInfo> &nodes, std::string &base_conf, s
case SPEEDTEST_MESSAGE_FOUNDTROJAN:
if(surge_ver < 4)
continue;
host = GetMember(json, "Host");
proxy = "trojan, " + hostname + ", " + port + ", password=" + password;
if(host.size())
proxy += ", sni=" + host;
if(ext.skip_cert_verify)
proxy += ", skip-cert-verify=1";
break;