Compare commits

..

30 commits

Author SHA1 Message Date
DHR60
a6f2b47952 PreCheck 2025-10-04 20:17:57 +08:00
DHR60
07af03ab81 Remove unnecessary checks 2025-10-04 20:17:57 +08:00
DHR60
8f45d9730b Refactor 2025-10-04 20:17:57 +08:00
2dust
33f5d20022 Update ProfileGroupItem.cs 2025-10-04 20:17:57 +08:00
DHR60
e2df1bc6cb Fix 2025-10-04 20:17:57 +08:00
DHR60
ef09be7a26 Fix 2025-10-04 20:17:57 +08:00
DHR60
142940118e Avoids circular dependency in profile groups
Adds cycle detection to prevent infinite loops when evaluating profile groups.

This ensures that profile group configurations don't result in stack overflow errors when groups reference each other, directly or indirectly.
2025-10-04 20:17:57 +08:00
DHR60
f64f72ba7f Improves Tun2Socks address handling 2025-10-04 20:17:57 +08:00
DHR60
f3adb57e68 Fix 2025-10-04 20:17:57 +08:00
DHR60
ca80e1e831 Avoid self-reference 2025-10-04 20:17:56 +08:00
DHR60
901f8101f0 Add chain selection control to group outbounds 2025-10-04 20:17:56 +08:00
DHR60
587686ffce Refactor 2025-10-04 20:17:56 +08:00
DHR60
aab6d3d136 Add helper function 2025-10-04 20:17:56 +08:00
DHR60
cb814e1dac Adjust chained proxy, actual outbound is at the top
Based on actual network flow instead of data packets
2025-10-04 20:17:56 +08:00
DHR60
8a707cfb90 Refactor 2025-10-04 20:17:56 +08:00
DHR60
4a37b53fe1 Avoid duplicate tags 2025-10-04 20:17:56 +08:00
DHR60
ff6ce3334a Add group in traffic splitting support 2025-10-04 20:17:56 +08:00
DHR60
c00b0b7c43 Add PolicyGroup include other Group support 2025-10-04 20:17:56 +08:00
DHR60
c767e8f085 Add fallback support 2025-10-04 20:17:56 +08:00
DHR60
e7b07f735d Fix 2025-10-04 20:17:56 +08:00
DHR60
3d8559d06d Add Proxy Chain support 2025-10-04 20:17:48 +08:00
DHR60
c98566f270 Adjust UI 2025-10-04 20:08:11 +08:00
DHR60
6f84515f1a Add generate policy group 2025-10-04 20:08:11 +08:00
DHR60
637137303a Add Policy Group support 2025-10-04 20:08:11 +08:00
DHR60
764a2dc301 Rename 2025-10-04 20:08:11 +08:00
DHR60
f4805a399b Exclude specific profile types from selection 2025-10-04 20:08:11 +08:00
DHR60
9202390fa1 Fix right click not working 2025-10-04 20:08:11 +08:00
DHR60
d074d9a72a avalonia 2025-10-04 20:08:11 +08:00
DHR60
dd2bfd9511 VM and wpf 2025-10-04 20:08:11 +08:00
DHR60
55de37e5f3 Multi Profile 2025-10-04 20:08:11 +08:00
2 changed files with 17 additions and 27 deletions

View file

@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Version>7.15.1</Version>
<Version>7.15.0</Version>
</PropertyGroup>
<PropertyGroup>

View file

@ -186,37 +186,27 @@ public class ProfileGroupItemManager
visited.Add(indexId);
stack.Add(indexId);
try
Instance.TryGet(indexId, out var groupItem);
if (groupItem == null || groupItem.ChildItems.IsNullOrEmpty())
{
Instance.TryGet(indexId, out var groupItem);
if (groupItem == null || groupItem.ChildItems.IsNullOrEmpty())
{
return false;
}
var childIds = Utils.String2List(groupItem.ChildItems)
.Where(p => !string.IsNullOrEmpty(p))
.ToList();
if (childIds == null)
{
return false;
}
foreach (var child in childIds)
{
if (HasCycle(child, visited, stack))
{
return true;
}
}
return false;
}
finally
var childIds = Utils.String2List(groupItem.ChildItems)
.Where(p => !string.IsNullOrEmpty(p))
.ToList();
foreach (var child in childIds)
{
stack.Remove(indexId);
if (HasCycle(child, visited, stack))
{
return true;
}
}
stack.Remove(indexId);
return false;
}
public static async Task<(List<ProfileItem> Items, ProfileGroupItem? Group)> GetChildProfileItems(string? indexId)