DNS clients that can fetch more than A
and AAAA
resource records.
Published releases are available on NuGet. To install, run the following command in the Package Manager Console.
PM> Install-Package Makaretu.Dns.Unicast
using Makaretu.Dns;
var dns = new DnsClient();
var addresses = await dns.ResolveAsync("cloudflare-dns.com");
foreach (var a in addresses)
Console.WriteLine(a.ToString());
Produces the output
104.16.111.25
104.16.112.25
2400:cb00:2048:1::6810:6f19
2400:cb00:2048:1::6810:7019
using Makaretu.Dns;
var dns = new DnsClient();
var response = await dns.QueryAsync("ipfs.io", DnsType.TXT);
var strings = response.Answers
.OfType<TXTRecord>()
.SelectMany(txt => txt.Strings);
foreach (var s in strings)
Console.WriteLine(s);
Produces the output
dnslink=/ipfs/QmYNQJoKGNHTpPxCBPh9KkDpaExgd2duMa3aF6ytMpHdao
Copyright © 2018 Richard Schneider (makaretu@gmail.com)
The package is licensed under the MIT license. Refer to the LICENSE file for more information.