fix tls bug in import (#100)

This commit is contained in:
Safa Safari
2022-10-25 08:33:36 +03:30
committed by arm64v8a
parent ab1857fd40
commit b61f005abb

View File

@@ -124,7 +124,8 @@ namespace NekoRay::fmt {
auto scy = objN["scy"].toString();
if (!scy.isEmpty()) security = scy;
// TLS (XTLS?)
if (!objN["tls"].toString().isEmpty()) stream->security = "tls";
if (!objN["tls"].toString().isEmpty() && objN["tls"].toString().toLower() != "none")
stream->security = "tls";
if (stream->security == "tls" && IsIpAddress(serverAddress) &&
(!stream->host.isEmpty()) && stream->sni.isEmpty()) {
// v2rayN config builder generate sni like this, so set sni here for their format.