ameshkov / dnslookup

Simple command line utility to make DNS lookups to the specified server
MIT License
816 stars 72 forks source link

Specify IP version on dual-stack #43

Open MeganerdNL opened 1 year ago

MeganerdNL commented 1 year ago

Is it possible (to implement) to specify what IP version to use when on dual-stack? It seems to me that it now uses the first result from a DNS query of the used server. It is useful for me to specify if I want to use IPv4 or IPv6. This is probably similar or the same as #12

ameshkov commented 1 year ago

Currently it always prefers IPv4 when it's available.

There's an option to override it if you use a DNS stamp as a server address.

Here's an example, a DNS query to tls://dns.google which uses 8.8.8.8 specifically:

dnslookup example.org sdns://AwcAAAAAAAAABzguOC44LjgACmRucy5nb29nbGU
MeganerdNL commented 1 year ago

Thanks, that is very helpful for now and works as you described!