From 46a5f2e1908ace4d97c478effb1eea8441825ee5 Mon Sep 17 00:00:00 2001 From: Hellojack <106379370+H1JK@users.noreply.github.com> Date: Wed, 8 Jun 2022 18:01:49 +0800 Subject: [PATCH] VMess : Automatically choose zero for secure TLS connection --- Netch/Servers/V2ray/V2rayConfigUtils.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Netch/Servers/V2ray/V2rayConfigUtils.cs b/Netch/Servers/V2ray/V2rayConfigUtils.cs index 75b6a798..76e4786b 100644 --- a/Netch/Servers/V2ray/V2rayConfigUtils.cs +++ b/Netch/Servers/V2ray/V2rayConfigUtils.cs @@ -111,6 +111,10 @@ public static class V2rayConfigUtils case VMessServer vmess: { outbound.protocol = "vmess"; + if (vmess.EncryptMethod == "auto" && vmess.TLSSecureType != "none" && !Global.Settings.V2RayConfig.AllowInsecure) + { + vmess.EncryptMethod = "zero"; + } outbound.settings.vnext = new[] { new VnextItem