feta: add hosts support domain and mulitple ip (#439)
* feat: host support domain and multiple ips * chore: append local address via `clash` * chore: update hosts demo * chore: unified parse mixed string and array * fix: flatten cname * chore: adjust logic * chore: reuse code * chore: use cname in tunnel * chore: try use domain mapping when normal dns * chore: format code
This commit is contained in:
@ -226,8 +226,8 @@ func updateDNS(c *config.DNS, generalIPv6 bool) {
|
||||
dns.ReCreateServer(c.Listen, r, m)
|
||||
}
|
||||
|
||||
func updateHosts(tree *trie.DomainTrie[netip.Addr]) {
|
||||
resolver.DefaultHosts = tree
|
||||
func updateHosts(tree *trie.DomainTrie[resolver.HostValue]) {
|
||||
resolver.DefaultHosts = resolver.NewHosts(tree)
|
||||
}
|
||||
|
||||
func updateProxies(proxies map[string]C.Proxy, providers map[string]provider.ProxyProvider) {
|
||||
|
Reference in New Issue
Block a user