From 152c4802d01c592e759d8d6eaf1a12bd2429293f Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Sun, 4 Jun 2023 16:24:48 +0800 Subject: [PATCH] Fix the bug for flow is empty --- v2rayN/v2rayN/Handler/CoreConfigSingbox.cs | 5 ++++- v2rayN/v2rayN/Handler/CoreConfigV2ray.cs | 2 -- v2rayN/v2rayN/Mode/V2rayConfig.cs | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs index 638655af..1f420dfb 100644 --- a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs +++ b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs @@ -255,7 +255,6 @@ namespace v2rayN.Handler outbound.type = Global.vlessProtocolLite; outbound.uuid = node.id; - outbound.flow = node.flow; outbound.packet_encoding = "xudp"; @@ -263,6 +262,10 @@ namespace v2rayN.Handler { outboundMux(node, outbound); } + else + { + outbound.flow = node.flow; + } } else if (node.configType == EConfigType.Trojan) { diff --git a/v2rayN/v2rayN/Handler/CoreConfigV2ray.cs b/v2rayN/v2rayN/Handler/CoreConfigV2ray.cs index b4ef45f8..87253e54 100644 --- a/v2rayN/v2rayN/Handler/CoreConfigV2ray.cs +++ b/v2rayN/v2rayN/Handler/CoreConfigV2ray.cs @@ -423,7 +423,6 @@ namespace v2rayN.Handler usersItem = vnextItem.users[0]; } usersItem.id = node.id; - usersItem.flow = string.Empty; usersItem.email = Global.userEMail; usersItem.encryption = node.security; @@ -462,7 +461,6 @@ namespace v2rayN.Handler serversItem.address = node.address; serversItem.port = node.port; serversItem.password = node.id; - serversItem.flow = string.Empty; serversItem.ota = false; serversItem.level = 1; diff --git a/v2rayN/v2rayN/Mode/V2rayConfig.cs b/v2rayN/v2rayN/Mode/V2rayConfig.cs index b20f526d..14c5dee0 100644 --- a/v2rayN/v2rayN/Mode/V2rayConfig.cs +++ b/v2rayN/v2rayN/Mode/V2rayConfig.cs @@ -185,7 +185,7 @@ namespace v2rayN.Mode /// /// VLESS /// - public string flow { get; set; } + public string? flow { get; set; } } public class Sniffing4Ray