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
https://dnsclient.michaco.net
Apache License 2.0
781 stars 137 forks source link

Are there plans to support DNAME & LOC record types? #172

Open lynnewu opened 1 year ago

lynnewu commented 1 year ago

Ref: DNS record types

Specifically interested in DNAME & LOC, but was wondering if there's a general plan to implement currently-unsupported/all record types?

MichaCo commented 1 year ago

I did not add all possible types, especially the ones marked as experimental. Those are mostly used in edge cases. Feel free to add them / send a PR.

A general plan to add all types does not exist, no, mostly because that list constantly changes and there is a lot of obsolete or just experimental stuff in there which is not really used ^^

lynnewu commented 1 year ago

I had an opportunity to add a LOC record to a domain and got some interesting results when attempting to read it. I understand that LOC (29) records aren't supported as a canonical record type, but I was guessing that at the least it would return a value I could parse manually.

What I'm getting back looks like a base64 string in DataAsString, but I haven't had any luck turning it into anything meaningful.

Here's the source record alioth 10800 IN LOC 35 34 56.685 N 105 23 15.647 W 2111.00m 1.00m 1.00m 1.00m

Here's what's getting returned from LookupClient.Query for recordtype= ANY

{DnsClient.Protocol.DnsResourceRecord[3]}
    [0]: {alioth.progarts.com. 9969 IN A 98.100.231.62}
    [1]: {alioth.progarts.com. 9969 IN TXT "PlusCode:857PHJJ6+XWMQR7MJ"}
    [2]: {alioth.progarts.com. 9969 IN 29 ABISEoeima1pYuHBAJvPHA==}
?result.Answers[2]
{alioth.progarts.com. 9967 IN 29 ABISEoeima1pYuHBAJvPHA==}
    Data: {byte[16]}
    DataAsString: "ABISEoeima1pYuHBAJvPHA=="
    DomainName: {alioth.progarts.com.}
    InitialTimeToLive: 10800
    RawDataLength: 16or recordtype= ANY

{alioth.progarts.com. 9966 IN 29 ABISEoeima1pYuHBAJvPHA==}
{byte[16]}
0
18
18
18
135
162
153
173
10

98
225
193
0
155
207
28
"ABISEoeima1pYuHBAJvPHA=="