DnsClient 1.8.0-beta-20240317.9
DnsClient.NET
DnsClient.NET is a simple yet very powerful and high performance open source library for the .NET Framework to do DNS lookups.
Usage
See the DnsClient site for more details and documentation.
The following example instantiates a new LookupClient to query some IP address.
var lookup = new LookupClient();
var result = await lookup.QueryAsync("google.com", QueryType.A);
var record = result.Answers.ARecords().FirstOrDefault();
var ip = record?.Address;
Features
General
- Sync & Async API
- UDP and TCP lookup, configurable if TCP should be used as fallback in case the UDP result is truncated (default=true).
- Configurable EDNS support to change the default UDP buffer size and request security relevant records
- Caching
- Query result cache based on provided TTL
- Minimum TTL setting to overrule the result's TTL and always cache the responses for at least that time. (Even very low value, like a few milliseconds, do make a huge difference if used in high traffic low latency scenarios)
- Maximum TTL to limit cache duration
- Cache can be disabled
- Nameserver auto discovery. If no servers are explicitly configured, DnsClient will try its best to resolve them based on your local system configuration. This includes DNS servers configured via network interfaces or even via Windows specific NRPT policies.
- Multiple DNS endpoints can be configured. DnsClient will use them in random or sequential order (configurable), with re-tries.
- Configurable retry of queries
- Optional audit trail of each response and exception
- Configurable error handling. Throwing DNS errors, like
NotExistentDomainis turned off by default - Optional Trace/Logging
Supported resource records
- A, AAAA, NS, CNAME, SOA, MB, MG, MR, WKS, HINFO, MINFO, MX, RP, TXT, AFSDB, URI, CAA, NULL, SSHFP, TLSA, RRSIG, NSEC, NSEC3, NSEC3PARAM, DNSKEY, DS
- PTR for reverse lookups
- SRV for service discovery.
LookupClienthas some extensions to help with that. - AXFR zone transfer (as per spec, LookupClient has to be set to TCP mode only for this type. Also, the result depends on if the DNS server trusts your current connection)
Build from Source
To build and contribute to this project, you must have the latest .NET 5 SDK installed. Just clone the repository and open the solution in Visual Studio 2019.
Examples
- See MiniDig's readme for what this example command line tool can do.
- More documentation and examples
- The Samples repository (there might be more in the future).
Showing the top 20 packages that depend on DnsClient.
| Packages | Downloads |
|---|---|
|
Masuit.Tools.Core
包含一些常用的操作类,大都是静态类,加密解密,反射操作,Excel简单导出,权重随机筛选算法,分布式短id,表达式树,linq扩展,文件压缩,多线程下载和FTP客户端,硬件信息,字符串扩展方法,日期时间扩展操作,中国农历,大文件拷贝,图像裁剪,验证码,断点续传,集合扩展等常用封装。
官网教程:https://ldqk.org/55
github:https://github.com/ldqk/Masuit.Tools
|
1 |
|
Masuit.Tools.Core
包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,html处理,验证码、NoSql等常用封装。
官网教程:https://masuit.com/55
github:https://github.com/ldqk/Masuit.Tools
|
1 |
|
Masuit.Tools.Core
包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,html处理,验证码、NoSql等常用封装。
官网教程:https://masuit.com/55
github:https://github.com/ldqk/Masuit.Tools
|
1 |
|
Masuit.Tools.Core
包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,html处理,验证码、NoSql等常用封装。
官网教程:https://masuit.com/55
github:https://github.com/ldqk/Masuit.Tools
|
1 |
|
Masuit.Tools.Core
包含一些常用的操作类,大都是静态类,加密解密,反射操作,硬件信息,字符串扩展方法,日期时间扩展操作,大文件拷贝,图像裁剪,html处理,验证码、NoSql等常用封装。
官网教程:https://ldqk.org/55
github:https://github.com/ldqk/Masuit.Tools
|
1 |
|
Masuit.Tools.Abstractions
Masuit.Tools基础公共库,包含一些常用的操作类,大都是静态类,加密解密,反射操作,Excel简单导出,权重随机筛选算法,分布式短id,表达式树,linq扩展,文件压缩,多线程下载和FTP客户端,硬件信息,字符串扩展方法,日期时间扩展操作,中国农历,大文件拷贝,图像裁剪,验证码,断点续传,集合扩展等常用封装。
|
1 |
.NET Framework 4.7.2
- System.Buffers (>= 4.5.1)
.NET 6.0
- No dependencies.
.NET 8.0
- No dependencies.
.NET Standard 2.0
- Microsoft.Win32.Registry (>= 5.0.0)
- System.Buffers (>= 4.5.1)
.NET Standard 2.1
- Microsoft.Win32.Registry (>= 5.0.0)
| Version | Downloads | Last updated |
|---|---|---|
| 1.8.0 | 2 | 01/10/2026 |
| 1.8.0-beta-20240317.9 | 1 | 01/10/2026 |
| 1.7.0 | 1 | 01/10/2026 |
| 1.6.1 | 1 | 01/10/2026 |
| 1.6.0 | 1 | 01/10/2026 |
| 1.5.0 | 1 | 01/10/2026 |
| 1.5.0-beta-20210612.7 | 1 | 01/10/2026 |
| 1.5.0-beta-20210522.7 | 1 | 01/10/2026 |
| 1.4.0 | 1 | 01/10/2026 |
| 1.4.0-beta-20200912.4 | 1 | 01/10/2026 |
| 1.4.0-beta-20200801.7 | 1 | 01/10/2026 |
| 1.3.2 | 1 | 01/10/2026 |
| 1.3.2-beta-20200512.2 | 1 | 01/10/2026 |
| 1.3.1 | 1 | 01/10/2026 |
| 1.3.0 | 1 | 01/10/2026 |
| 1.3.0-beta-20200316.3 | 1 | 01/10/2026 |
| 1.3.0-beta-20200314.3 | 1 | 01/10/2026 |
| 1.3.0-beta-20200311.4 | 1 | 01/10/2026 |
| 1.2.0 | 1 | 01/10/2026 |
| 1.1.1 | 1 | 01/10/2026 |
| 1.1.0 | 1 | 01/10/2026 |
| 1.0.7 | 1 | 01/10/2026 |
| 1.0.6 | 1 | 01/10/2026 |
| 1.0.5 | 1 | 01/10/2026 |
| 1.0.4 | 1 | 01/10/2026 |
| 1.0.3 | 1 | 01/10/2026 |
| 1.0.2 | 1 | 01/10/2026 |
| 1.0.2-beta-1080 | 1 | 01/10/2026 |
| 1.0.1 | 1 | 01/10/2026 |
| 1.0.1-beta-1033 | 1 | 01/10/2026 |
| 1.0.1-beta-1030 | 1 | 01/10/2026 |
| 1.0.0 | 1 | 01/10/2026 |
| 1.0.0-beta-1017 | 1 | 01/10/2026 |
| 1.0.0-beta-1014 | 1 | 01/10/2026 |
| 1.0.0-beta-1011 | 1 | 01/10/2026 |
| 1.0.0-beta-1005 | 1 | 01/10/2026 |