System Resolver
Doggo interacts with your system’s DNS resolver configuration and provides options to customize this behavior. This page explains how Doggo handles ndots
, search
domains, and resolver strategies.
Reading from /etc/resolv.conf
By default, Doggo reads configuration from your system’s /etc/resolv.conf
file. This includes:
- List of nameservers
- The
ndots
value - Search domains
ndots Configuration
The ndots
option sets the threshold for the number of dots that must appear in a name before an initial absolute query will be made.
- When using the system nameserver, Doggo reads the
ndots
value from/etc/resolv.conf
. - If not using the system nameserver, it defaults to 1.
- You can override this with the
--ndots
flag:
This affects how Doggo handles non-fully qualified domain names.
Search Configuration
The search configuration allows Doggo to append domain names to queries that are not fully qualified.
- By default, Doggo uses the search list defined in
resolv.conf
. - You can disable this behavior with
--search=false
:
- When search is enabled and a query is not fully qualified, Doggo will try appending domains from the search list.
Resolver Strategy
The resolver strategy determines how Doggo uses the nameservers listed in /etc/resolv.conf
. You can specify a strategy using the --strategy
flag:
Available strategies:
all
(default): Use all nameservers listed in/etc/resolv.conf
.first
: Use only the first nameserver in the list.random
: Randomly choose one nameserver from the list for each query. This can help distribute the load across multiple nameservers.
Command-line Options
Examples
-
Use system resolver with default settings:
-
Use system resolver but change ndots and disable search:
-
Use system resolver with ‘first’ strategy and custom timeout:
-
Override system resolver and use specific nameservers:
Note: When specifying nameservers directly, the system resolver configuration (including strategy) is not used.
You can find more examples at Examples section.