hickory

This is the resolver based on hickory dns library.

The following common keys are supported:

server

required, type: str | seq

Set the nameservers. All server will be tried before get a positive server response.

For str value, it may be one or more ip addr str joined with whitespace characters.

For seq value, each of its value should be ip addr str.

server_port

optional, type: u16

Set the port if the default port is not usable.

default: 53 for udp and tcp, 853 for dns-over-tls, 443 for dns-over-https

encryption

optional, type: dns encryption config

Set the encryption config.

default: not set

connect_timeout

optional, type: humanize duration

Specify the TCP/TLS/QUIC connect timeout value when connecting to the target server.

default: 10s

Added in version 1.7.37.

request_timeout

optional, type: humanize duration

Specify response wait timeout value after a specific request has been to the target server.

default: 10s

Added in version 1.7.37.

each_tries

optional, type: i32

The number of tries for one specific target server if no valid responses received from previous connection.

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

Set retry interval between different target servers.

We will always receive responses from previous tried servers, and the first positive one will be used.

default: 1s

Added in version 1.7.37.

bind_ip

optional, type: ip addr str

Set the bind ip for the resolver while setting up sockets.

bind_interface

optional, type: interface name

Bind the outgoing socket to a particular device like “eth0”.

Note

This is only supported on Linux based OS.

default: not set

Added in version 1.11.3.

tcp_misc_opts

optional, type: tcp misc sock opts

Set misc 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

Set misc udp socket options.

default: not set

Added in version 1.11.3.