Meziantou.Framework.DnsClient
1.0.2
Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Meziantou.Framework.DnsClient --version 1.0.2
NuGet\Install-Package Meziantou.Framework.DnsClient -Version 1.0.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Meziantou.Framework.DnsClient" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Meziantou.Framework.DnsClient" Version="1.0.2" />
<PackageReference Include="Meziantou.Framework.DnsClient" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Meziantou.Framework.DnsClient --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Meziantou.Framework.DnsClient, 1.0.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Meziantou.Framework.DnsClient@1.0.2
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Meziantou.Framework.DnsClient&version=1.0.2
#tool nuget:?package=Meziantou.Framework.DnsClient&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Meziantou.Framework.DnsClient
A comprehensive DNS client library supporting multiple transport protocols, all standard DNS record types, DNSSEC, EDNS(0), internationalized domain names, and reverse DNS lookups.
Features
- Multiple protocols: UDP, TCP, DNS over TLS (DoT), DNS over HTTPS (DoH), DNS over QUIC (DoQ)
- All DNS record types: A, AAAA, MX, TXT, CNAME, NS, SOA, SRV, PTR, CAA, NAPTR, SVCB, HTTPS, and more
- DNSSEC support: Request and parse DNSKEY, DS, RRSIG, NSEC, NSEC3 records
- EDNS(0): Configurable UDP payload size, DNSSEC OK flag, extended RCODE
- IDN/Punycode: Automatic Unicode to punycode conversion for internationalized domain names
- Reverse DNS: Helper for PTR lookups on IPv4 and IPv6 addresses
- OpenTelemetry: Built-in
ActivitySourcetracing for DNS queries
Usage
using Meziantou.Framework.DnsClient;
using Meziantou.Framework.DnsClient.Query;
// Simple query using DNS over HTTPS
using var client = new DnsClient("https://cloudflare-dns.com/dns-query", DnsClientProtocol.Https);
var response = await client.QueryAsync("example.com", DnsQueryType.A);
foreach (var record in response.Answers.OfType<Response.Records.DnsARecord>())
{
Console.WriteLine(record.Address);
}
DNS over TLS
using var client = new DnsClient("1.1.1.1", DnsClientProtocol.Tls);
var response = await client.QueryAsync("example.com", DnsQueryType.AAAA);
Reverse DNS lookup
using var client = new DnsClient("https://cloudflare-dns.com/dns-query", DnsClientProtocol.Https);
var response = await client.ReverseLookupAsync(IPAddress.Parse("1.1.1.1"));
foreach (var ptr in response.Answers.OfType<Response.Records.DnsPtrRecord>())
{
Console.WriteLine(ptr.DomainName);
}
Internationalized domain names
using var client = new DnsClient("https://cloudflare-dns.com/dns-query", DnsClientProtocol.Https);
// Unicode domain names are automatically converted to punycode
var response = await client.QueryAsync("münchen.de", DnsQueryType.A);
DNSSEC
using var client = new DnsClient("https://cloudflare-dns.com/dns-query", DnsClientProtocol.Https,
new DnsClientOptions { DnssecOk = true });
var query = new DnsQueryMessage { RecursionDesired = true };
query.Questions.Add(new DnsQuestion("cloudflare.com", DnsQueryType.A));
query.EdnsOptions = new DnsEdnsOptions { UdpPayloadSize = 4096, DnssecOk = true };
var response = await client.SendAsync(query);
Console.WriteLine($"Authenticated: {response.Header.AuthenticatedData}");
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.0.9 | 56 | 11/13/2026 |
| 2.0.8 | 94 | 11/8/2026 |
| 2.0.7 | 117 | 10/31/2026 |
| 2.0.6 | 161 | 10/21/2026 |
| 2.0.5 | 106 | 10/16/2026 |
| 2.0.4 | 126 | 9/11/2026 |
| 2.0.3 | 134 | 9/6/2026 |
| 2.0.2 | 131 | 8/16/2026 |
| 2.0.1 | 136 | 7/8/2026 |
| 2.0.0 | 151 | 7/5/2026 |
| 1.0.5 | 153 | 7/5/2026 |
| 1.0.4 | 146 | 6/28/2026 |
| 1.0.3 | 142 | 6/13/2026 |
| 1.0.2 | 335 | 5/31/2026 |
| 1.0.1 | 147 | 5/14/2026 |
| 1.0.0 | 159 | 3/24/2026 |