diff --git a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs index 6ec279a1..bd03b4c8 100644 --- a/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs +++ b/v2rayN/ServiceLib/Services/CoreConfig/Singbox/SingboxOutboundService.cs @@ -219,16 +219,18 @@ public partial class CoreConfigSingboxService } // remove custom nodes // remove group nodes for proxy chain + // avoid self-reference var childProfiles = (await Task.WhenAll( Utils.String2List(profileGroupItem.ChildItems) .Where(p => !p.IsNullOrEmpty()) .Select(AppManager.Instance.GetProfileItem) )) .Where(p => - p != null && - p.IsValid() && - p.ConfigType != EConfigType.Custom && - (node.ConfigType == EConfigType.PolicyGroup || p.ConfigType < EConfigType.Group) + p != null + && p.IsValid() + && p.ConfigType != EConfigType.Custom + && (node.ConfigType == EConfigType.PolicyGroup || p.ConfigType < EConfigType.Group) + && p.IndexId != node.IndexId ) .ToList();