diff --git a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs index 435b7372..6ec279a1 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs @@ -204,7 +204,7 @@ public partial class CoreConfigSingboxService return await Task.FromResult(null); } - private async Task GenGroupOutbound(ProfileItem node, SingboxConfig singboxConfig, string baseTagName = Global.ProxyTag) + private async Task GenGroupOutbound(ProfileItem node, SingboxConfig singboxConfig, string baseTagName = Global.ProxyTag, bool ignoreOriginChain = false) { try { @@ -239,7 +239,15 @@ public partial class CoreConfigSingboxService switch (node.ConfigType) { case EConfigType.PolicyGroup: - await GenOutboundsListWithChain(childProfiles, singboxConfig, profileGroupItem.MultipleLoad, baseTagName); + if (ignoreOriginChain) + { + await GenOutboundsList(childProfiles, singboxConfig, profileGroupItem.MultipleLoad, baseTagName); + } + else + { + await GenOutboundsListWithChain(childProfiles, singboxConfig, profileGroupItem.MultipleLoad, baseTagName); + } + break; case EConfigType.ProxyChain: await GenChainOutboundsList(childProfiles, singboxConfig, baseTagName); diff --git a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs index 90a85f17..b250e01d 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/V2ray/V2rayOutboundService.cs @@ -480,7 +480,7 @@ public partial class CoreConfigV2rayService return 0; } - private async Task GenGroupOutbound(ProfileItem node, V2rayConfig v2rayConfig, string baseTagName = Global.ProxyTag) + private async Task GenGroupOutbound(ProfileItem node, V2rayConfig v2rayConfig, string baseTagName = Global.ProxyTag, bool ignoreOriginChain = false) { try { @@ -515,7 +515,14 @@ public partial class CoreConfigV2rayService switch (node.ConfigType) { case EConfigType.PolicyGroup: - await GenOutboundsListWithChain(childProfiles, v2rayConfig, baseTagName); + if (ignoreOriginChain) + { + await GenOutboundsList(childProfiles, v2rayConfig, baseTagName); + } + else + { + await GenOutboundsListWithChain(childProfiles, v2rayConfig, baseTagName); + } break; case EConfigType.ProxyChain: await GenChainOutboundsList(childProfiles, v2rayConfig, baseTagName);