Skip to content

Commit

Permalink
Pull request: 4927-ddr-template
Browse files Browse the repository at this point in the history
Updates AdguardTeam#4927.

Squashed commit of the following:

commit 8cf080d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Sep 20 15:18:48 2022 +0300

    dnsforward: fix doh template
  • Loading branch information
ainar-g authored and annguyen0 committed Sep 21, 2022
1 parent f7dcf18 commit 8f9c96d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ and this project adheres to
- Support for plain (unencrypted) HTTP/2 ([#4930]). This is useful for AdGuard
Home installations behind a reverse proxy.

### Fixed

- Incorrect path template in DDR responses ([#4927]).

[#2993]: https://github.com/AdguardTeam/AdGuardHome/issues/2993
[#4927]: https://github.com/AdguardTeam/AdGuardHome/issues/4927
[#4930]: https://github.com/AdguardTeam/AdGuardHome/issues/4930


Expand Down
2 changes: 1 addition & 1 deletion internal/dnsforward/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (s *Server) makeDDRResponse(req *dns.Msg) (resp *dns.Msg) {
values := []dns.SVCBKeyValue{
&dns.SVCBAlpn{Alpn: []string{"h2"}},
&dns.SVCBPort{Port: uint16(addr.Port)},
&dns.SVCBDoHPath{Template: "/dns-query?dns"},
&dns.SVCBDoHPath{Template: "/dns-query{?dns}"},
}

ans := &dns.SVCB{
Expand Down
2 changes: 1 addition & 1 deletion internal/dnsforward/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestServer_ProcessDDRQuery(t *testing.T) {
Value: []dns.SVCBKeyValue{
&dns.SVCBAlpn{Alpn: []string{"h2"}},
&dns.SVCBPort{Port: 8044},
&dns.SVCBDoHPath{Template: "/dns-query?dns"},
&dns.SVCBDoHPath{Template: "/dns-query{?dns}"},
},
}

Expand Down

0 comments on commit 8f9c96d

Please sign in to comment.