GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - 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

BranchesTags
Open more actions menu

Latest commit

 

History

285 Commits
285 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Documentation
Documentation
 
 
samples/MiniDig
samples/MiniDig
 
 
src/DnsClient
src/DnsClient
 
 
test-other
test-other
 
 
test
test
 
 
tools
tools
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.runsettings
.runsettings
 
 
Directory.Build.props
Directory.Build.props
 
 
DnsClientDotNet.sln
DnsClientDotNet.sln
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
THIRD-PARTY-NOTICES.txt
THIRD-PARTY-NOTICES.txt
 
 
azure-pipelines-ci.yml
azure-pipelines-ci.yml
 
 
icon.png
icon.png
 
 

Repository files navigation

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

  • See MiniDig's readme for what this example command line tool can do.
  • More documentation and examples
  • The Samples repository (there might be more in the future).

About

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

dnsclient.michaco.net

Topics

c-sharpdnsdns-clientdns-serverdotnetdotnet-core

Resources

Readme
Apache-2.0 license
Activity
Custom properties

Stars

880 stars

Watchers

25 watching

Forks

149 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.