mirror of
https://github.com/v2fly/v2ray-core
synced 2024-02-27 03:18:06 +00:00
Fix: response AAAA records in TypeA query (#1235)
This commit is contained in:
@@ -304,11 +304,11 @@ func (s *DoHNameServer) findIPsForDomain(domain string, option dns_feature.IPOpt
|
|||||||
var ips []net.Address
|
var ips []net.Address
|
||||||
var ip6 []net.Address
|
var ip6 []net.Address
|
||||||
|
|
||||||
switch {
|
if option.IPv4Enable {
|
||||||
case option.IPv4Enable:
|
|
||||||
ips, err4 = record.A.getIPs()
|
ips, err4 = record.A.getIPs()
|
||||||
fallthrough
|
}
|
||||||
case option.IPv6Enable:
|
|
||||||
|
if option.IPv6Enable {
|
||||||
ip6, err6 = record.AAAA.getIPs()
|
ip6, err6 = record.AAAA.getIPs()
|
||||||
ips = append(ips, ip6...)
|
ips = append(ips, ip6...)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,11 +241,11 @@ func (s *QUICNameServer) findIPsForDomain(domain string, option dns_feature.IPOp
|
|||||||
var ips []net.Address
|
var ips []net.Address
|
||||||
var ip6 []net.Address
|
var ip6 []net.Address
|
||||||
|
|
||||||
switch {
|
if option.IPv4Enable {
|
||||||
case option.IPv4Enable:
|
|
||||||
ips, err4 = record.A.getIPs()
|
ips, err4 = record.A.getIPs()
|
||||||
fallthrough
|
}
|
||||||
case option.IPv6Enable:
|
|
||||||
|
if option.IPv6Enable {
|
||||||
ip6, err6 = record.AAAA.getIPs()
|
ip6, err6 = record.AAAA.getIPs()
|
||||||
ips = append(ips, ip6...)
|
ips = append(ips, ip6...)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -283,11 +283,11 @@ func (s *TCPNameServer) findIPsForDomain(domain string, option dns_feature.IPOpt
|
|||||||
var ips []net.Address
|
var ips []net.Address
|
||||||
var ip6 []net.Address
|
var ip6 []net.Address
|
||||||
|
|
||||||
switch {
|
if option.IPv4Enable {
|
||||||
case option.IPv4Enable:
|
|
||||||
ips, err4 = record.A.getIPs()
|
ips, err4 = record.A.getIPs()
|
||||||
fallthrough
|
}
|
||||||
case option.IPv6Enable:
|
|
||||||
|
if option.IPv6Enable {
|
||||||
ip6, err6 = record.AAAA.getIPs()
|
ip6, err6 = record.AAAA.getIPs()
|
||||||
ips = append(ips, ip6...)
|
ips = append(ips, ip6...)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,11 +223,11 @@ func (s *ClassicNameServer) findIPsForDomain(domain string, option dns_feature.I
|
|||||||
var ips []net.Address
|
var ips []net.Address
|
||||||
var ip6 []net.Address
|
var ip6 []net.Address
|
||||||
|
|
||||||
switch {
|
if option.IPv4Enable {
|
||||||
case option.IPv4Enable:
|
|
||||||
ips, err4 = record.A.getIPs()
|
ips, err4 = record.A.getIPs()
|
||||||
fallthrough
|
}
|
||||||
case option.IPv6Enable:
|
|
||||||
|
if option.IPv6Enable {
|
||||||
ip6, err6 = record.AAAA.getIPs()
|
ip6, err6 = record.AAAA.getIPs()
|
||||||
ips = append(ips, ip6...)
|
ips = append(ips, ip6...)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user