lukaspustina / mhost

More than host - A modern take on the classic host DNS lookup utility including an easy to use and very fast Rust lookup library.
https://mhost.pustina.de
Apache License 2.0
32 stars 4 forks source link

[BUG] Timeouts do not work with TLS or HTTPS connections #620

Open lukaspustina opened 3 years ago

lukaspustina commented 3 years ago

Describe the bug When using DNS servers with TLS or HTTPS connection types the configured timeout are not applied.

To Reproduce Steps to reproduce the behavior:

The ports are wrong in the above examples and mhost should abort due to the default timeout after 5 seconds. but it takes over a minute.

[15:04:29 lukas] ~  →  mhost --no-system-lookups -s tls:1.1.1.1:852,tls_auth_name=dns.quad9.net,name="Quad9 1" lookup example.com
▶︎ Options: mode=multi, concurrent nameservers=10, max. nameservers=100, concurrent requests=5, retries=0, timeout=5s, ndots=1, abort on error, abort on timeout
▶︎ Running lookups.
▸ Sending 4 requests to 1 nameserver for 4 record types of 1 name.
▸ Received 0 responses with 0 RR [], 0 Nx, 1 Err [1 TO, 0 QR, 0 SF, 0 O] in (min -, max -) ms from 0 servers within 76204 ms of total run time.
❖ Finished.
[15:05:49 lukas] ~  →

Expected behavior mhost should abort after the timeout which in these examples is the default timeout of 5 seconds.

Version (please complete the following information):

lukaspustina commented 3 years ago

This is a known issue in trust-dns resolver; cf. https://github.com/bluejekyll/trust-dns/issues/1073