Skip to content

Commit 1db7823

Browse files
committed
fix: directDNS AAAA
1 parent 93e86be commit 1db7823

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/dns/dns.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ func directDNS(addr string) (net.IP, error) {
124124
}
125125
}
126126

127-
msg.SetQuestion(dns.Fqdn(NsServer), dns.TypeAAAA)
127+
msg.SetQuestion(dns.Fqdn(addr), dns.TypeAAAA)
128128
rec, _, err = DefaultClient.Exchange(msg, nsAddr)
129129
if err == nil {
130130
for _, ans := range rec.Answer {

lib/dns/dns_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ func TestDirectDNS(t *testing.T) {
66
RoaFinder = "223.5.5.5:53"
77
testcases := []string{
88
"www.baidu.com",
9-
"dorm.ec3o.fun",
109
}
1110
for _, testcase := range testcases {
1211
ip, err := directDNS(testcase)

0 commit comments

Comments
 (0)