From db28da454b02c7a9c4b0bc9722a3709a38656a58 Mon Sep 17 00:00:00 2001 From: H1JK Date: Fri, 3 Jun 2022 06:57:00 +0000 Subject: [PATCH] Update Jsonv5 configuration --- Netch/Servers/V2ray/V2rayConfigUtils.cs | 4 +++- Netch/Servers/V2ray/V2rayController.cs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Netch/Servers/V2ray/V2rayConfigUtils.cs b/Netch/Servers/V2ray/V2rayConfigUtils.cs index f769a74b..c47807fe 100644 --- a/Netch/Servers/V2ray/V2rayConfigUtils.cs +++ b/Netch/Servers/V2ray/V2rayConfigUtils.cs @@ -13,6 +13,7 @@ public static class V2rayConfigUtils { inbounds = new object[] { + // https://www.v2fly.org/en_US/v5/config/proxy/socks.html new { port = Global.Settings.Socks5LocalPort, @@ -20,7 +21,8 @@ public static class V2rayConfigUtils listen = Global.Settings.LocalAddress, settings = new { - udp = true + udpEnabled = true, + packetEncoding = Global.Settings.V2RayConfig.XrayCone ? "packet" : "none" } } } diff --git a/Netch/Servers/V2ray/V2rayController.cs b/Netch/Servers/V2ray/V2rayController.cs index 60851c71..007b1f9a 100644 --- a/Netch/Servers/V2ray/V2rayController.cs +++ b/Netch/Servers/V2ray/V2rayController.cs @@ -10,8 +10,8 @@ public class V2rayController : Guard, IServerController { public V2rayController() : base("v2ray-sn.exe") { - if (!Global.Settings.V2RayConfig.XrayCone) - Instance.StartInfo.Environment["XRAY_CONE_DISABLED"] = "true"; + //if (!Global.Settings.V2RayConfig.XrayCone) + // Instance.StartInfo.Environment["XRAY_CONE_DISABLED"] = "true"; } protected override IEnumerable StartedKeywords => new[] { "started" };