feat: host support domain and multiple ips

This commit is contained in:
Skyxim
2023-03-12 10:53:38 +08:00
parent ae4d114802
commit 2f69b64d82
10 changed files with 188 additions and 49 deletions

View File

@@ -66,7 +66,7 @@ func setMsgTTL(msg *D.Msg, ttl uint32) {
}
func isIPRequest(q D.Question) bool {
return q.Qclass == D.ClassINET && (q.Qtype == D.TypeA || q.Qtype == D.TypeAAAA)
return q.Qclass == D.ClassINET && (q.Qtype == D.TypeA || q.Qtype == D.TypeAAAA||q.Qtype==D.TypeCNAME)
}
func transform(servers []NameServer, resolver *Resolver) []dnsClient {