Compare commits

..

24 commits

Author SHA1 Message Date
DHR60
15d51c41fc
Merge c88bf796f4 into 5d6c5da9d9 2025-09-28 20:05:51 +08:00
DHR60
c88bf796f4 Improves Tun2Socks address handling 2025-09-24 20:55:41 +08:00
DHR60
ab1dc45ed4 Fix 2025-09-23 16:49:52 +08:00
DHR60
2d41272659 Avoid self-reference 2025-09-23 12:46:59 +08:00
DHR60
e7f75010d3 Add chain selection control to group outbounds 2025-09-23 11:24:27 +08:00
DHR60
aa1ccdd01b Refactor 2025-09-23 11:24:17 +08:00
DHR60
b17323c982 Add helper function 2025-09-23 11:11:03 +08:00
DHR60
71dcd8d1de Adjust chained proxy, actual outbound is at the top
Based on actual network flow instead of data packets
2025-09-21 17:01:41 +08:00
DHR60
dace865e6c Refactor 2025-09-21 17:01:41 +08:00
DHR60
fad94e68d2 Avoid duplicate tags 2025-09-21 17:01:41 +08:00
DHR60
c116aae242 Add group in traffic splitting support 2025-09-21 17:01:41 +08:00
DHR60
ff1c9093a2 Add PolicyGroup include other Group support 2025-09-21 17:01:41 +08:00
DHR60
8bb20c0ab8 Add fallback support 2025-09-21 17:01:41 +08:00
DHR60
17a3a516c7 Fix 2025-09-21 17:01:41 +08:00
DHR60
8f0d7e54d8 Add Proxy Chain support 2025-09-21 17:01:41 +08:00
DHR60
2ab79afa02 Adjust UI 2025-09-21 17:01:41 +08:00
DHR60
e29d292732 Add generate policy group 2025-09-21 17:01:41 +08:00
DHR60
9ef228db1e Add Policy Group support 2025-09-21 17:01:41 +08:00
DHR60
34327532e6 Rename 2025-09-21 17:01:41 +08:00
DHR60
8af6eda165 Exclude specific profile types from selection 2025-09-21 17:01:41 +08:00
DHR60
f979d13109 Fix right click not working 2025-09-21 17:01:41 +08:00
DHR60
6166b6c0e3 avalonia 2025-09-21 17:01:40 +08:00
DHR60
8c094dd976 VM and wpf 2025-09-21 17:01:40 +08:00
DHR60
5c4f485471 Multi Profile 2025-09-21 17:01:40 +08:00
3 changed files with 2 additions and 50 deletions

View file

@ -109,42 +109,6 @@ public class ProfileItem : ReactiveObject
return true;
}
public async Task<bool> HasCycle(HashSet<string> visited, HashSet<string> stack)
{
if (ConfigType < EConfigType.Group)
return false;
if (stack.Contains(IndexId))
return true;
if (visited.Contains(IndexId))
return false;
visited.Add(IndexId);
stack.Add(IndexId);
if (ProfileGroupItemManager.Instance.TryGet(IndexId, out var group)
&& !group.ChildItems.IsNullOrEmpty())
{
var childProfiles = (await Task.WhenAll(
Utils.String2List(group.ChildItems)
.Where(p => !p.IsNullOrEmpty())
.Select(AppManager.Instance.GetProfileItem)
))
.Where(p => p != null)
.ToList();
foreach (var child in childProfiles)
{
if (await child.HasCycle(visited, stack))
return true;
}
}
stack.Remove(IndexId);
return false;
}
#endregion function
[PrimaryKey]

View file

@ -217,15 +217,9 @@ public partial class CoreConfigSingboxService
{
return -1;
}
var hasCycle = await node.HasCycle(new HashSet<string>(), new HashSet<string>());
if (hasCycle)
{
return -1;
}
// 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())
@ -236,6 +230,7 @@ public partial class CoreConfigSingboxService
&& p.IsValid()
&& p.ConfigType != EConfigType.Custom
&& (node.ConfigType == EConfigType.PolicyGroup || p.ConfigType < EConfigType.Group)
&& p.IndexId != node.IndexId
)
.ToList();

View file

@ -493,13 +493,6 @@ public partial class CoreConfigV2rayService
{
return -1;
}
var hasCycle = await node.HasCycle(new HashSet<string>(), new HashSet<string>());
if (hasCycle)
{
return -1;
}
// remove custom nodes
// remove group nodes for proxy chain
var childProfiles = (await Task.WhenAll(