hickory
Resolver backed by the hickory DNS library.
Cache behavior and protective timeouts still come from the resolver wrapper.
The keys below configure the hickory client itself.
The following common keys are supported:
server
required, type: str | seq
Configured name servers. All configured servers may be tried before a positive response is returned.
If the value is a string, it may contain one or more ip addr str values separated by whitespace.
If the value is a sequence, each element must be an ip addr str.
At least one server is required.
server_port
optional, type: u16
Port to use when the default port is not suitable.
default: 53 for udp and tcp, 853 for dns-over-tls, 443 for dns-over-https
encryption
optional, type: dns encryption config
DNS encryption configuration.
default: not set
connect_timeout
optional, type: humanize duration
Timeout used when establishing a TCP/TLS/QUIC connection to the target server.
default: 10s
Added in version 1.7.37.
request_timeout
optional, type: humanize duration
Timeout used while waiting for a response after a request has been sent to the target server.
default: 10s
Added in version 1.7.37.
each_tries
optional, type: i32
Number of attempts made against one specific target server if no valid response is received on the previous attempt.
Note
negative response is also considered valid
default: 2
Changed in version 1.7.37: this only control retries to a specific target server
each_timeout
optional, type: humanize duration
Specify the timeout for waiting all responses from one specific target server.
default: 5s
retry_interval
optional, type: humanize duration
Retry interval between different target servers.
Responses may still arrive from previously tried servers, and the first positive one is used.
default: 1s
Added in version 1.7.37.
bind_ip
optional, type: ip addr str
Bind IP used when creating sockets for the resolver.
bind_interface
optional, type: interface name
Binds the outgoing socket to a particular interface such as eth0.
Note
This is only supported on Linux based OS.
default: not set
Example
server:
- 1.1.1.1
- 8.8.8.8
each_timeout: 5s
each_tries: 2
retry_interval: 1s
bind_ip: 192.0.2.10
Added in version 1.11.3.
tcp_misc_opts
optional, type: tcp misc sock opts
Miscellaneous TCP socket options.
default: not set, nodelay is default enabled
Added in version 1.11.3.
udp_misc_opts
optional, type: udp misc sock opts
Miscellaneous UDP socket options.
default: not set
Added in version 1.11.3.