Add DNS Hosts features (#8756)

This commit is contained in:
DHR60
2026-02-05 09:05:27 +00:00
committed by GitHub
parent bceebc1661
commit d9843dc775
4 changed files with 70 additions and 44 deletions
@@ -333,14 +333,9 @@ public partial class CoreConfigV2rayService
}
}
if (!simpleDNSItem.Hosts.IsNullOrEmpty())
foreach (var kvp in Utils.ParseHostsToDictionary(simpleDNSItem.Hosts))
{
var userHostsMap = Utils.ParseHostsToDictionary(simpleDNSItem.Hosts);
foreach (var kvp in userHostsMap)
{
dnsItem.hosts[kvp.Key] = kvp.Value;
}
dnsItem.hosts[kvp.Key] = kvp.Value;
}
return await Task.FromResult(0);
}