DnsClient 1.8.0

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, NAPTR, CERT
  • 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 SDKs and Visual Studio 2022 installed.

Examples

Showing the top 20 packages that depend on DnsClient.

Packages Downloads
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
2,257
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
2,062
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
948
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
929
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
583
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
279
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
123
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
104
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
88
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
42
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
40
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
25
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
25
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
24
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
21
mongocsharpdriver
This package contains the legacy driver. The new driver's package name is MongoDB.Driver.
20
MongoDB.Driver.Core
Core Component of the Official MongoDB .NET Driver.
19

.NET Framework 4.7.2

.NET 6.0

  • No dependencies.

.NET 8.0

  • No dependencies.

.NET Standard 2.0

.NET Standard 2.1

Version Downloads Last updated
1.8.0 15 07/07/2024
1.8.0-beta-20240317.9 19 03/21/2024
1.7.0 24 06/04/2023
1.6.1 1,287 06/22/2022
1.6.0 1,894 06/16/2022
1.5.0 22 06/05/2023
1.5.0-beta-20210612.7 27 06/05/2023
1.5.0-beta-20210522.7 24 06/30/2023
1.4.0 3,300 03/19/2021
1.4.0-beta-20200912.4 18 06/04/2023
1.4.0-beta-20200801.7 22 06/04/2023
1.3.2 17 06/06/2023
1.3.2-beta-20200512.2 21 06/15/2023
1.3.1 688 12/16/2020
1.3.0 23 06/04/2023
1.3.0-beta-20200316.3 23 06/04/2023
1.3.0-beta-20200314.3 21 06/05/2023
1.3.0-beta-20200311.4 21 06/04/2023
1.2.0 40 01/22/2021
1.1.1 29 06/05/2023
1.1.0 20 06/16/2023
1.0.7 22 06/03/2023
1.0.6 21 06/03/2023
1.0.5 17 06/05/2023
1.0.4 20 06/05/2023
1.0.3 23 07/01/2023
1.0.2 23 06/04/2023
1.0.2-beta-1080 19 07/14/2023
1.0.1 25 06/04/2023
1.0.1-beta-1033 24 06/05/2023
1.0.1-beta-1030 22 06/05/2023
1.0.0 23 06/05/2023
1.0.0-beta-1017 20 06/05/2023
1.0.0-beta-1014 24 06/04/2023
1.0.0-beta-1011 21 06/03/2023
1.0.0-beta-1005 26 06/06/2023