add DNS configuration for TCP fallback.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk 2024-04-16 05:41:55 -07:00 committed by June
parent b6cf0e6fcf
commit 8b003e6be2
3 changed files with 7 additions and 0 deletions

View file

@ -64,6 +64,7 @@ impl Resolver {
opts.positive_max_ttl = Some(Duration::from_secs(60 * 60 * 24 * 7));
opts.timeout = Duration::from_secs(config.dns_timeout);
opts.attempts = config.dns_attempts as usize;
opts.try_tcp_on_error = config.dns_tcp_fallback;
opts.num_concurrent_reqs = 1;
opts.shuffle_dns_servers = true;
opts.rotate = true;