miekg/dns

GitHub: miekg/dns

Go 语言中功能完整的 DNS 协议库,支持服务端与客户端编程、DNSSEC、TSIG 及所有标准资源记录类型。

Stars: 8732 | Forks: 1206

[![构建状态](https://travis-ci.org/miekg/dns.svg?branch=master)](https://travis-ci.org/miekg/dns) [![代码覆盖率](https://img.shields.io/codecov/c/github/miekg/dns/master.svg)](https://codecov.io/github/miekg/dns?branch=master) [![Go 报告卡](https://goreportcard.com/badge/github.com/miekg/dns)](https://goreportcard.com/report/miekg/dns) [![](https://godoc.org/github.com/miekg/dns?status.svg)](https://godoc.org/github.com/miekg/dns) DNS 版本 2 现已在 上可用。此版本在各方面 都应该快 2 倍。欢迎进一步优化。 此处的版本将仅接受特定修复,不包含其他内容。在某个时间点,此仓库将被归档。 # DNS 库的替代(更细粒度)方案 完整且可用的 DNS 库。支持所有资源记录,包括 DNSSEC 类型。 它遵循精简而高效的理念。如果你作为 DNS 程序员需要了解某些内容,那么就不会 为其提供便捷函数。支持服务端和客户端编程,也就是说,你可以用它 构建服务器和解析器。 我们尽量保持 "master" 分支尽可能合理,并处于标准的最前沿, 在合理的情况下避免破坏性更改。我们支持最后两个版本的 Go。 # 目标 - KISS; - 快速; - 小巧的 API。如果在 Go 中很容易编码,就不要为此创建一个函数。 # 用户 一个可能并非最新但也许是最新的列表: - https://github.com/coredns/coredns - https://github.com/abh/geodns - https://github.com/baidu/bfe - http://www.statdns.com/ - http://www.dnsinspect.com/ - https://github.com/chuangbo/jianbing-dictionary-dns - http://www.dns-lg.com/ - https://github.com/fcambus/rrda - https://github.com/kenshinx/godns - https://github.com/skynetservices/skydns - https://github.com/hashicorp/consul - https://github.com/DevelopersPL/godnsagent - https://github.com/duedil-ltd/discodns - https://github.com/StalkR/dns-reverse-proxy - https://github.com/tianon/rawdns - https://mesosphere.github.io/mesos-dns/ - https://github.com/fcambus/statzone - https://github.com/benschw/dns-clb-go - 用于 的 https://github.com/corny/dnscheck - https://github.com/miekg/unbound - https://github.com/miekg/exdns - https://dnslookup.org - https://github.com/looterz/grimd - https://github.com/phamhongviet/serf-dns - https://github.com/mehrdadrad/mylg - https://github.com/bamarni/dockness - https://github.com/fffaraz/microdns - https://github.com/ipdcode/hades - https://github.com/StackExchange/dnscontrol/ - https://www.dnsperf.com/ - https://dnssectest.net/ - https://github.com/oif/apex - https://github.com/jedisct1/dnscrypt-proxy (已迁移至 v2) - https://github.com/jedisct1/rpdns - https://github.com/xor-gate/sshfp - https://github.com/rs/dnstrace - https://blitiri.com.ar/p/dnss ([github 镜像](https://github.com/albertito/dnss)) - https://render.com - https://github.com/peterzen/goresolver - https://github.com/folbricht/routedns - https://domainr.com/ - https://zonedb.org/ - https://router7.org/ - https://github.com/fortio/dnsping - https://github.com/Luzilla/dnsbl_exporter - https://github.com/bodgit/tsig - https://github.com/v2fly/v2ray-core (仅用于测试) - https://kuma.io/ - https://www.misaka.io/services/dns - https://ping.sx/dig - https://fleetdeck.io/ - https://github.com/markdingo/autoreverse - https://github.com/slackhq/nebula - https://addr.tools/ - https://dnscheck.tools/ - https://github.com/egbakou/domainverifier - https://github.com/semihalev/sdns - https://github.com/wintbiit/NineDNS - https://linuxcontainers.org/incus/ - https://ifconfig.es - https://github.com/zmap/zdns - https://framagit.org/bortzmeyer/check-soa - https://github.com/jkerdreux-imt/owns 如果你想被列在这里,请提交 pull request。 # 特性 - UDP/TCP 查询,支持 IPv4 和 IPv6 - RFC 1035 zone 文件解析(支持 $INCLUDE, $ORIGIN, $TTL 和 $GENERATE(适用于所有记录类型) - 快速 - 服务端编程(模仿 net/http 包) - 客户端编程 - DNSSEC:DSA、RSA、ECDSA 和 Ed25519 的签名、验证和密钥生成 - EDNS0, NSID, Cookies - AXFR/IXFR - TSIG, SIG(0) - DNS over TLS (DoT):通过 TCP 建立客户端和服务器之间的加密连接 - DNS 名称压缩 祝使用愉快! Miek Gieben - 2010-2012 - DNS 作者 2012- # 构建 此库使用 Go 模块和语义化版本控制。构建使用 `go` 工具完成,因此 以下操作应该有效: ``` go get github.com/miekg/dns go build github.com/miekg/dns ``` ## 示例 在 doc.go 的开头有一段简短的“如何使用 API”的说明(当你调用 `godoc github.com/miekg/dns` 时也会显示)。 示例程序可以在 `github.com/miekg/exdns` 仓库中找到。 ## 支持的 RFC _全部支持_ - 103{4,5} - DNS 标准 - 1183 - ISDN, X25 及其他已废弃的记录 - 1348 - NSAP 记录(移除了该记录) - 1982 - 序列号算术 - 1876 - LOC 记录 - 1995 - IXFR - 1996 - DNS notify - 2136 - DNS 更新(动态更新) - 2181 - RRset 定义 - 不过没有 RRset 类型,只有 []RR - 2537 - RSAMD5 DNS 密钥 - 2065 - DNSSEC(在后续的 RFC 中已更新) - 2671 - EDNS 记录 - 2782 - SRV 记录 - 2845 - TSIG 记录 - 2915 - NAPTR 记录 - 2929 - DNS IANA 考虑事项 - 3110 - RSASHA1 DNS 密钥 - 3123 - APL 记录 - 3225 - DO 位(DNSSEC OK) - 340{1,2,3} - NAPTR 记录 - 3445 - 限制 (DNS)KEY 的范围 - 3596 - AAAA 记录 - 3597 - 未知的 RR - 4025 - 在 DNS 中存储 IPsec 密钥材料的方法 - 403{3,4,5} - DNSSEC + 验证函数 - 4255 - SSHFP 记录 - 4343 - 不区分大小写 - 4408 - SPF 记录 - 4509 - DS 中的 SHA256 哈希 - 4592 - DNS 中的通配符 - 4635 - HMAC SHA TSIG - 4701 - DHCID - 4892 - id.server - 5001 - NSID - 5155 - NSEC3 记录 - 5205 - HIP 记录 - 5702 - DNS 中的 SHA2 - 5936 - AXFR - 5966 - TCP 实施建议 - 6605 - ECDSA - 6725 - IANA 注册表更新 - 6742 - ILNP DNS - 6840 - DNS 安全的说明和实施注释 - 6844 - CAA 记录 - 6891 - EDNS0 更新 - 6895 - DNS IANA 考虑事项 - 6944 - DNSSEC DNSKEY 算法状态 - 6975 - DNSSEC 中的算法理解 - 7043 - EUI48/EUI64 记录 - 7314 - DNS (EDNS) EXPIRE 选项 - 7477 - CSYNC RR - 7828 - edns-tcp-keepalive EDNS0 选项 - 7553 - URI 记录 - 7858 - DNS over TLS:发起和性能注意事项 - 7871 - EDNS0 Client Subnet - 7873 - 域名系统 (DNS) Cookies - 8080 - 用于 DNSSEC 的 EdDSA - 8490 - DNS 有状态操作 - 8499 - DNS 术语 - 8659 - DNS 证书颁发机构授权 (CAA) 资源记录 - 8777 - DNS 反向 IP 自动多播隧道 (AMT) 发现 - 8914 - 扩展的 DNS 错误 - 8976 - DNS 区域的消息摘要 (ZONEMD RR) - 9460 - 通过 DNS 的服务绑定和参数规范 - 9461 - DNS 服务器的服务绑定映射 - 9462 - 指定解析器的发现 - 9460 - SVCB 和 HTTPS 记录 - 9567 - DNS 错误报告 - 9606 - DNS 解析器信息 - 9660 - DNS 区域版本 (ZONEVERSION) 选项 - Draft - DNSSEC 中的紧凑拒绝存在性 ## 参考借鉴 - ldns - - NSD - - Net::DNS - - GRONG -
标签:DNS, DNS服务器, DNS解析, EVTX分析, Go, Ruby工具, 开发组件, 开源项目, 日志审计, 网络库