diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/CoreConfigV2rayService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/CoreConfigV2rayService.cs index d1cf14d7..6a815d62 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/CoreConfigV2rayService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/CoreConfigV2rayService.cs @@ -55,6 +55,11 @@ public partial class CoreConfigV2rayService(CoreConfigContext context) GenDns(); GenStatistic(); + + if (_config.CoreBasicItem.EnableFragment) + { + ApplyOutboundFragment(); + } ApplyOutboundSendThrough(); var finalRule = BuildFinalRule(); @@ -189,6 +194,10 @@ public partial class CoreConfigV2rayService(CoreConfigContext context) _coreConfig.routing.rules.Add(rule); } + if (_config.CoreBasicItem.EnableFragment) + { + ApplyOutboundFragment(); + } ApplyOutboundSendThrough(); //ret.Msg =string.Format(ResUI.SuccessfulConfiguration"), node.getSummary()); ret.Success = true; @@ -250,6 +259,11 @@ public partial class CoreConfigV2rayService(CoreConfigContext context) }); _coreConfig.routing.rules.Add(BuildFinalRule()); + + if (_config.CoreBasicItem.EnableFragment) + { + ApplyOutboundFragment(); + } ApplyOutboundSendThrough(); ret.Msg = string.Format(ResUI.SuccessfulConfiguration, ""); diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs index 8b3da6b5..b058dfa1 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs @@ -12,10 +12,6 @@ public partial class CoreConfigV2rayService GenObservatory(multipleLoad); GenBalancer(multipleLoad); } - if (_config.CoreBasicItem.EnableFragment) - { - ApplyOutboundFragment(); - } if (context.IsTunEnabled) { _coreConfig.outbounds.Add(BuildDnsOutbound());