* /control/dns_config: allow all valid bootstrap server notations

Close #1843

Squashed commit of the following:

commit cc82b373816b76a803d29e4baae18384aa0f8c67
Author: Simon Zolin <s.zolin@adguard.com>
Date:   Thu Aug 20 14:20:35 2020 +0300

    * /control/dns_config: allow all valid bootstrap server notations

    * use dnsproxy v0.31.1
This commit is contained in:
Simon Zolin
2020-08-21 15:54:16 +03:00
parent 546a02b49e
commit eb3999a261
4 changed files with 20 additions and 7 deletions

View File

@@ -142,7 +142,8 @@ func TestHome(t *testing.T) {
assert.Equal(t, http.StatusOK, resp.StatusCode)
// test DNS over UDP
r := upstream.NewResolver("127.0.0.1:5354", 3*time.Second)
r, err := upstream.NewResolver("127.0.0.1:5354", 3*time.Second)
assert.Nil(t, err)
addrs, err := r.LookupIPAddr(context.TODO(), "static.adguard.com")
assert.Nil(t, err)
haveIP := len(addrs) != 0