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" };