$ go run dnsserver.go &
Listening at: :1053
$ dig example.com @localhost -p 1053
Received request from [::1]:63282
; <<>> DiG 9.10.6 <<>> example.com @localhost -p 1053
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17060
;; flags: qr; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;example.com. IN A
;; ANSWER SECTION:
example.com. 31337 IN A 3.1.3.7
;; Query time: 0 msec
;; SERVER: ::1#1053(::1)
;; WHEN: Mon Jun 17 17:02:43 CEST 2019
;; MSG SIZE rcvd: 56
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/20190625203542.GB118392%40thyrsus.com.
For more options, visit https://groups.google.com/d/optout.
I realize this is a learning exercise for you, but in case you're interested, the DNS message types are implemented for you in https://godoc.org/golang.org/x/net/dns/dnsmessage.
On Tue, Jun 25, 2019 at 1:36 PM Eric S. Raymond <e...@thyrsus.com> wrote:
Daniel Lorch <dlo...@gmail.com>:
> I have implemented a simple authoritative DNS Server in Go. You can find it
> here: https://github.com/dlorch/dnsserver/
>
> It's a study project to teach myself Go and DNS.
Haven't looked at it yet, but I must say I think you just nailed one
of the ideal use cases for Go. Provable buffer overrun protection is
especially desirable in this kind of service, and the language
libraries undoubtedly make for a small, clean, exceptionally auditable
implementation. Good on you.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golan...@googlegroups.com.