|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| .github/workflows/ | H | 01-Aug-2020 | - | 112 | 91 |
| dnsutil/ | H | 01-Aug-2020 | - | 215 | 157 |
| .codecov.yml | H A D | 01-Aug-2020 | 128 | 9 | 8 |
| .gitignore | H A D | 01-Aug-2020 | 24 | 5 | 4 |
| .travis.yml | H A D | 01-Aug-2020 | 307 | 18 | 13 |
| AUTHORS | H A D | 01-Aug-2020 | 27 | 2 | 1 |
| CODEOWNERS | H A D | 01-Aug-2020 | 18 | 2 | 1 |
| CONTRIBUTORS | H A D | 01-Aug-2020 | 150 | 11 | 10 |
| COPYRIGHT | H A D | 01-Aug-2020 | 512 | 10 | 7 |
| LICENSE | H A D | 01-Aug-2020 | 1.6 KiB | 31 | 26 |
| Makefile.fuzz | H A D | 01-Aug-2020 | 671 | 34 | 17 |
| Makefile.release | H A D | 01-Aug-2020 | 992 | 53 | 31 |
| README.md | H A D | 01-Aug-2020 | 5.7 KiB | 179 | 153 |
| acceptfunc.go | H A D | 01-Aug-2020 | 1.8 KiB | 62 | 32 |
| acceptfunc_test.go | H A D | 01-Aug-2020 | 856 | 36 | 29 |
| client.go | H A D | 01-Aug-2020 | 13 KiB | 431 | 295 |
| client_test.go | H A D | 01-Aug-2020 | 14.5 KiB | 599 | 481 |
| clientconfig.go | H A D | 01-Aug-2020 | 3.3 KiB | 136 | 105 |
| clientconfig_test.go | H A D | 01-Aug-2020 | 4.6 KiB | 182 | 160 |
| dane.go | H A D | 01-Aug-2020 | 997 | 44 | 40 |
| defaults.go | H A D | 01-Aug-2020 | 10.4 KiB | 385 | 261 |
| dns.go | H A D | 01-Aug-2020 | 3.7 KiB | 135 | 78 |
| dns_bench_test.go | H A D | 01-Aug-2020 | 9.4 KiB | 371 | 337 |
| dns_test.go | H A D | 01-Aug-2020 | 9.9 KiB | 317 | 268 |
| dnssec.go | H A D | 01-Aug-2020 | 19.3 KiB | 795 | 633 |
| dnssec_keygen.go | H A D | 01-Aug-2020 | 3.1 KiB | 141 | 118 |
| dnssec_keyscan.go | H A D | 01-Aug-2020 | 6.4 KiB | 323 | 252 |
| dnssec_privkey.go | H A D | 01-Aug-2020 | 2.9 KiB | 95 | 76 |
| dnssec_test.go | H A D | 01-Aug-2020 | 28.6 KiB | 859 | 748 |
| doc.go | H A D | 01-Aug-2020 | 9.7 KiB | 269 | 1 |
| duplicate.go | H A D | 01-Aug-2020 | 953 | 38 | 24 |
| duplicate_generate.go | H A D | 01-Aug-2020 | 3.8 KiB | 163 | 119 |
| duplicate_test.go | H A D | 01-Aug-2020 | 2.6 KiB | 85 | 67 |
| dyn_test.go | H A D | 01-Aug-2020 | 37 | 4 | 1 |
| edns.go | H A D | 01-Aug-2020 | 19.7 KiB | 676 | 484 |
| edns_test.go | H A D | 01-Aug-2020 | 3.1 KiB | 136 | 103 |
| example_test.go | H A D | 01-Aug-2020 | 3.1 KiB | 147 | 115 |
| format.go | H A D | 01-Aug-2020 | 2.4 KiB | 94 | 83 |
| format_test.go | H A D | 01-Aug-2020 | 279 | 17 | 14 |
| fuzz.go | H A D | 01-Aug-2020 | 536 | 33 | 22 |
| fuzz_test.go | H A D | 01-Aug-2020 | 7.5 KiB | 270 | 234 |
| generate.go | H A D | 01-Aug-2020 | 5 KiB | 248 | 182 |
| generate_test.go | H A D | 01-Aug-2020 | 6.9 KiB | 236 | 207 |
| go.mod | H A D | 01-Aug-2020 | 333 | 12 | 9 |
| go.sum | H A D | 01-Aug-2020 | 4 KiB | 40 | 39 |
| issue_test.go | H A D | 01-Aug-2020 | 1.5 KiB | 63 | 55 |
| labels.go | H A D | 01-Aug-2020 | 4.1 KiB | 213 | 154 |
| labels_test.go | H A D | 01-Aug-2020 | 7.9 KiB | 337 | 309 |
| leak_test.go | H A D | 01-Aug-2020 | 1.8 KiB | 72 | 61 |
| length_test.go | H A D | 01-Aug-2020 | 19.9 KiB | 509 | 432 |
| listen_go111.go | H A D | 01-Aug-2020 | 881 | 45 | 32 |
| listen_go_not111.go | H A D | 01-Aug-2020 | 485 | 24 | 13 |
| msg.go | H A D | 01-Aug-2020 | 31.8 KiB | 1,191 | 891 |
| msg_generate.go | H A D | 01-Aug-2020 | 10 KiB | 344 | 295 |
| msg_helpers.go | H A D | 01-Aug-2020 | 19.7 KiB | 767 | 662 |
| msg_helpers_test.go | H A D | 01-Aug-2020 | 11.4 KiB | 506 | 480 |
| msg_test.go | H A D | 01-Aug-2020 | 9.1 KiB | 327 | 277 |
| msg_truncate.go | H A D | 01-Aug-2020 | 3 KiB | 112 | 59 |
| msg_truncate_test.go | H A D | 01-Aug-2020 | 5 KiB | 188 | 155 |
| nsecx.go | H A D | 01-Aug-2020 | 2.4 KiB | 96 | 78 |
| nsecx_test.go | H A D | 01-Aug-2020 | 4.8 KiB | 171 | 160 |
| parse_test.go | H A D | 01-Aug-2020 | 55.9 KiB | 1,736 | 1,593 |
| privaterr.go | H A D | 01-Aug-2020 | 3.2 KiB | 114 | 75 |
| privaterr_test.go | H A D | 01-Aug-2020 | 3.5 KiB | 169 | 135 |
| remote_test.go | H A D | 01-Aug-2020 | 385 | 20 | 15 |
| reverse.go | H A D | 01-Aug-2020 | 1.3 KiB | 53 | 32 |
| rr_test.go | H A D | 01-Aug-2020 | 191 | 12 | 8 |
| sanitize.go | H A D | 01-Aug-2020 | 2 KiB | 87 | 60 |
| sanitize_test.go | H A D | 01-Aug-2020 | 2 KiB | 76 | 70 |
| scan.go | H A D | 01-Aug-2020 | 28 KiB | 1,332 | 960 |
| scan_rr.go | H A D | 01-Aug-2020 | 39.9 KiB | 1,744 | 1,533 |
| scan_test.go | H A D | 01-Aug-2020 | 7.4 KiB | 291 | 239 |
| serve_mux.go | H A D | 01-Aug-2020 | 3.4 KiB | 123 | 71 |
| serve_mux_test.go | H A D | 01-Aug-2020 | 1.6 KiB | 73 | 59 |
| server.go | H A D | 01-Aug-2020 | 19.4 KiB | 765 | 550 |
| server_test.go | H A D | 01-Aug-2020 | 29.5 KiB | 1,167 | 956 |
| sig0.go | H A D | 01-Aug-2020 | 4.9 KiB | 210 | 177 |
| sig0_test.go | H A D | 01-Aug-2020 | 2.2 KiB | 90 | 87 |
| singleinflight.go | H A D | 01-Aug-2020 | 1.6 KiB | 62 | 39 |
| smimea.go | H A D | 01-Aug-2020 | 1.3 KiB | 45 | 29 |
| tlsa.go | H A D | 01-Aug-2020 | 1.1 KiB | 45 | 34 |
| tsig.go | H A D | 01-Aug-2020 | 10.3 KiB | 418 | 338 |
| tsig_test.go | H A D | 01-Aug-2020 | 8.1 KiB | 240 | 196 |
| types.go | H A D | 01-Aug-2020 | 35.4 KiB | 1,532 | 1,197 |
| types_generate.go | H A D | 01-Aug-2020 | 8.3 KiB | 310 | 248 |
| types_test.go | H A D | 01-Aug-2020 | 4.3 KiB | 194 | 157 |
| udp.go | H A D | 01-Aug-2020 | 2.9 KiB | 103 | 67 |
| udp_test.go | H A D | 01-Aug-2020 | 4.4 KiB | 146 | 115 |
| udp_windows.go | H A D | 01-Aug-2020 | 1.2 KiB | 36 | 18 |
| update.go | H A D | 01-Aug-2020 | 3.1 KiB | 111 | 87 |
| update_test.go | H A D | 01-Aug-2020 | 4.3 KiB | 140 | 110 |
| version.go | H A D | 01-Aug-2020 | 275 | 16 | 9 |
| version_test.go | H A D | 01-Aug-2020 | 180 | 11 | 8 |
| xfr.go | H A D | 01-Aug-2020 | 6.6 KiB | 267 | 205 |
| xfr_test.go | H A D | 01-Aug-2020 | 3.5 KiB | 164 | 128 |
| zduplicate.go | H A D | 01-Aug-2020 | 19.2 KiB | 1,278 | 1,202 |
| zmsg.go | H A D | 01-Aug-2020 | 57 KiB | 2,742 | 2,517 |
| ztypes.go | H A D | 01-Aug-2020 | 28.3 KiB | 914 | 901 |
README.md
1[![Build Status](https://travis-ci.org/miekg/dns.svg?branch=master)](https://travis-ci.org/miekg/dns)
2[![Code Coverage](https://img.shields.io/codecov/c/github/miekg/dns/master.svg)](https://codecov.io/github/miekg/dns?branch=master)
3[![Go Report Card](https://goreportcard.com/badge/github.com/miekg/dns)](https://goreportcard.com/report/miekg/dns)
4[![](https://godoc.org/github.com/miekg/dns?status.svg)](https://godoc.org/github.com/miekg/dns)
5
6# Alternative (more granular) approach to a DNS library
7
8> Less is more.
9
10Complete and usable DNS library. All Resource Records are supported, including the DNSSEC types.
11It follows a lean and mean philosophy. If there is stuff you should know as a DNS programmer there
12isn't a convenience function for it. Server side and client side programming is supported, i.e. you
13can build servers and resolvers with it.
14
15We try to keep the "master" branch as sane as possible and at the bleeding edge of standards,
16avoiding breaking changes wherever reasonable. We support the last two versions of Go.
17
18# Goals
19
20* KISS;
21* Fast;
22* Small API. If it's 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://github.com/coredns/coredns
29* https://cloudflare.com
30* https://github.com/abh/geodns
31* https://github.com/baidu/bfe
32* http://www.statdns.com/
33* http://www.dnsinspect.com/
34* https://github.com/chuangbo/jianbing-dictionary-dns
35* http://www.dns-lg.com/
36* https://github.com/fcambus/rrda
37* https://github.com/kenshinx/godns
38* https://github.com/skynetservices/skydns
39* https://github.com/hashicorp/consul
40* https://github.com/DevelopersPL/godnsagent
41* https://github.com/duedil-ltd/discodns
42* https://github.com/StalkR/dns-reverse-proxy
43* https://github.com/tianon/rawdns
44* https://mesosphere.github.io/mesos-dns/
45* https://pulse.turbobytes.com/
46* https://github.com/fcambus/statzone
47* https://github.com/benschw/dns-clb-go
48* https://github.com/corny/dnscheck for <http://public-dns.info/>
49* https://namesmith.io
50* https://github.com/miekg/unbound
51* https://github.com/miekg/exdns
52* https://dnslookup.org
53* https://github.com/looterz/grimd
54* https://github.com/phamhongviet/serf-dns
55* https://github.com/mehrdadrad/mylg
56* https://github.com/bamarni/dockness
57* https://github.com/fffaraz/microdns
58* http://kelda.io
59* https://github.com/ipdcode/hades <https://jd.com>
60* https://github.com/StackExchange/dnscontrol/
61* https://www.dnsperf.com/
62* https://dnssectest.net/
63* https://dns.apebits.com
64* https://github.com/oif/apex
65* https://github.com/jedisct1/dnscrypt-proxy
66* https://github.com/jedisct1/rpdns
67* https://github.com/xor-gate/sshfp
68* https://github.com/rs/dnstrace
69* https://blitiri.com.ar/p/dnss ([github mirror](https://github.com/albertito/dnss))
70* https://github.com/semihalev/sdns
71* https://render.com
72* https://github.com/peterzen/goresolver
73* https://github.com/folbricht/routedns
74* https://domainr.com/
75* https://zonedb.org/
76
77Send pull request if you want to be listed here.
78
79# Features
80
81* UDP/TCP queries, IPv4 and IPv6
82* RFC 1035 zone file parsing ($INCLUDE, $ORIGIN, $TTL and $GENERATE (for all record types) are supported
83* Fast
84* Server side programming (mimicking the net/http package)
85* Client side programming
86* DNSSEC: signing, validating and key generation for DSA, RSA, ECDSA and Ed25519
87* EDNS0, NSID, Cookies
88* AXFR/IXFR
89* TSIG, SIG(0)
90* DNS over TLS (DoT): encrypted connection between client and server over TCP
91* DNS name compression
92
93Have fun!
94
95Miek Gieben - 2010-2012 - <miek@miek.nl>
96DNS Authors 2012-
97
98# Building
99
100This library uses Go modules and uses semantic versioning. Building is done with the `go` tool, so
101the following should work:
102
103 go get github.com/miekg/dns
104 go build github.com/miekg/dns
105
106## Examples
107
108A short "how to use the API" is at the beginning of doc.go (this also will show when you call `godoc
109github.com/miekg/dns`).
110
111Example programs can be found in the `github.com/miekg/exdns` repository.
112
113## Supported RFCs
114
115*all of them*
116
117* 103{4,5} - DNS standard
118* 1348 - NSAP record (removed the record)
119* 1982 - Serial Arithmetic
120* 1876 - LOC record
121* 1995 - IXFR
122* 1996 - DNS notify
123* 2136 - DNS Update (dynamic updates)
124* 2181 - RRset definition - there is no RRset type though, just []RR
125* 2537 - RSAMD5 DNS keys
126* 2065 - DNSSEC (updated in later RFCs)
127* 2671 - EDNS record
128* 2782 - SRV record
129* 2845 - TSIG record
130* 2915 - NAPTR record
131* 2929 - DNS IANA Considerations
132* 3110 - RSASHA1 DNS keys
133* 3123 - APL record
134* 3225 - DO bit (DNSSEC OK)
135* 340{1,2,3} - NAPTR record
136* 3445 - Limiting the scope of (DNS)KEY
137* 3597 - Unknown RRs
138* 403{3,4,5} - DNSSEC + validation functions
139* 4255 - SSHFP record
140* 4343 - Case insensitivity
141* 4408 - SPF record
142* 4509 - SHA256 Hash in DS
143* 4592 - Wildcards in the DNS
144* 4635 - HMAC SHA TSIG
145* 4701 - DHCID
146* 4892 - id.server
147* 5001 - NSID
148* 5155 - NSEC3 record
149* 5205 - HIP record
150* 5702 - SHA2 in the DNS
151* 5936 - AXFR
152* 5966 - TCP implementation recommendations
153* 6605 - ECDSA
154* 6725 - IANA Registry Update
155* 6742 - ILNP DNS
156* 6840 - Clarifications and Implementation Notes for DNS Security
157* 6844 - CAA record
158* 6891 - EDNS0 update
159* 6895 - DNS IANA considerations
160* 6944 - DNSSEC DNSKEY Algorithm Status
161* 6975 - Algorithm Understanding in DNSSEC
162* 7043 - EUI48/EUI64 records
163* 7314 - DNS (EDNS) EXPIRE Option
164* 7477 - CSYNC RR
165* 7828 - edns-tcp-keepalive EDNS0 Option
166* 7553 - URI record
167* 7858 - DNS over TLS: Initiation and Performance Considerations
168* 7871 - EDNS0 Client Subnet
169* 7873 - Domain Name System (DNS) Cookies
170* 8080 - EdDSA for DNSSEC
171* 8499 - DNS Terminology
172
173## Loosely Based Upon
174
175* ldns - <https://nlnetlabs.nl/projects/ldns/about/>
176* NSD - <https://nlnetlabs.nl/projects/nsd/about/>
177* Net::DNS - <http://www.net-dns.org/>
178* GRONG - <https://github.com/bortzmeyer/grong>
179