From 1e8f9ce2cd55928eaa5354b200e436fe65538c14 Mon Sep 17 00:00:00 2001 From: DHR60 Date: Wed, 25 Feb 2026 08:54:38 +0800 Subject: [PATCH] Fix fragment --- v2rayN/ServiceLib/Resx/ResUI.Designer.cs | 9 --------- v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx | 3 --- v2rayN/ServiceLib/Resx/ResUI.fr.resx | 3 --- v2rayN/ServiceLib/Resx/ResUI.hu.resx | 3 --- v2rayN/ServiceLib/Resx/ResUI.resx | 3 --- v2rayN/ServiceLib/Resx/ResUI.ru.resx | 3 --- v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx | 3 --- v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx | 3 --- .../CoreConfig/V2ray/V2rayOutboundService.cs | 13 +++++++------ .../v2rayN.Desktop/Views/OptionSettingWindow.axaml | 6 ------ v2rayN/v2rayN/Views/OptionSettingWindow.xaml | 7 ------- 11 files changed, 7 insertions(+), 49 deletions(-) diff --git a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs index 20637ed5..168e7c6b 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.Designer.cs +++ b/v2rayN/ServiceLib/Resx/ResUI.Designer.cs @@ -3798,15 +3798,6 @@ namespace ServiceLib.Resx { } } - /// - /// 查找类似 which conflicts with the group previous proxy 的本地化字符串。 - /// - public static string TbSettingsEnableFragmentTips { - get { - return ResourceManager.GetString("TbSettingsEnableFragmentTips", resourceCulture); - } - } - /// /// 查找类似 Enable hardware acceleration (requires restart) 的本地化字符串。 /// diff --git a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx index c93a9292..7e43f653 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.fa-Ir.resx @@ -1113,9 +1113,6 @@ افزودن سرور [HTTP] - - which conflicts with the group previous proxy - فعال کردن فرگمنت diff --git a/v2rayN/ServiceLib/Resx/ResUI.fr.resx b/v2rayN/ServiceLib/Resx/ResUI.fr.resx index b2e636a9..2c322fcb 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.fr.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.fr.resx @@ -1110,9 +1110,6 @@ Ajouter [HTTP] - - En conflit avec le proxy amont de groupe - Activer le fragmentation (Fragment) diff --git a/v2rayN/ServiceLib/Resx/ResUI.hu.resx b/v2rayN/ServiceLib/Resx/ResUI.hu.resx index 9749f552..668bb69f 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.hu.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.hu.resx @@ -1113,9 +1113,6 @@ HTTP konfiguráció hozzáadása - - which conflicts with the group previous proxy - Fragment engedélyezése diff --git a/v2rayN/ServiceLib/Resx/ResUI.resx b/v2rayN/ServiceLib/Resx/ResUI.resx index 1ff10bec..400ef495 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.resx @@ -1113,9 +1113,6 @@ Add [HTTP] - - which conflicts with the group previous proxy - Enable fragment diff --git a/v2rayN/ServiceLib/Resx/ResUI.ru.resx b/v2rayN/ServiceLib/Resx/ResUI.ru.resx index f65a967d..a11e3776 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.ru.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.ru.resx @@ -1113,9 +1113,6 @@ Добавить сервер [HTTP] - - что конфликтует с предыдущим прокси группы - Включить фрагментацию (Fragment) diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx index e185636c..33bce20d 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hans.resx @@ -1110,9 +1110,6 @@ 添加 [HTTP] - - 和分组前置代理冲突 - 启用分片 (Fragment) diff --git a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx index 8b2c4cff..681b0b43 100644 --- a/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx +++ b/v2rayN/ServiceLib/Resx/ResUI.zh-Hant.resx @@ -1110,9 +1110,6 @@ 新增 [HTTP] 節點 - - 和分組前置代理衝突 - 啟用分片(Fragment) diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs index a6bb21ec..e9002db2 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs @@ -31,7 +31,7 @@ public partial class CoreConfigV2rayService var fragmentOutbound = new Outbounds4Ray { protocol = "freedom", - tag = $"frag-{Global.ProxyTag}", + tag = $"frag-{baseTagName}", settings = new() { fragment = new() @@ -44,16 +44,17 @@ public partial class CoreConfigV2rayService }; var actOutboundWithTlsList = proxyOutboundList.Where(n => n.streamSettings?.security.IsNullOrEmpty() == false - && (n.streamSettings?.sockopt?.dialerProxy?.IsNullOrEmpty() ?? true)); + && (n.streamSettings?.sockopt?.dialerProxy?.IsNullOrEmpty() ?? true)).ToList(); + if (actOutboundWithTlsList.Count > 0) + { + proxyOutboundList.Add(fragmentOutbound); + } foreach (var outbound in actOutboundWithTlsList) { - var fragmentOutboundClone = JsonUtils.DeepCopy(fragmentOutbound); - fragmentOutboundClone.tag = $"frag-{outbound.tag}"; outbound.streamSettings.sockopt = new() { - dialerProxy = fragmentOutboundClone.tag + dialerProxy = fragmentOutbound.tag }; - proxyOutboundList.Add(fragmentOutboundClone); } } return proxyOutboundList; diff --git a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml index 65218738..4fcbcb22 100644 --- a/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml +++ b/v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml @@ -325,12 +325,6 @@ Grid.Column="1" Margin="{StaticResource Margin4}" HorizontalAlignment="Left" /> - diff --git a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml index 00b2dc9e..73383036 100644 --- a/v2rayN/v2rayN/Views/OptionSettingWindow.xaml +++ b/v2rayN/v2rayN/Views/OptionSettingWindow.xaml @@ -391,13 +391,6 @@ Grid.Column="1" Margin="{StaticResource Margin8}" HorizontalAlignment="Left" /> -