mirror of
https://github.com/2dust/v2rayN.git
synced 2026-03-03 14:43:07 +00:00
Compare commits
2 commits
96a90bf5d0
...
2c64cf172c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c64cf172c | ||
|
|
180cf485bd |
4 changed files with 6 additions and 32 deletions
|
|
@ -175,8 +175,7 @@ public static class CoreConfigHandler
|
||||||
var ruleOutboundNode = await AppManager.Instance.GetProfileItemViaRemarks(ruleItem.OutboundTag);
|
var ruleOutboundNode = await AppManager.Instance.GetProfileItemViaRemarks(ruleItem.OutboundTag);
|
||||||
if (ruleOutboundNode != null)
|
if (ruleOutboundNode != null)
|
||||||
{
|
{
|
||||||
var ruleOutboundNodeAct = await FillNodeContext(context, ruleOutboundNode, false);
|
await FillNodeContext(context, ruleOutboundNode);
|
||||||
context.AllProxiesMap[$"remark:{ruleItem.OutboundTag}"] = ruleOutboundNodeAct;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -96,34 +96,9 @@ public class GroupProfileManager
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
var childProfileIds = Utils.String2List(extra.ChildItems)
|
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);
|
var childProfiles = await AppManager.Instance.GetProfileItemsByIndexIds(childProfileIds);
|
||||||
if (childProfiles == null || childProfiles.Count == 0)
|
return childProfiles ?? [];
|
||||||
{
|
|
||||||
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)
|
private static async Task<List<ProfileItem>> GetSubChildProfileItems(ProtocolExtraItem? extra)
|
||||||
|
|
|
||||||
|
|
@ -413,8 +413,8 @@ public partial class CoreConfigSingboxService
|
||||||
}
|
}
|
||||||
|
|
||||||
var tag = $"{node.IndexId}-{Global.ProxyTag}";
|
var tag = $"{node.IndexId}-{Global.ProxyTag}";
|
||||||
if (_coreConfig.outbounds.Any(o => o.tag.StartsWith(tag))
|
if (_coreConfig.outbounds.Any(o => o.tag == tag)
|
||||||
|| (_coreConfig.endpoints != null && _coreConfig.endpoints.Any(e => e.tag.StartsWith(tag))))
|
|| (_coreConfig.endpoints != null && _coreConfig.endpoints.Any(e => e.tag == tag)))
|
||||||
{
|
{
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ public partial class CoreConfigV2rayService
|
||||||
}
|
}
|
||||||
|
|
||||||
var tag = $"{node.IndexId}-{Global.ProxyTag}";
|
var tag = $"{node.IndexId}-{Global.ProxyTag}";
|
||||||
if (_coreConfig.outbounds.Any(p => p.tag.StartsWith(tag)))
|
if (_coreConfig.outbounds.Any(p => p.tag == tag))
|
||||||
{
|
{
|
||||||
return tag;
|
return tag;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue