From 754cbb9eaafef524b1c2cf6e3f92efc68d016282 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Mon, 30 Jan 2023 09:53:04 +0800 Subject: [PATCH] fix allowInsecure bug --- v2rayN/v2rayN/Handler/ConfigHandler.cs | 4 ++-- v2rayN/v2rayN/Handler/CoreConfigHandler.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayN/v2rayN/Handler/ConfigHandler.cs index 660f12ee..4f7908af 100644 --- a/v2rayN/v2rayN/Handler/ConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/ConfigHandler.cs @@ -638,7 +638,7 @@ namespace v2rayN.Handler } if (Utils.IsNullOrEmpty(profileItem.allowInsecure)) { - profileItem.allowInsecure = config.defAllowInsecure.ToString(); + profileItem.allowInsecure = config.defAllowInsecure.ToString().ToLower(); } AddServerCommon(ref config, profileItem); @@ -750,7 +750,7 @@ namespace v2rayN.Handler profileItem.configVersion = 2; if (Utils.IsNullOrEmpty(profileItem.allowInsecure)) { - profileItem.allowInsecure = config.defAllowInsecure.ToString(); + profileItem.allowInsecure = config.defAllowInsecure.ToString().ToLower(); } if (!Utils.IsNullOrEmpty(profileItem.network) && !Global.networks.Contains(profileItem.network)) { diff --git a/v2rayN/v2rayN/Handler/CoreConfigHandler.cs b/v2rayN/v2rayN/Handler/CoreConfigHandler.cs index ae017d47..617581cd 100644 --- a/v2rayN/v2rayN/Handler/CoreConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/CoreConfigHandler.cs @@ -554,7 +554,7 @@ namespace v2rayN.Handler TlsSettings tlsSettings = new TlsSettings { - allowInsecure = Utils.ToBool(node.allowInsecure), + allowInsecure = Utils.ToBool(node.allowInsecure.IsNullOrEmpty() ? config.defAllowInsecure.ToString().ToLower() : node.allowInsecure), alpn = node.GetAlpn(), fingerprint = node.fingerprint }; @@ -576,7 +576,7 @@ namespace v2rayN.Handler TlsSettings xtlsSettings = new TlsSettings { - allowInsecure = Utils.ToBool(node.allowInsecure), + allowInsecure = Utils.ToBool(node.allowInsecure.IsNullOrEmpty() ? config.defAllowInsecure.ToString().ToLower() : node.allowInsecure), alpn = node.GetAlpn(), fingerprint = node.fingerprint };