From 40c33e8fce6ec31668ef4ae6012d586c61551310 Mon Sep 17 00:00:00 2001 From: gVisor bot Date: Sun, 12 Jun 2022 17:53:11 +0800 Subject: [PATCH] chore: doq default port change to 853, ALPN use doq --- config/config.go | 2 +- dns/doq.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/config.go b/config/config.go index e552751f..a38c90b2 100644 --- a/config/config.go +++ b/config/config.go @@ -666,7 +666,7 @@ func parseNameServer(servers []string) ([]dns.NameServer, error) { addr = u.Host dnsNetType = "dhcp" // UDP from DHCP case "quic": - addr, err = hostWithDefaultPort(u.Host, "784") + addr, err = hostWithDefaultPort(u.Host, "853") dnsNetType = "quic" // DNS over QUIC default: return nil, fmt.Errorf("DNS NameServer[%d] unsupport scheme: %s", idx, u.Scheme) diff --git a/dns/doq.go b/dns/doq.go index 04d80d13..265abc24 100644 --- a/dns/doq.go +++ b/dns/doq.go @@ -17,7 +17,7 @@ import ( D "github.com/miekg/dns" ) -const NextProtoDQ = "doq-i00" +const NextProtoDQ = "doq" var bytesPool = sync.Pool{New: func() interface{} { return &bytes.Buffer{} }} @@ -149,6 +149,7 @@ func (dc *quicClient) openSession() (quic.Connection, error) { ) host, port, err := net.SplitHostPort(dc.addr) + if err != nil { return nil, err }