Compare commits

..

4 commits

Author SHA1 Message Date
DHR60
9b784ab9c7 Node test with sub chain 2026-02-11 14:31:21 +08:00
DHR60
0075939a73 Fix duplicates 2026-02-11 14:28:03 +08:00
DHR60
e9a6411698 Fix order 2026-02-09 10:17:42 +08:00
DHR60
6d35abe7ca Fix 2026-02-09 09:55:58 +08:00
4 changed files with 32 additions and 6 deletions

View file

@ -175,7 +175,8 @@ public static class CoreConfigHandler
var ruleOutboundNode = await AppManager.Instance.GetProfileItemViaRemarks(ruleItem.OutboundTag);
if (ruleOutboundNode != null)
{
await FillNodeContext(context, ruleOutboundNode);
var ruleOutboundNodeAct = await FillNodeContext(context, ruleOutboundNode, false);
context.AllProxiesMap[$"remark:{ruleItem.OutboundTag}"] = ruleOutboundNodeAct;
}
}
}

View file

@ -96,9 +96,34 @@ public class GroupProfileManager
return [];
}
var childProfileIds = Utils.String2List(extra.ChildItems)
?.Where(p => !string.IsNullOrEmpty(p)) ?? [];
?.Where(p => !string.IsNullOrEmpty(p))
.ToList() ?? [];
if (childProfileIds.Count == 0)
{
return [];
}
var childProfiles = await AppManager.Instance.GetProfileItemsByIndexIds(childProfileIds);
return childProfiles ?? [];
if (childProfiles == null || childProfiles.Count == 0)
{
return [];
}
var profileMap = childProfiles
.Where(p => p != null && !p.IndexId.IsNullOrEmpty())
.GroupBy(p => p!.IndexId!)
.ToDictionary(g => g.Key, g => g.First());
var ordered = new List<ProfileItem>(childProfileIds.Count);
foreach (var id in childProfileIds)
{
if (id != null && profileMap.TryGetValue(id, out var item) && item != null)
{
ordered.Add(item);
}
}
return ordered;
}
private static async Task<List<ProfileItem>> GetSubChildProfileItems(ProtocolExtraItem? extra)

View file

@ -413,8 +413,8 @@ public partial class CoreConfigSingboxService
}
var tag = $"{node.IndexId}-{Global.ProxyTag}";
if (_coreConfig.outbounds.Any(o => o.tag == tag)
|| (_coreConfig.endpoints != null && _coreConfig.endpoints.Any(e => e.tag == tag)))
if (_coreConfig.outbounds.Any(o => o.tag.StartsWith(tag))
|| (_coreConfig.endpoints != null && _coreConfig.endpoints.Any(e => e.tag.StartsWith(tag))))
{
return tag;
}

View file

@ -165,7 +165,7 @@ public partial class CoreConfigV2rayService
}
var tag = $"{node.IndexId}-{Global.ProxyTag}";
if (_coreConfig.outbounds.Any(p => p.tag == tag))
if (_coreConfig.outbounds.Any(p => p.tag.StartsWith(tag)))
{
return tag;
}