mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 13:13:04 +00:00
Compare commits
3 commits
936354d8d3
...
69d027840e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69d027840e | ||
|
|
84a1eb8445 | ||
|
|
f900ce7f3f |
2 changed files with 13 additions and 11 deletions
|
|
@ -187,10 +187,10 @@ public static class CoreConfigHandler
|
|||
var newItems = new List<ProfileItem> { node };
|
||||
if (node.ConfigType.IsGroupType())
|
||||
{
|
||||
var groupChildList = await GroupProfileManager.GetAllChildProfileItems(node);
|
||||
foreach (var childItem in groupChildList)
|
||||
var (groupChildList, _) = await GroupProfileManager.GetChildProfileItems(node);
|
||||
foreach (var childItem in groupChildList.Where(childItem => !context.AllProxiesMap.ContainsKey(childItem.IndexId)))
|
||||
{
|
||||
context.AllProxiesMap[childItem.IndexId] = childItem;
|
||||
await FillNodeContext(context, childItem, false);
|
||||
}
|
||||
node.SetProtocolExtra(node.GetProtocolExtra() with
|
||||
{
|
||||
|
|
|
|||
|
|
@ -433,15 +433,17 @@ public partial class CoreConfigSingboxService
|
|||
{
|
||||
GenDnsProtectCustom();
|
||||
|
||||
var localDnsServer = _coreConfig.dns?.servers?.FirstOrDefault(s => s.tag == Global.SingboxLocalDNSTag);
|
||||
if (localDnsServer == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
localDnsServer.type = null;
|
||||
localDnsServer.server = null;
|
||||
_coreConfig.dns?.servers?.RemoveAll(s => s.tag == Global.SingboxLocalDNSTag);
|
||||
var dnsItem = context.RawDnsItem;
|
||||
localDnsServer.address = string.IsNullOrEmpty(dnsItem?.DomainDNSAddress) ? Global.DomainPureIPDNSAddress.FirstOrDefault() : dnsItem?.DomainDNSAddress;
|
||||
var localDnsServer = new Server4Sbox()
|
||||
{
|
||||
address = string.IsNullOrEmpty(dnsItem?.DomainDNSAddress)
|
||||
? Global.DomainPureIPDNSAddress.FirstOrDefault()
|
||||
: dnsItem?.DomainDNSAddress,
|
||||
tag = Global.SingboxLocalDNSTag,
|
||||
detour = Global.DirectTag,
|
||||
};
|
||||
_coreConfig.dns?.servers?.Add(localDnsServer);
|
||||
}
|
||||
|
||||
private Rule4Sbox BuildProtectDomainRule()
|
||||
|
|
|
|||
Loading…
Reference in a new issue