Fixes sing-box system hosts and ui (#7733)

This commit is contained in:
DHR60
2025-08-11 20:46:35 +08:00
committed by GitHub
parent b5e0a77401
commit 6a9408fe9b
10 changed files with 65 additions and 38 deletions
@@ -1690,6 +1690,22 @@ public class CoreConfigSingboxService
}
}
if (simpleDNSItem.UseSystemHosts == true)
{
var systemHosts = Utils.GetSystemHosts();
if (systemHosts.Count > 0)
{
foreach (var host in systemHosts)
{
if (userHostsMap[host.Key] != null)
{
continue;
}
userHostsMap[host.Key] = new List<string> { host.Value };
}
}
}
foreach (var host in hostsDns.predefined)
{
if (finalDns.server == host.Key)