Start using dnsproxy

This commit is contained in:
Andrey Meshkov
2018-12-24 15:19:52 +03:00
parent b195080012
commit e711f6e5fe
19 changed files with 356 additions and 1652 deletions

View File

@@ -12,6 +12,8 @@ import (
"strings"
"time"
"github.com/AdguardTeam/dnsproxy/upstream"
"github.com/AdguardTeam/AdGuardHome/dnsforward"
"github.com/miekg/dns"
@@ -204,7 +206,7 @@ func handleTestUpstreamDNS(w http.ResponseWriter, r *http.Request) {
func checkDNS(input string) error {
log.Printf("Checking if DNS %s works...", input)
u, err := dnsforward.AddressToUpstream(input, "")
u, err := upstream.AddressToUpstream(input, "")
if err != nil {
return fmt.Errorf("Failed to choose upstream for %s: %s", input, err)
}