This commit is contained in:
Aleksey Dmitrevskiy 2019-02-25 17:15:50 +03:00
parent 3d901a82ad
commit 86279f19b0
2 changed files with 9 additions and 7 deletions

View File

@ -631,6 +631,7 @@ func (d *Dnsfilter) checkSafeSearch(host string) (Result, error) {
return res, nil
}
// TODO this address should be resolved with upstream that was configured in dnsforward
addrs, err := net.LookupIP(safeHost)
if err != nil {
log.Tracef("SafeSearchDomain for %s was found but failed to lookup for %s cause %s", host, safeHost, err)

View File

@ -16,6 +16,7 @@ import (
"time"
"github.com/AdguardTeam/dnsproxy/proxy"
"github.com/stretchr/testify/assert"
"github.com/AdguardTeam/AdGuardHome/dnsfilter"
@ -152,7 +153,7 @@ func TestSafeSearch(t *testing.T) {
}
// Test safe search for yandex. We already know safe search ip
addr := s.dnsProxy.Addr("udp")
addr := s.dnsProxy.Addr(proxy.ProtoUDP)
client := dns.Client{Net: "udp"}
yandexDomains := []string{"yandex.com.", "yandex.by.", "yandex.kz.", "yandex.ru.", "yandex.com."}
for _, host := range yandexDomains {