mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 13:13:04 +00:00
Compare commits
4 commits
90860a28c6
...
990b2b07fa
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
990b2b07fa | ||
|
|
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 };
|
var newItems = new List<ProfileItem> { node };
|
||||||
if (node.ConfigType.IsGroupType())
|
if (node.ConfigType.IsGroupType())
|
||||||
{
|
{
|
||||||
var groupChildList = await GroupProfileManager.GetAllChildProfileItems(node);
|
var (groupChildList, _) = await GroupProfileManager.GetChildProfileItems(node);
|
||||||
foreach (var childItem in groupChildList)
|
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
|
node.SetProtocolExtra(node.GetProtocolExtra() with
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -433,15 +433,17 @@ public partial class CoreConfigSingboxService
|
||||||
{
|
{
|
||||||
GenDnsProtectCustom();
|
GenDnsProtectCustom();
|
||||||
|
|
||||||
var localDnsServer = _coreConfig.dns?.servers?.FirstOrDefault(s => s.tag == Global.SingboxLocalDNSTag);
|
_coreConfig.dns?.servers?.RemoveAll(s => s.tag == Global.SingboxLocalDNSTag);
|
||||||
if (localDnsServer == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
localDnsServer.type = null;
|
|
||||||
localDnsServer.server = null;
|
|
||||||
var dnsItem = context.RawDnsItem;
|
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()
|
private Rule4Sbox BuildProtectDomainRule()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue