Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS over QUIC slow #75

Open
moderation opened this issue Aug 9, 2023 · 0 comments
Open

DNS over QUIC slow #75

moderation opened this issue Aug 9, 2023 · 0 comments

Comments

@moderation
Copy link

DNS queries over QUIC are always slow and appear to be hitting some sort of timeout. This behavior is the same on MacOS and Linux. Queries to @quic://dns.adguard.com are always over 6 seconds. This is using main branch and Go 1.21.0 and the following patch which appears to be required for the HTTPS queries:

diff --git a/pkg/resolvers/doq.go b/pkg/resolvers/doq.go
index 33bc47f..0242c99 100644
--- a/pkg/resolvers/doq.go
+++ b/pkg/resolvers/doq.go
@@ -26,7 +26,8 @@ type DOQResolver struct {
 func NewDOQResolver(server string, resolverOpts Options) (Resolver, error) {
        return &DOQResolver{
                tls: &tls.Config{
-                       NextProtos: []string{"doq"},
+                       InsecureSkipVerify: true,
+                       NextProtos:         []string{"doq"},
                },
                server:          server,
                resolverOptions: resolverOpts,
time doggo @https://cloudflare-dns.com/dns-query A AAAA HTTPS cloudflare.com;
time doggo @quic://dns.adguard.com A AAAA HTTPS cloudflare.com

NAME                   TYPE    CLASS   TTL     ADDRESS                                                 NAMESERVER
cloudflare.com.        A       IN      32s     104.16.132.229                                          https://cloudflare-dns.com/dns-query
cloudflare.com.        A       IN      32s     104.16.133.229                                          https://cloudflare-dns.com/dns-query
cloudflare.com.        AAAA    IN      136s    2606:4700::6810:84e5                                    https://cloudflare-dns.com/dns-query
cloudflare.com.        AAAA    IN      136s    2606:4700::6810:85e5                                    https://cloudflare-dns.com/dns-query
cloudflare.com.        HTTPS   IN      56s     1 . alpn="h3,h2"                                        https://cloudflare-dns.com/dns-query
                                               ipv4hint="104.16.132.229,104.16.133.229"
                                               ipv6hint="2606:4700::6810:84e5,2606:4700::6810:85e5"

________________________________________________________
Executed in  129.20 millis    fish           external
   usr time    4.88 millis   38.00 micros    4.84 millis
   sys time    4.80 millis  721.00 micros    4.08 millis

NAME                   TYPE    CLASS   TTL     ADDRESS                                                 NAMESERVER
cloudflare.com.        A       IN      212s    104.16.133.229                                          dns.adguard.com:853
cloudflare.com.        A       IN      212s    104.16.132.229                                          dns.adguard.com:853
cloudflare.com.        AAAA    IN      212s    2606:4700::6810:84e5                                    dns.adguard.com:853
cloudflare.com.        AAAA    IN      212s    2606:4700::6810:85e5                                    dns.adguard.com:853
cloudflare.com.        HTTPS   IN      300s    1 . alpn="h3,h2"                                        dns.adguard.com:853
                                               ipv4hint="104.16.132.229,104.16.133.229"
                                               ipv6hint="2606:4700::6810:84e5,2606:4700::6810:85e5"

________________________________________________________
Executed in    6.41 secs      fish           external
   usr time    5.65 millis   50.00 micros    5.60 millis
   sys time    5.51 millis  473.00 micros    5.04 millis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant