* rdns,whois: get client info for all question types (not just A/AAAA)
This commit is contained in:
parent
67a3d44b8c
commit
ddfd53bf06
|
@ -13,7 +13,6 @@ import (
|
||||||
"github.com/AdguardTeam/dnsproxy/proxy"
|
"github.com/AdguardTeam/dnsproxy/proxy"
|
||||||
"github.com/AdguardTeam/golibs/log"
|
"github.com/AdguardTeam/golibs/log"
|
||||||
"github.com/joomcode/errorx"
|
"github.com/joomcode/errorx"
|
||||||
"github.com/miekg/dns"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type dnsContext struct {
|
type dnsContext struct {
|
||||||
|
@ -137,11 +136,6 @@ func isPublicIP(ip net.IP) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func onDNSRequest(d *proxy.DNSContext) {
|
func onDNSRequest(d *proxy.DNSContext) {
|
||||||
qType := d.Req.Question[0].Qtype
|
|
||||||
if qType != dns.TypeA && qType != dns.TypeAAAA {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
ip := dnsforward.GetIPString(d.Addr)
|
ip := dnsforward.GetIPString(d.Addr)
|
||||||
if ip == "" {
|
if ip == "" {
|
||||||
// This would be quite weird if we get here
|
// This would be quite weird if we get here
|
||||||
|
|
Loading…
Reference in New Issue