Coder Social home page Coder Social logo

corillian / dnsclient.net Goto Github PK

View Code? Open in Web Editor NEW

This project forked from michaco/dnsclient.net

0.0 0.0 0.0 10.97 MB

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

Home Page: https://dnsclient.michaco.net

License: Apache License 2.0

C# 99.99% Batchfile 0.01%

dnsclient.net's Introduction

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

dnsclient.net's People

Contributors

michaco avatar antonfirsov avatar sipsorcery avatar jameskovacs avatar joeshook avatar 304notmodified avatar dutchdestroyer avatar mbp avatar rj2skipper avatar rufusjwb avatar stevesyfuhs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.