DoHoN.rushyo.com 0.1.1

dotnet add package DoHoN.rushyo.com --version 0.1.1
NuGet\Install-Package DoHoN.rushyo.com -Version 0.1.1
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="DoHoN.rushyo.com" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DoHoN.rushyo.com --version 0.1.1
#r "nuget: DoHoN.rushyo.com, 0.1.1"
#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.
// Install DoHoN.rushyo.com as a Cake Addin
#addin nuget:?package=DoHoN.rushyo.com&version=0.1.1

// Install DoHoN.rushyo.com as a Cake Tool
#tool nuget:?package=DoHoN.rushyo.com&version=0.1.1

DNS over HTTPS on .NET

DoHoN (stylised ドホン) is a DNS over HTTPS client for .NET. It's simple, clean, fast, and supports both synchronous and asynchronous usage with caching (and respects TTLs!). It uses .NET Core 2.0 to provide cross-compatibility across multiple OSes. It uses the application/dns-json format.

Currently it allows the use of any DNS services, but defaults to trying Cloudflare (1.1.1.1) then Google (8.8.8.8). It has secure defaults, requiring DNSSEC verified responses and using consistent padded lengths to minimise snooping. It also requests services do not attempt to geolocate you by default, although you can flip the RequestNoGeolocation field to change this.

Usage

Usage is simple:

using (var client = new DoHClient())
{
    //Get example.com IPv4 record
    String ipv4 = client.LookupSync("example.com", ResourceRecordType.A).First().Data;
    ...
}

It throws DNSLookupException exceptions for common errors (like not being able to find a viable DNS server, or an invalid lookup).

You can set your own DNS over HTTPS servers like so:

client.SetEndpoints(new[] {"https://example.com/resolve", "https://2.example.com/resolve"});

Licensing

The source code is made available under the GNU Affero General Public License v3.0. It's like the GPL, except if you modify the source code and use that modified code on your server you need to make your derivative source code available to anyone using your network server. If your server is public, you need to make the derived code public. If you use the library without modification, you don't need to do anything. You are not contractual bound to release any source code that uses this code merely as a library. Consider this a linking exception if you prefer to think of it that way; nobody is going to snarf your source code, just make sure you give back any improvements to DoHoN back to the community.

Bugs? Requests?

Drop an issue and I'll take a look when I have time.

Why make this?

I was bored one evening and wanted to try out a new protocol. That's it, really. Enjoy!

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 is compatible.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
0.1.1 1,497 4/5/2018

Initial release