From 180dea3b915cf782ced6e90bd109a160f39ff8d0 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Tue, 31 Aug 2021 20:33:03 +0300 Subject: [PATCH] imp docs, rm unused field, go mod tidy (#13) --- go.mod | 4 ++-- go.sum | 3 --- server.go | 8 ++++++-- server_test.go | 1 - 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index 1c90381..340dd6b 100644 --- a/go.mod +++ b/go.mod @@ -1,5 +1,7 @@ module github.com/ameshkov/dnscrypt/v2 +go 1.16 + require ( github.com/AdguardTeam/golibs v0.4.2 github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da @@ -13,5 +15,3 @@ require ( golang.org/x/sys v0.0.0-20200331124033-c3d80250170d // indirect gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c ) - -go 1.14 diff --git a/go.sum b/go.sum index 4dbbe1e..c2fd475 100644 --- a/go.sum +++ b/go.sum @@ -6,14 +6,11 @@ github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635 h1:52m0LGchQBBVqJRyY github.com/aead/poly1305 v0.0.0-20180717145839-3fee0db0b635/go.mod h1:lmLxL+FV291OopO93Bwf9fQLQeLyt33VJRUg5VJ30us= github.com/ameshkov/dnsstamps v1.0.1 h1:LhGvgWDzhNJh+kBQd/AfUlq1vfVe109huiXw4JhnPug= github.com/ameshkov/dnsstamps v1.0.1/go.mod h1:Ii3eUu73dx4Vw5O4wjzmT5+lkCwovjzaEZZ4gKyIH5A= -github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/miekg/dns v1.1.29 h1:xHBEhR+t5RzcFJjBLJlax2daXOrTYtr9z4WdKEfWFzg= -github.com/miekg/dns v1.1.29/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/miekg/dns v1.1.40 h1:pyyPFfGMnciYUk/mXpKkVmeMQjfXqt3FAJ2hy7tPiLA= github.com/miekg/dns v1.1.40/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/server.go b/server.go index ba4a812..7a96c51 100644 --- a/server.go +++ b/server.go @@ -18,8 +18,12 @@ const defaultReadTimeout = 2 * time.Second // then we start using defaultTCPIdleTimeout const defaultTCPIdleTimeout = 8 * time.Second -// defaultUDPSize is the size of the UDP read buffer. Using 1252 by default, -// see here: https://github.com/AdguardTeam/AdGuardDNS/issues/188 +// defaultUDPSize is the default size of the UDP read buffer. The release notes +// for dnscrypt-proxy version 1.1.0-RC1 claim that this size was chosen as the +// maximum one "for compatibility with some scary network setups", and making it +// smaller seems to break things for some people. +// +// See also: https://github.com/AdguardTeam/AdGuardDNS/issues/188. const defaultUDPSize = 1252 // helper struct that is used in several SetReadDeadline calls diff --git a/server_test.go b/server_test.go index c8796a8..e5361ed 100644 --- a/server_test.go +++ b/server_test.go @@ -216,7 +216,6 @@ type testServer struct { resolverPk ed25519.PublicKey udpConn *net.UDPConn tcpListen net.Listener - handler Handler } func (s *testServer) TCPAddr() *net.TCPAddr {