From b61f005abb32e4c8326f4ea7d085d8648bf473d7 Mon Sep 17 00:00:00 2001 From: Safa Safari Date: Tue, 25 Oct 2022 08:33:36 +0330 Subject: [PATCH] fix tls bug in import (#100) --- fmt/Link2Bean.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fmt/Link2Bean.cpp b/fmt/Link2Bean.cpp index 265de4e..9b1fbaf 100644 --- a/fmt/Link2Bean.cpp +++ b/fmt/Link2Bean.cpp @@ -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.