From 58e3824d67edc369408757885960fde0fdd3b75a Mon Sep 17 00:00:00 2001 From: DHR60 Date: Sat, 28 Feb 2026 19:43:10 +0800 Subject: [PATCH] Fix --- v2rayN/ServiceLib/Handler/ConfigHandler.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/Handler/ConfigHandler.cs b/v2rayN/ServiceLib/Handler/ConfigHandler.cs index 42f0042e..091d31eb 100644 --- a/v2rayN/ServiceLib/Handler/ConfigHandler.cs +++ b/v2rayN/ServiceLib/Handler/ConfigHandler.cs @@ -1256,6 +1256,7 @@ public static class ConfigHandler result.Success = false; return result; } + var childProfiles = await AppManager.Instance.ProfileItems(subId); List indexIdList = []; foreach (var regionFilter in PolicyGroupRegionFilters) @@ -1283,8 +1284,14 @@ public static class ConfigHandler }; profile.SetProtocolExtra(extraItem); - var childProfile = await GroupProfileManager.GetChildProfileItemsByProtocolExtra(extraItem); - if (childProfile.Count == 0) + var matchedChildProfiles = childProfiles?.Where(p => + p != null && + p.IsValid() && + !p.ConfigType.IsComplexType() && + (extraItem.Filter.IsNullOrEmpty() || Regex.IsMatch(p.Remarks, extraItem.Filter)) + ) + .ToList() ?? []; + if (matchedChildProfiles.Count == 0) { continue; }