fix: 根据查询类型返回记录值

This commit is contained in:
骑着蜗牛追导弹 2024-11-10 19:39:36 +08:00
parent 737274a75f
commit 33758dc4e5
1 changed files with 5 additions and 0 deletions

View File

@ -28,14 +28,19 @@ func HandleDNSRequest(w dns.ResponseWriter, r *dns.Msg) {
switch question.Qtype {
case dns.TypeA:
handleARecord(question, msg)
break
case dns.TypeAAAA:
handleAAAARecord(question, msg)
break
case dns.TypeCNAME:
handleCNAMERecord(question, msg)
break
case dns.TypeMX:
handleMXRecord(question, msg)
break
case dns.TypeTXT:
handleTXTRecord(question, msg)
break
}
}
// 发送响应