Commits


gofmt


doc: tutorial with the even simpler Ask function that is the simplest operation, not Exchange (anymore)!


recursor: reject more invalid messages


dns: error on receiving random messages Caller can handle the error appropriately I reckon...


dns: Separate sending messages from sending bytes That made it easy to then let us ResponseWriter to implement io.Writer


dns: cleaner error handling on send packet


New Ask functions These let us specify just a question without needing to worry about the entire DNS message structure.


doc: use rfc5737 documentation IP addresses


doc: more Server documentation


Initial package documentation


dump


Use fancy bit operations to encode message length Instead of encoding/binary package. Removes that package dependency


Use the message length field to only read that much Using io.ReadAll doesn't work properly. The socket has a queue that may be entirely drained by this call, which means we could accidentally read a bit of the next message if there is one in the queue.


read the entire DNS message over TCP, handle EOF we were just reading 1024 bytes may or may not have contained the whole message. And before we weren't even handling EOF from the underlying connection. Now the io package handles it for us.


error on receiving a message with the wrong message ID


oops


Seperate packet handling over UDP and TCP better Because it's a stream versus just 1 packet so there's some tricky handling that should be seperate for clarity


Support making DNS queries over TLS Little gotcha is that TCP messages need to be prepended with a 2-octet length field!


Move core DNS routines into the dns package because it doesn't really have anything to do with DNS over HTTPS


Make git.sr.ht/~otl/dns a Go package And rename dohtest to dohproxy. This thing is going live soon baby