All Projects → MichaCo → Dnsclient.net

MichaCo / Dnsclient.net

Licence: apache-2.0
DnsClient.NET is a simple yet very powerful and high performant open source library for the .NET Framework to do DNS lookups

Projects that are alternatives of or similar to Dnsclient.net

Dnsserver
Technitium DNS Server
Stars: ✭ 603 (+50.75%)
Mutual labels:  dns, dns-server, dotnet-core
unbound-dns-firewall
DNS-Firewall Python script for UNBOUND
Stars: ✭ 23 (-94.25%)
Mutual labels:  dns, dns-server
xip.name
Simple wildcard DNS inspired by xip.io
Stars: ✭ 143 (-64.25%)
Mutual labels:  dns, dns-server
AmpliSpy
Check local or remote list of DNS servers for suitability in DNS Amplification DoS.
Stars: ✭ 39 (-90.25%)
Mutual labels:  dns, dns-server
docker-nxfilter
🐳 Run NxFilter in Docker!
Stars: ✭ 28 (-93%)
Mutual labels:  dns, dns-server
afdns
Ad free DNS server. A docker container with a DNS server configured to block advertisement hosts.
Stars: ✭ 27 (-93.25%)
Mutual labels:  dns, dns-server
Smartdns
A local DNS server to obtain the fastest website IP for the best Internet experience, 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验。
Stars: ✭ 4,333 (+983.25%)
Mutual labels:  dns, dns-server
Nativepayload dns
C# code for Transferring Backdoor Payloads by DNS Traffic and Bypassing Anti-viruses
Stars: ✭ 228 (-43%)
Mutual labels:  dns, dns-server
Windows.10.DNS.Block.List
Windows DNS Block List
Stars: ✭ 18 (-95.5%)
Mutual labels:  dns, dns-server
Secure-Adblocking-DNS
Secure (DNS-over-TLS) Adblocking (Pi-hole) Recursive (unbound) Server System setup
Stars: ✭ 19 (-95.25%)
Mutual labels:  dns, dns-server
zonemanager
Central DNS/DHCP database with replication to Amazon Route53, BIND, MikroTik routers and other services.
Stars: ✭ 29 (-92.75%)
Mutual labels:  dns, dns-server
fastdns
Fast DNS package for Go. Tuned for high performance. Zero memory allocations in almost paths. Up to 1M QPS on a single host.
Stars: ✭ 67 (-83.25%)
Mutual labels:  dns, dns-server
Secureoperator
A DNS-protocol proxy for DNS-over-HTTPS providers, such as Google and Cloudflare
Stars: ✭ 241 (-39.75%)
Mutual labels:  dns, dns-server
Gdnsd
Authoritative DNS Server --
Stars: ✭ 370 (-7.5%)
Mutual labels:  dns, dns-server
Blahdns
A small hobby ads block dns project with doh, dot, dnscrypt support.
Stars: ✭ 228 (-43%)
Mutual labels:  dns, dns-server
newdns
A library for building custom DNS servers in Go.
Stars: ✭ 40 (-90%)
Mutual labels:  dns, dns-server
MicroDNSSrv
A micro DNS server for MicroPython to simply respond to A queries on multi-domains with or without wildcards (used on Pycom modules & ESP32)
Stars: ✭ 43 (-89.25%)
Mutual labels:  dns, dns-server
Bind9
Mirror of https://gitlab.isc.org/isc-projects/bind9, please submit issues and PR/MRs in the GitLab.
Stars: ✭ 197 (-50.75%)
Mutual labels:  dns, dns-server
Pdns
PowerDNS Authoritative, PowerDNS Recursor, dnsdist
Stars: ✭ 2,575 (+543.75%)
Mutual labels:  dns, dns-server
Alfis
Alternative Free Identity System
Stars: ✭ 162 (-59.5%)
Mutual labels:  dns, dns-server

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 http://dnsclient.michaco.net 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
  • 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, 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

The solution requires a .NET Core 3.x SDK and the .NET 4.7.1 Dev Pack being installed.

Just clone the repository and open the solution in Visual Studio 2017/2019.

The unit tests don't require any additional setup right now.

If you want to test the different record types, there are config files for Bind under tools. Just download Bind for Windows and copy the binaries to tools/BIND, then run bind.cmd. If you are running this on Linux, you can use my config files and replace the default ones if you want.

Now, you can use samples/MiniDig to query the local DNS server. The following should return many different resource records:

dotnet run -s localhost mcnet.com any

Examples

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].