dns

DNS client and server implementations using the Go project's dnsmessage package
Log | Files | Refs | README | LICENSE

commit 278edeb3778ea102ba404c672b2b0fc325c4e99c
parent 4a855f830665972ffa0869e3f736e0c38cc650f9
Author: Oliver Lowe <o@olowe.co>
Date:   Sun, 12 Dec 2021 13:17:49 +1100

doc: use rfc5737 documentation IP addresses

Diffstat:
Mdns.go | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dns.go b/dns.go @@ -6,7 +6,6 @@ TCP (including TLS). The package deliberately does not implement all features of the DNS specifications. Notably EDNS and DNSSEC are unsupported. -TODO(otl): use documentation-reserved IP addresses. The most basic operation is creating a DNS message, sending it to a DNS server, then handling the reply using Exchange: @@ -16,7 +15,7 @@ DNS server, then handling the reply using Exchange: // ... }, } - rmsg, err := dns.Exchange(qmsg, "9.9.9.9:domain") + rmsg, err := dns.Exchange(qmsg, "192.0.2.1:domain") // ... Queries to a recursive resolver via DNS over TLS (DoT) can be made with ExchangeTLS: @@ -35,7 +34,7 @@ Queries to a recursive resolver via DNS over TLS (DoT) can be made with Exchange }, }, } - rmsg, err := dns.ExchangeTLS(qmsg, "9.9.9.9:853") + rmsg, err := dns.ExchangeTLS(qmsg, "192.0.2.1:853") ListenAndServe starts a DNS server listening on the given network and address. Received messages are managed with the given Handler in a new