mirror of
https://github.com/2dust/v2rayN.git
synced 2026-03-12 19:33:01 +00:00
Fix (#8868)
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
Some checks are pending
release Linux / build (Release) (push) Waiting to run
release Linux / rpm (push) Blocked by required conditions
release macOS / build (Release) (push) Waiting to run
release Windows desktop (Avalonia UI) / build (Release) (push) Waiting to run
release Windows / build (Release) (push) Waiting to run
This commit is contained in:
parent
56f1794e47
commit
c9df9a0001
1 changed files with 10 additions and 2 deletions
|
|
@ -433,7 +433,11 @@ public partial class CoreConfigSingboxService
|
||||||
localDnsServer.tag = tag;
|
localDnsServer.tag = tag;
|
||||||
|
|
||||||
dns4Sbox.servers.Add(localDnsServer);
|
dns4Sbox.servers.Add(localDnsServer);
|
||||||
dns4Sbox.rules.Insert(0, BuildProtectDomainRule());
|
var protectDomainRule = BuildProtectDomainRule();
|
||||||
|
if (protectDomainRule != null)
|
||||||
|
{
|
||||||
|
dns4Sbox.rules.Insert(0, protectDomainRule);
|
||||||
|
}
|
||||||
|
|
||||||
_coreConfig.dns = dns4Sbox;
|
_coreConfig.dns = dns4Sbox;
|
||||||
}
|
}
|
||||||
|
|
@ -455,8 +459,12 @@ public partial class CoreConfigSingboxService
|
||||||
_coreConfig.dns?.servers?.Add(localDnsServer);
|
_coreConfig.dns?.servers?.Add(localDnsServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Rule4Sbox BuildProtectDomainRule()
|
private Rule4Sbox? BuildProtectDomainRule()
|
||||||
{
|
{
|
||||||
|
if (context.ProtectDomainList.Count == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return new()
|
return new()
|
||||||
{
|
{
|
||||||
server = Global.SingboxLocalDNSTag,
|
server = Global.SingboxLocalDNSTag,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue