mirror of
https://github.com/2dust/v2rayN.git
synced 2026-02-28 13:13:04 +00:00
Compare commits
12 commits
990b2b07fa
...
90860a28c6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90860a28c6 | ||
|
|
936354d8d3 | ||
|
|
0075939a73 | ||
|
|
e9a6411698 | ||
|
|
6d35abe7ca | ||
|
|
d4fdb93b55 | ||
|
|
36dc824f2f | ||
|
|
0ac7e87158 | ||
|
|
9c20beb6da | ||
|
|
c6dd26e324 | ||
|
|
437ba09d06 | ||
|
|
3768e0d989 |
2 changed files with 11 additions and 13 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.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
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue