MichaCo / DnsClient.NET

DnsClient.NET is a simple yet very powerful and high performant open source library for the .NET Framework to do DNS lookups
https://dnsclient.michaco.net
Apache License 2.0
762 stars 136 forks source link
c-sharp dns dns-client dns-server dotnet dotnet-core

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

Supported resource records

Build from Source

To build and contribute to this project, you must have the latest .NET SDKs and Visual Studio 2022 installed.

Examples