Compare commits

..

11 commits

Author SHA1 Message Date
DHR60
936354d8d3 Fix test 2026-02-12 16:48:24 +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
DHR60
d4fdb93b55 Remove duplicates 2026-02-08 14:51:52 +08:00
DHR60
36dc824f2f Clean Code 2026-02-08 14:43:36 +08:00
DHR60
0ac7e87158 Clean code 2026-02-08 14:26:39 +08:00
DHR60
9c20beb6da Optimize ProfileItem acquisition speed 2026-02-07 21:58:10 +08:00
DHR60
c6dd26e324 Fix 2026-02-07 21:17:29 +08:00
DHR60
437ba09d06 Fix 2026-02-07 21:17:29 +08:00
DHR60
3768e0d989 Fix chain 2026-02-07 21:17:29 +08:00
2 changed files with 11 additions and 13 deletions

View file

@ -187,10 +187,10 @@ public static class CoreConfigHandler
var newItems = new List<ProfileItem> { node }; var newItems = new List<ProfileItem> { node };
if (node.ConfigType.IsGroupType()) if (node.ConfigType.IsGroupType())
{ {
var (groupChildList, _) = await GroupProfileManager.GetChildProfileItems(node); var groupChildList = await GroupProfileManager.GetAllChildProfileItems(node);
foreach (var childItem in groupChildList.Where(childItem => !context.AllProxiesMap.ContainsKey(childItem.IndexId))) foreach (var childItem in groupChildList)
{ {
await FillNodeContext(context, childItem, false); context.AllProxiesMap[childItem.IndexId] = childItem;
} }
node.SetProtocolExtra(node.GetProtocolExtra() with node.SetProtocolExtra(node.GetProtocolExtra() with
{ {

View file

@ -433,17 +433,15 @@ public partial class CoreConfigSingboxService
{ {
GenDnsProtectCustom(); GenDnsProtectCustom();
_coreConfig.dns?.servers?.RemoveAll(s => s.tag == Global.SingboxLocalDNSTag); var localDnsServer = _coreConfig.dns?.servers?.FirstOrDefault(s => s.tag == Global.SingboxLocalDNSTag);
var dnsItem = context.RawDnsItem; if (localDnsServer == null)
var localDnsServer = new Server4Sbox()
{ {
address = string.IsNullOrEmpty(dnsItem?.DomainDNSAddress) return;
? Global.DomainPureIPDNSAddress.FirstOrDefault() }
: dnsItem?.DomainDNSAddress, localDnsServer.type = null;
tag = Global.SingboxLocalDNSTag, localDnsServer.server = null;
detour = Global.DirectTag, var dnsItem = context.RawDnsItem;
}; localDnsServer.address = string.IsNullOrEmpty(dnsItem?.DomainDNSAddress) ? Global.DomainPureIPDNSAddress.FirstOrDefault() : dnsItem?.DomainDNSAddress;
_coreConfig.dns?.servers?.Add(localDnsServer);
} }
private Rule4Sbox BuildProtectDomainRule() private Rule4Sbox BuildProtectDomainRule()