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