mirror of
https://github.com/folbricht/routedns.git
synced 2026-04-30 04:59:17 -05:00
72e4730046
* Support for Oblivious DNS client * Update to the ODoH client (#418) * fixing context problem * Updated the ODoH client * allowing ODoH client to send queries without a proxy * added missing code to load pre configured ODoH server config key * added missing support for ODoH servers not on port 443 * Implemented feedback on ODoH client --------- Co-authored-by: Leonard Walter <50204487+LeonardWalter@users.noreply.github.com>
19 lines
479 B
Go
19 lines
479 B
Go
package rdns
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/miekg/dns"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestODOHClientSimple(t *testing.T) {
|
|
d, err := NewODoHClient("test-odoh", "https://odoh-noads-nl.alekberg.net/proxy", "https://odoh.cloudflare-dns.com/dns-query", "", DoHClientOptions{})
|
|
require.NoError(t, err)
|
|
q := new(dns.Msg)
|
|
q.SetQuestion("cloudflare.com.", dns.TypeA)
|
|
r, err := d.Resolve(q, ClientInfo{})
|
|
require.NoError(t, err)
|
|
require.NotEmpty(t, r.Answer)
|
|
}
|