AdguardTeam / AdGuardHome

Network-wide ads & trackers blocking DNS server
https://adguard.com/adguard-home.html
GNU General Public License v3.0
24.68k stars 1.79k forks source link

An error will be reported when the upstream dns server sets the Google DOH address #5447

Closed DustinWin closed 1 year ago

DustinWin commented 1 year ago

Prerequisites

Operating system type

Linux, OpenWrt

CPU architecture

64-bit ARM

Installation

GitHub releases or script from README

Setup

On a router, DHCP is handled by the router

AdGuard Home version

v0.108.0-b.26

Description

What did you do?

Go to Settings-->DNS Settings, add https://dns.google/dns-query to the upstream DNS server, and click the Test Upstream DNS button

Expected result

No error

Actual result

Report error

Screenshots (if applicable)

QQ截图20230204164148 QQ截图20230204164235

Additional information

When it is set to https://dns.google/dns-query, an error will be reported when clicking to test the upstream DNS, but it is normal when it is set to tls://dns.google

ainar-g commented 1 year ago

Hello. I cannot reproduce this. Please make sure that the service isn't blocked by your ISP.

If you want to try and debug the issue, you can enable verbose logging.

DustinWin commented 1 year ago

Hello. I cannot reproduce this. Please make sure that the service isn't blocked by your ISP.

If you want to try and debug the issue, you can enable verbose logging.

Is this log ok?

2023/02/05 12:43:14.189369 11854#227 [debug] https://dns.google:443/dns-query: response: requesting https://dns.google:443/dns-query: Get "https://dns.google:443/dns-query?dns=AAABAAABAAAAAAAABHRlc3QAAAEAAQ": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2023/02/05 12:43:14.189379 11854#298 [debug] github.com/AdguardTeam/dnsproxy/upstream.(*bootstrapper).createDialContext.func1(): dialer failed to initialize connection to 8.8.4.4:443, in 10.000841846s, cause: dial tcp 8.8.4.4:443: i/o timeout
2023/02/05 12:43:14.189477 11854#227 [debug] re-creating the http client due to requesting https://dns.google:443/dns-query: Get "https://dns.google:443/dns-query?dns=AAABAAABAAAAAAAABHRlc3QAAAEAAQ": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2023/02/05 12:43:14.189568 11854#298 [debug] github.com/AdguardTeam/dnsproxy/upstream.(*bootstrapper).createDialContext.func1(): Dialing to 8.8.8.8:443
2023/02/05 12:43:14.189584 11854#227 [debug] using HTTP/2 for this upstream: HTTP3 support is not enabled
2023/02/05 12:43:14.189691 11854#298 [debug] github.com/AdguardTeam/dnsproxy/upstream.(*bootstrapper).createDialContext.func1(): dialer failed to initialize connection to 8.8.8.8:443, in 27.692µs, cause: dial tcp 8.8.8.8:443: i/o timeout
2023/02/05 12:43:14.189768 11854#298 [debug] github.com/AdguardTeam/dnsproxy/upstream.(*bootstrapper).createDialContext.func1(): Dialing to [2001:4860:4860::8844]:443
2023/02/05 12:43:14.189907 11854#298 [debug] github.com/AdguardTeam/dnsproxy/upstream.(*bootstrapper).createDialContext.func1(): dialer failed to initialize connection to [2001:4860:4860::8844]:443, in 15.385µs, cause: dial tcp [2001:4860:4860::8844]:443: i/o timeout
2023/02/05 12:43:14.189964 11854#205 [debug] finished POST 192.168.31.1:3000 /control/test_upstream_dns in 10.03309177s
2023/02/05 12:43:14.189993 11854#298 [debug] github.com/AdguardTeam/dnsproxy/upstream.(*bootstrapper).createDialContext.func1(): Dialing to [2001:4860:4860::8888]:443
2023/02/05 12:43:14.190079 11854#298 [debug] github.com/AdguardTeam/dnsproxy/upstream.(*bootstrapper).createDialContext.func1(): dialer failed to initialize connection to [2001:4860:4860::8888]:443, in 6.539µs, cause: dial tcp [2001:4860:4860::8888]:443: i/o timeout
ainar-g commented 1 year ago

Yes. The log seems to confirm that Google's DoH endpoint is unreachable from your network:

Client.Timeout exceeded while awaiting headers i/o timeout

DustinWin commented 1 year ago

Yes. The log seems to confirm that Google's DoH endpoint is unreachable from your network:

Client.Timeout exceeded while awaiting headers i/o timeout

Do you know why? Setting "tls:dns.google" is fine.

ainar-g commented 1 year ago

DNS-over-TLS and DNS-over-HTTPS use different ports, so one may be available where the other one isn't.

I'll close this issue as it seems like it's not an issue with AGH.

DustinWin commented 1 year ago

DNS-over-TLS 和 DNS-over-HTTPS 使用不同的端口,因此一个可能可用,而另一个不可用。

我将关闭此问题,因为这似乎不是 AGH 的问题。

OK, thanks!