From 24d7dc8e8a36654bc8d2d64c2014419bd7a9eb25 Mon Sep 17 00:00:00 2001 From: Dimitry Kolyshev Date: Mon, 23 May 2022 16:04:14 +0300 Subject: [PATCH] Pull request: all: upd dnsproxy Merge in DNS/adguard-home from 4503-upstream-conf to master Squashed commit of the following: commit c6cb1babd4cbf9aacafe902e3d54ce17e8d2cc81 Merge: 75d85ed1 79d85a24 Author: Dimitry Kolyshev Date: Mon May 23 13:06:00 2022 +0200 Merge remote-tracking branch 'origin/master' into 4503-upstream-conf commit 75d85ed1f4d8d5060800b2f8a4cde662db02ae30 Author: Dimitry Kolyshev Date: Fri May 20 13:14:16 2022 +0200 all: upd dnsproxy commit 781768d639388a60fc90631f819cfc5dd90b9eba Author: Dimitry Kolyshev Date: Mon May 16 16:27:25 2022 +0200 all: docs commit 0dafb5b3fe11b1952d9a04294bcaaa8091b9c2a7 Author: Dimitry Kolyshev Date: Mon May 16 16:17:35 2022 +0200 all: docs commit 0d5463e4157132b0e6be78fd97eaf5a5cb8d1edc Merge: e2c86909 f289f4b1 Author: Dimitry Kolyshev Date: Mon May 16 16:01:40 2022 +0200 Merge remote-tracking branch 'origin/master' into 4503-upstream-conf # Conflicts: # go.mod # go.sum commit e2c869091b1386065076f44dbf9498a31c9d5451 Author: Dimitry Kolyshev Date: Mon May 16 15:29:17 2022 +0200 all: upd dnsrpoxy --- CHANGELOG.md | 2 ++ go.mod | 2 +- go.sum | 4 ++-- internal/dnsforward/http.go | 1 + 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d183c45d..8aca8f15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ and this project adheres to ### Added +- Support upstreams for subdomains of a domain only ([#4503]). - Support for Discovery of Designated Resolvers (DDR) according to the [RFC draft][ddr-draft-06] ([#4463]). - The ability to control each source of runtime clients separately via @@ -150,6 +151,7 @@ In this release, the schema version has changed from 12 to 14. [#4273]: https://github.com/AdguardTeam/AdGuardHome/issues/4273 [#4276]: https://github.com/AdguardTeam/AdGuardHome/issues/4276 [#4499]: https://github.com/AdguardTeam/AdGuardHome/issues/4499 +[#4503]: https://github.com/AdguardTeam/AdGuardHome/issues/4503 [#4533]: https://github.com/AdguardTeam/AdGuardHome/issues/4533 [#4542]: https://github.com/AdguardTeam/AdGuardHome/issues/4542 diff --git a/go.mod b/go.mod index 8da34653..4d9d2191 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/AdguardTeam/AdGuardHome go 1.17 require ( - github.com/AdguardTeam/dnsproxy v0.42.2 + github.com/AdguardTeam/dnsproxy v0.42.4 github.com/AdguardTeam/golibs v0.10.8 github.com/AdguardTeam/urlfilter v0.16.0 github.com/NYTimes/gziphandler v1.1.1 diff --git a/go.sum b/go.sum index 807a6849..73accb25 100644 --- a/go.sum +++ b/go.sum @@ -7,8 +7,8 @@ dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBr dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4= dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= -github.com/AdguardTeam/dnsproxy v0.42.2 h1:aBhbuvqg/rZN8Rab5ILSfPFJDkiTviWXXcceJgajnNs= -github.com/AdguardTeam/dnsproxy v0.42.2/go.mod h1:thHuk3599mgmucsv5J9HR9lBVQHnf4YleE08EbxNrN0= +github.com/AdguardTeam/dnsproxy v0.42.4 h1:Rf45a3H6U/8XqWMYAMEsC1g/dVudyfgx4WY8N2syJMw= +github.com/AdguardTeam/dnsproxy v0.42.4/go.mod h1:thHuk3599mgmucsv5J9HR9lBVQHnf4YleE08EbxNrN0= github.com/AdguardTeam/golibs v0.4.0/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= github.com/AdguardTeam/golibs v0.4.2/go.mod h1:skKsDKIBB7kkFflLJBpfGX+G8QFTx0WKUzB6TIgtUj4= github.com/AdguardTeam/golibs v0.10.4/go.mod h1:rSfQRGHIdgfxriDDNgNJ7HmE5zRoURq8R+VdR81Zuzw= diff --git a/internal/dnsforward/http.go b/internal/dnsforward/http.go index 2b7cfd13..50ab9643 100644 --- a/internal/dnsforward/http.go +++ b/internal/dnsforward/http.go @@ -510,6 +510,7 @@ func separateUpstream(upstreamStr string) (upstream string, isDomainSpec bool, e continue } + host = strings.TrimPrefix(host, "*.") err = netutil.ValidateDomainName(host) if err != nil { return "", true, fmt.Errorf("domain at index %d: %w", i, err)