DnsClient 1.5.0 Prefix Reserved

Install-Package DnsClient -Version 1.5.0
dotnet add package DnsClient --version 1.5.0
<PackageReference Include="DnsClient" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DnsClient --version 1.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DnsClient, 1.5.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install DnsClient as a Cake Addin
#addin nuget:?package=DnsClient&version=1.5.0

// Install DnsClient as a Cake Tool
#tool nuget:?package=DnsClient&version=1.5.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DnsClient.NET

Build Status Code Coverage NuGet NuGet

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 NotExistentDomain is 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. LookupClient has 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

NuGet packages (77)

Showing the top 5 NuGet packages that depend on DnsClient:

Package Downloads
MongoDB.Driver.Core

Core Component of the Official MongoDB .NET Driver.

CouchbaseNetClient

The Official Couchbase .NET SDK.

dotnet-etcd

A C# .NET (dotnet) GRPC client for etcd v3+. etcd is a distributed key value store that provides a reliable way to store data across a cluster of machines. It’s open-source and available on GitHub. etcd gracefully handles leader elections during network partitions and will tolerate machine failure, including the leader. Your applications can read and write data into etcd. A simple use-case is to store database connection details or feature flags in etcd as key value pairs. These values can be watched, allowing your app to reconfigure itself when they change. Advanced uses take advantage of the consistency guarantees to implement database leader elections or do distributed locking across a cluster of workers.

MongoDB.Driver.Core.signed

(Unofficial) Signed Core Component of the MongoDB .NET Driver. The containing assembly was generated by signing the officially published MongoDB.Driver.Core.dll.

SIPSorcery

Real-time communications library with full support for the Session Initiation Protocol (SIP) and WebRTC. No wrappers and no native libraries required.

GitHub repositories (34)

Showing the top 5 popular GitHub repositories that depend on DnsClient:

Repository Stars
ServiceStack/ServiceStack
Thoughtfully architected, obscenely fast, thoroughly enjoyable web services for all
SteamTools-Team/SteamTools
🛠「Steam++」是一个包含多种Steam工具功能的工具箱。
win-acme/win-acme
A simple ACME client for Windows (for use with Let's Encrypt et al.)
mongodb/mongo-csharp-driver
.NET Driver for MongoDB
ldqk/Masuit.Tools
Version Downloads Last updated
1.5.0 166,655 6/20/2021
1.5.0-beta-20210612.7 610 6/12/2021
1.5.0-beta-20210522.7 320 5/22/2021
1.4.0 5,718,789 2/14/2021
1.4.0-beta-20200912.4 13,388 9/12/2020
1.4.0-beta-20200801.7 29,406 8/1/2020
1.3.2 1,284,564 5/13/2020
1.3.2-beta-20200512.2 246 5/12/2020
1.3.1 14,275,068 3/31/2020
1.3.0 251,943 3/17/2020
1.3.0-beta-20200316.3 502 3/16/2020
1.3.0-beta-20200314.3 370 3/14/2020
1.3.0-beta-20200311.4 970 3/11/2020
1.2.0 19,973,101 8/15/2018
1.1.1 242,425 6/13/2018
1.1.0 12,178 6/4/2018
1.0.7 11,117,530 5/1/2017
1.0.6 15,707 4/5/2017
1.0.5 7,895 3/3/2017
1.0.4 997 2/23/2017
1.0.3 2,582 1/21/2017
1.0.2 955 1/16/2017
1.0.2-beta-1080 815 1/10/2017
1.0.1 33,484 12/31/2016
1.0.1-beta-1033 811 12/31/2016
1.0.1-beta-1030 823 12/31/2016
1.0.0 1,495 12/29/2016
1.0.0-beta-1017 949 12/7/2016
1.0.0-beta-1014 944 11/27/2016
1.0.0-beta-1011 839 11/24/2016
1.0.0-beta-1005 935 11/22/2016