1[![Build Status](https://travis-ci.org/miekg/dns.svg?branch=master)](https://travis-ci.org/miekg/dns) [![](https://godoc.org/github.com/miekg/dns?status.svg)](https://godoc.org/github.com/miekg/dns) 2 3# Alternative (more granular) approach to a DNS library 4 5> Less is more. 6 7Complete and usable DNS library. All widely used Resource Records are 8supported, including the DNSSEC types. It follows a lean and mean philosophy. 9If there is stuff you should know as a DNS programmer there isn't a convenience 10function for it. Server side and client side programming is supported, i.e. you 11can build servers and resolvers with it. 12 13We try to keep the "master" branch as sane as possible and at the bleeding edge 14of standards, avoiding breaking changes wherever reasonable. We support the last 15two versions of Go, currently: 1.5 and 1.6. 16 17# Goals 18 19* KISS; 20* Fast; 21* Small API, if its easy to code in Go, don't make a function for it. 22 23# Users 24 25A not-so-up-to-date-list-that-may-be-actually-current: 26 27* https://cloudflare.com 28* https://github.com/abh/geodns 29* http://www.statdns.com/ 30* http://www.dnsinspect.com/ 31* https://github.com/chuangbo/jianbing-dictionary-dns 32* http://www.dns-lg.com/ 33* https://github.com/fcambus/rrda 34* https://github.com/kenshinx/godns 35* https://github.com/skynetservices/skydns 36* https://github.com/hashicorp/consul 37* https://github.com/DevelopersPL/godnsagent 38* https://github.com/duedil-ltd/discodns 39* https://github.com/StalkR/dns-reverse-proxy 40* https://github.com/tianon/rawdns 41* https://mesosphere.github.io/mesos-dns/ 42* https://pulse.turbobytes.com/ 43* https://play.google.com/store/apps/details?id=com.turbobytes.dig 44* https://github.com/fcambus/statzone 45* https://github.com/benschw/dns-clb-go 46* https://github.com/corny/dnscheck for http://public-dns.info/ 47* https://namesmith.io 48* https://github.com/miekg/unbound 49* https://github.com/miekg/exdns 50* https://dnslookup.org 51* https://github.com/looterz/grimd 52* https://github.com/phamhongviet/serf-dns 53* https://github.com/mehrdadrad/mylg 54* https://github.com/bamarni/dockness 55* https://github.com/fffaraz/microdns 56 57Send pull request if you want to be listed here. 58 59# Features 60 61* UDP/TCP queries, IPv4 and IPv6; 62* RFC 1035 zone file parsing ($INCLUDE, $ORIGIN, $TTL and $GENERATE (for all record types) are supported; 63* Fast: 64 * Reply speed around ~ 80K qps (faster hardware results in more qps); 65 * Parsing RRs ~ 100K RR/s, that's 5M records in about 50 seconds; 66* Server side programming (mimicking the net/http package); 67* Client side programming; 68* DNSSEC: signing, validating and key generation for DSA, RSA and ECDSA; 69* EDNS0, NSID, Cookies; 70* AXFR/IXFR; 71* TSIG, SIG(0); 72* DNS over TLS: optional encrypted connection between client and server; 73* DNS name compression; 74* Depends only on the standard library. 75 76Have fun! 77 78Miek Gieben - 2010-2012 - <miek@miek.nl> 79 80# Building 81 82Building is done with the `go` tool. If you have setup your GOPATH 83correctly, the following should work: 84 85 go get github.com/miekg/dns 86 go build github.com/miekg/dns 87 88## Examples 89 90A short "how to use the API" is at the beginning of doc.go (this also will show 91when you call `godoc github.com/miekg/dns`). 92 93Example programs can be found in the `github.com/miekg/exdns` repository. 94 95## Supported RFCs 96 97*all of them* 98 99* 103{4,5} - DNS standard 100* 1348 - NSAP record (removed the record) 101* 1982 - Serial Arithmetic 102* 1876 - LOC record 103* 1995 - IXFR 104* 1996 - DNS notify 105* 2136 - DNS Update (dynamic updates) 106* 2181 - RRset definition - there is no RRset type though, just []RR 107* 2537 - RSAMD5 DNS keys 108* 2065 - DNSSEC (updated in later RFCs) 109* 2671 - EDNS record 110* 2782 - SRV record 111* 2845 - TSIG record 112* 2915 - NAPTR record 113* 2929 - DNS IANA Considerations 114* 3110 - RSASHA1 DNS keys 115* 3225 - DO bit (DNSSEC OK) 116* 340{1,2,3} - NAPTR record 117* 3445 - Limiting the scope of (DNS)KEY 118* 3597 - Unknown RRs 119* 403{3,4,5} - DNSSEC + validation functions 120* 4255 - SSHFP record 121* 4343 - Case insensitivity 122* 4408 - SPF record 123* 4509 - SHA256 Hash in DS 124* 4592 - Wildcards in the DNS 125* 4635 - HMAC SHA TSIG 126* 4701 - DHCID 127* 4892 - id.server 128* 5001 - NSID 129* 5155 - NSEC3 record 130* 5205 - HIP record 131* 5702 - SHA2 in the DNS 132* 5936 - AXFR 133* 5966 - TCP implementation recommendations 134* 6605 - ECDSA 135* 6725 - IANA Registry Update 136* 6742 - ILNP DNS 137* 6840 - Clarifications and Implementation Notes for DNS Security 138* 6844 - CAA record 139* 6891 - EDNS0 update 140* 6895 - DNS IANA considerations 141* 6975 - Algorithm Understanding in DNSSEC 142* 7043 - EUI48/EUI64 records 143* 7314 - DNS (EDNS) EXPIRE Option 144* 7553 - URI record 145* 7858 - DNS over TLS: Initiation and Performance Considerations (draft) 146* 7873 - Domain Name System (DNS) Cookies (draft-ietf-dnsop-cookies) 147* xxxx - EDNS0 DNS Update Lease (draft) 148 149## Loosely based upon 150 151* `ldns` 152* `NSD` 153* `Net::DNS` 154* `GRONG` 155