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
55Send pull request if you want to be listed here.
56
57# Features
58
59* UDP/TCP queries, IPv4 and IPv6;
60* RFC 1035 zone file parsing ($INCLUDE, $ORIGIN, $TTL and $GENERATE (for all record types) are supported;
61* Fast:
62    * Reply speed around ~ 80K qps (faster hardware results in more qps);
63    * Parsing RRs ~ 100K RR/s, that's 5M records in about 50 seconds;
64* Server side programming (mimicking the net/http package);
65* Client side programming;
66* DNSSEC: signing, validating and key generation for DSA, RSA and ECDSA;
67* EDNS0, NSID, Cookies;
68* AXFR/IXFR;
69* TSIG, SIG(0);
70* DNS over TLS: optional encrypted connection between client and server;
71* DNS name compression;
72* Depends only on the standard library.
73
74Have fun!
75
76Miek Gieben  -  2010-2012  -  <miek@miek.nl>
77
78# Building
79
80Building is done with the `go` tool. If you have setup your GOPATH
81correctly, the following should work:
82
83    go get github.com/miekg/dns
84    go build github.com/miekg/dns
85
86## Examples
87
88A short "how to use the API" is at the beginning of doc.go (this also will show
89when you call `godoc github.com/miekg/dns`).
90
91Example programs can be found in the `github.com/miekg/exdns` repository.
92
93## Supported RFCs
94
95*all of them*
96
97* 103{4,5} - DNS standard
98* 1348 - NSAP record (removed the record)
99* 1982 - Serial Arithmetic
100* 1876 - LOC record
101* 1995 - IXFR
102* 1996 - DNS notify
103* 2136 - DNS Update (dynamic updates)
104* 2181 - RRset definition - there is no RRset type though, just []RR
105* 2537 - RSAMD5 DNS keys
106* 2065 - DNSSEC (updated in later RFCs)
107* 2671 - EDNS record
108* 2782 - SRV record
109* 2845 - TSIG record
110* 2915 - NAPTR record
111* 2929 - DNS IANA Considerations
112* 3110 - RSASHA1 DNS keys
113* 3225 - DO bit (DNSSEC OK)
114* 340{1,2,3} - NAPTR record
115* 3445 - Limiting the scope of (DNS)KEY
116* 3597 - Unknown RRs
117* 403{3,4,5} - DNSSEC + validation functions
118* 4255 - SSHFP record
119* 4343 - Case insensitivity
120* 4408 - SPF record
121* 4509 - SHA256 Hash in DS
122* 4592 - Wildcards in the DNS
123* 4635 - HMAC SHA TSIG
124* 4701 - DHCID
125* 4892 - id.server
126* 5001 - NSID
127* 5155 - NSEC3 record
128* 5205 - HIP record
129* 5702 - SHA2 in the DNS
130* 5936 - AXFR
131* 5966 - TCP implementation recommendations
132* 6605 - ECDSA
133* 6725 - IANA Registry Update
134* 6742 - ILNP DNS
135* 6840 - Clarifications and Implementation Notes for DNS Security
136* 6844 - CAA record
137* 6891 - EDNS0 update
138* 6895 - DNS IANA considerations
139* 6975 - Algorithm Understanding in DNSSEC
140* 7043 - EUI48/EUI64 records
141* 7314 - DNS (EDNS) EXPIRE Option
142* 7553 - URI record
143* 7858 - DNS over TLS: Initiation and Performance Considerations (draft)
144* 7873 - Domain Name System (DNS) Cookies (draft-ietf-dnsop-cookies)
145* xxxx - EDNS0 DNS Update Lease (draft)
146
147## Loosely based upon
148
149* `ldns`
150* `NSD`
151* `Net::DNS`
152* `GRONG`
153