This allows custom runtimes to provide the hosts configuration in their
own way, like using io_uring instead of the std::fs::File::open() to
read the system hosts file.
Currently, if queries to name servers over UDP result in either a
truncated response, or any kind of error, the query will be retried over
TCP. It should be possible to only use TCP for the case of oversized
messages, and avoid it in the common case. This change makes this the
default behavior and adds an option to ResolverOpts that can be enabled
to get the current behavior.
Some servers do not support EDNS, and some (such as the ingress-dns
addon to Minikube) return malformed DNS responses when sent EDNS
additional records. Previously, it was not possible to not send the
EDNS records, despite having a ResolverOpts field for it, which was
confusing.
This commit wires the ResolverOpts edns0 option to a new
DnsRequestOptions field and uses that option to control whether or not
additional EDNS records should be used.
Note: this changes the default behavior of the resolver, as the default
value for ResolverOpts::edns0 is false, but previously the additional
EDNS records would be added anyway. It seems this change is inline with
the desired behavior, as the defaults are intended to match the
resolv.conf defaults, which do not use EDNS.
Signed-off-by: Zvi "CtrlZvi" Effron <viz_skywalker+GitHub@outlook.com>
* add more debug information to DNSSEC validation
* update ring validation to allow 1024bit keys for all Algorithm types
* disable dnssec tests in std builds
* ensure TrustAnchor is constructed properly in DnsSecSyncClient
* add key length to DNSKEY display
* logger: missing https crate
* https: use RuntimeProvider when making connections
- [X] use RuntimeProvider when making TCP connections
- [ ] use RuntimeProvider when making TLS upgrades
- [ ] migrate tests
* RuntimeProvider::Tcp: remove async read/write
The TCP needs to Connect, the async readwriter will be in the
transport of connect. Thus we don't need it to be a requirement
on the top trait of RuntimeProvider
* AsyncResolver: remove async from new()
Related to overriding RuntimeProvider for #1074
Solves #1056
* cleanup tests
* rebase master for 0.19.5
* fix windows tests
Co-authored-by: Benjamin Fry <benjaminfry@me.com>