From cadb765b7d672de64a7824795c7f5c7c09d0a647 Mon Sep 17 00:00:00 2001 From: Ainar Garipov Date: Tue, 13 Jun 2023 17:04:47 +0300 Subject: [PATCH] all: sync with master; upd chlog --- CHANGELOG.md | 17 +++++++++++++--- go.mod | 2 +- go.sum | 4 ++-- internal/aghnet/interfaces_windows.go | 17 ---------------- internal/dhcpd/os_windows.go | 15 -------------- scripts/make/go-lint.sh | 28 ++++++++++++++++++++++----- 6 files changed, 40 insertions(+), 43 deletions(-) delete mode 100644 internal/aghnet/interfaces_windows.go delete mode 100644 internal/dhcpd/os_windows.go diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c8ec671..88ca9e69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,6 +36,16 @@ NOTE: Add new changes ABOVE THIS COMMENT. +## [v0.107.32] - 2023-06-13 + +### Fixed + + - DNSCrypt upstream not resetting the client and resolver information on + dialing errors ([#5872]). + + + + ## [v0.107.31] - 2023-06-08 See also the [v0.107.31 GitHub milestone][ms-v0.107.31]. @@ -2004,11 +2014,12 @@ See also the [v0.104.2 GitHub milestone][ms-v0.104.2]. -[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.31...HEAD +[Unreleased]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.32...HEAD +[v0.107.32]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.31...v0.107.32 [v0.107.31]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.30...v0.107.31 [v0.107.30]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.29...v0.107.30 [v0.107.29]: https://github.com/AdguardTeam/AdGuardHome/compare/v0.107.28...v0.107.29 diff --git a/go.mod b/go.mod index 870b4500..9c396d7d 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/AdguardTeam/AdGuardHome go 1.19 require ( - github.com/AdguardTeam/dnsproxy v0.50.1 + github.com/AdguardTeam/dnsproxy v0.50.2 github.com/AdguardTeam/golibs v0.13.2 github.com/AdguardTeam/urlfilter v0.16.1 github.com/NYTimes/gziphandler v1.1.1 diff --git a/go.sum b/go.sum index e16261d3..447fe966 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,5 @@ -github.com/AdguardTeam/dnsproxy v0.50.1 h1:A0HmAxb2izkOcuD50pRmR7ZnBL3/qF2DR2SlI6fN+6E= -github.com/AdguardTeam/dnsproxy v0.50.1/go.mod h1:CQhZTkqC8X0ID6glrtyaxgqRRdiYfn1gJulC1cZ5Dn8= +github.com/AdguardTeam/dnsproxy v0.50.2 h1:p1471SsMZ6SMo7T51Olw4aNluahvMwSLMorwxYV18ts= +github.com/AdguardTeam/dnsproxy v0.50.2/go.mod h1:CQhZTkqC8X0ID6glrtyaxgqRRdiYfn1gJulC1cZ5Dn8= github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= github.com/AdguardTeam/golibs v0.10.4/go.mod h1:rSfQRGHIdgfxriDDNgNJ7HmE5zRoURq8R+VdR81Zuzw= github.com/AdguardTeam/golibs v0.13.2 h1:BPASsyQKmb+b8VnvsNOHp7bKfcZl9Z+Z2UhPjOiupSc= diff --git a/internal/aghnet/interfaces_windows.go b/internal/aghnet/interfaces_windows.go deleted file mode 100644 index a00b7094..00000000 --- a/internal/aghnet/interfaces_windows.go +++ /dev/null @@ -1,17 +0,0 @@ -//go:build windows - -package aghnet - -import ( - "net" - - "github.com/AdguardTeam/AdGuardHome/internal/aghos" -) - -// listenPacketReusable announces on the local network address additionally -// configuring the socket to have a reusable binding. -func listenPacketReusable(_, _, _ string) (c net.PacketConn, err error) { - // TODO(e.burkov): Check if we are able to control sockets on Windows - // in the same way as on Unix. - return nil, aghos.Unsupported("listening packet reusable") -} diff --git a/internal/dhcpd/os_windows.go b/internal/dhcpd/os_windows.go deleted file mode 100644 index ae016cfc..00000000 --- a/internal/dhcpd/os_windows.go +++ /dev/null @@ -1,15 +0,0 @@ -//go:build windows - -package dhcpd - -import ( - "net" - - "github.com/AdguardTeam/AdGuardHome/internal/aghos" - "golang.org/x/net/ipv4" -) - -// Create a socket for receiving broadcast packets -func newBroadcastPacketConn(_ net.IP, _ int, _ string) (*ipv4.PacketConn, error) { - return nil, aghos.Unsupported("newBroadcastPacketConn") -} diff --git a/scripts/make/go-lint.sh b/scripts/make/go-lint.sh index cf07e3a9..9e23a3a8 100644 --- a/scripts/make/go-lint.sh +++ b/scripts/make/go-lint.sh @@ -3,7 +3,7 @@ # This comment is used to simplify checking local copies of the script. Bump # this number every time a significant change is made to this script. # -# AdGuard-Project-Version: 3 +# AdGuard-Project-Version: 4 verbose="${VERBOSE:-0}" readonly verbose @@ -80,6 +80,12 @@ esac # # * Package golang.org/x/net/context has been moved into stdlib. # +# Currently, the only standard exception are files generated from protobuf +# schemas, which use package reflect. If your project needs more exceptions, +# add and document them. +# +# TODO(a.garipov): Add deprecated packages golang.org/x/exp/maps and +# golang.org/x/exp/slices once all projects switch to Go 1.21. blocklist_imports() { git grep\ -e '[[:space:]]"errors"$'\ @@ -91,6 +97,7 @@ blocklist_imports() { -e '[[:space:]]"golang.org/x/net/context"$'\ -n\ -- '*.go'\ + ':!*.pb.go'\ | sed -e 's/^\([^[:space:]]\+\)\(.*\)$/\1 blocked import:\2/'\ || exit 0 } @@ -101,6 +108,7 @@ method_const() { git grep -F\ -e '"DELETE"'\ -e '"GET"'\ + -e '"PATCH"'\ -e '"POST"'\ -e '"PUT"'\ -n\ @@ -126,7 +134,7 @@ underscores() { -e '_others.go'\ -e '_test.go'\ -e '_unix.go'\ - -e '_windows.go' \ + -e '_windows.go'\ -v\ | sed -e 's/./\t\0/' )" @@ -165,8 +173,9 @@ run_linter ineffassign ./... run_linter unparam ./... -git ls-files -- 'Makefile' '*.go' '*.mod' '*.sh' '*.yaml' '*.yml'\ - | xargs misspell --error +git ls-files -- 'Makefile' '*.conf' '*.go' '*.mod' '*.sh' '*.yaml' '*.yml'\ + | xargs misspell --error\ + | sed -e 's/^/misspell: /' run_linter looppointer ./... @@ -182,4 +191,13 @@ run_linter -e shadow --strict ./... # TODO(a.garipov): Enable --blank? run_linter errcheck --asserts ./... -run_linter staticcheck ./... +staticcheck_matrix=' +darwin: GOOS=darwin +freebsd: GOOS=freebsd +linux: GOOS=linux +openbsd: GOOS=openbsd +windows: GOOS=windows +' +readonly staticcheck_matrix + +echo "$staticcheck_matrix" | run_linter staticcheck --matrix ./...