http://sjnrk23rmcl4ie5atmz664v7o7k5nkk4jh7mm6lor2n4hxz2tos3eyid.onion/c-dns-tests.html
"github.com/miekg/dns"
...
msg = new(dns.Msg)
err := msg.Unpack(m.QueryMessage) This allows us to get information like the QNAME (name used in the
question): qname := make([]byte, 256)
...
n, err = dns.PackDomainName(msg.Question[0].Name, qname, 0, nil, false)
...
s.Write(cborByteString(qname[0:n])) ( Unpack leaves us with a domain
name in the presentation - text - format, but C-DNS
requires the label - binary - format, which we do with PackDomainName .)