From 3af13d64f343affaed6d42bf508d651d25bb55f1 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Tue, 31 Mar 2020 16:57:54 +0800 Subject: [PATCH] add defaultAllowInsecure --- v2rayN/v2rayN/Handler/ConfigHandler.cs | 5 +++++ v2rayN/v2rayN/Mode/Config.cs | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/v2rayN/v2rayN/Handler/ConfigHandler.cs b/v2rayN/v2rayN/Handler/ConfigHandler.cs index 36abf07a..6e5985ee 100644 --- a/v2rayN/v2rayN/Handler/ConfigHandler.cs +++ b/v2rayN/v2rayN/Handler/ConfigHandler.cs @@ -140,6 +140,10 @@ namespace v2rayN.Handler //{ // config.remoteDNS = "1.1.1.1"; //} + if (Utils.IsNullOrEmpty(config.defaultAllowInsecure)) + { + config.defaultAllowInsecure = "false"; + } if (config.subItem == null) { @@ -193,6 +197,7 @@ namespace v2rayN.Handler vmessItem.requestHost = vmessItem.requestHost.TrimEx(); vmessItem.path = vmessItem.path.TrimEx(); vmessItem.streamSecurity = vmessItem.streamSecurity.TrimEx(); + vmessItem.allowInsecure = config.defaultAllowInsecure; if (index >= 0) { diff --git a/v2rayN/v2rayN/Mode/Config.cs b/v2rayN/v2rayN/Mode/Config.cs index 60e48e55..eea5afec 100644 --- a/v2rayN/v2rayN/Mode/Config.cs +++ b/v2rayN/v2rayN/Mode/Config.cs @@ -178,6 +178,15 @@ namespace v2rayN.Mode { get; set; } + + /// + /// 是否允许不安全连接 + /// + public string defaultAllowInsecure + { + get; set; + } + /// /// 订阅 ///