Commit Graph

62 Commits

Author SHA1 Message Date
Benjamin Fry
3a099742fa cleanup workspace features 2023-05-10 22:55:38 +02:00
Benjamin Fry
7a9e39a863 cleanliness updates forrustc 1.69 2023-05-10 22:55:38 +02:00
Benjamin Fry
7aaf10078d use proper rust convention for RData::{ip_addr, record_type} fns 2023-03-24 08:47:59 -07:00
XOR-op
3410e9e95a fix compile errors 2023-03-04 11:03:13 -08:00
XOR-op
61884a1b2e fix TokioRuntimeProvider bug 2023-03-04 11:03:13 -08:00
XOR-op
03af149076 fix clippy and compile errors 2023-03-04 11:03:13 -08:00
XOR-op
63a1f7692e test: fix compile errors 2023-03-04 11:03:13 -08:00
XOR-op
74bdef0d9a replace ConnProvider with RuntimeProvider 2023-03-04 11:03:13 -08:00
XOR-op
3c3f14ddc5 fix nameserver logic and udp socket creation 2023-03-04 11:03:13 -08:00
XOR-op
c494045673 WIP: logic of NameServer 2023-03-04 11:03:13 -08:00
Benjamin Fry
b34dfff95c fix formatting for inline variables 2023-02-06 09:25:04 -08:00
HLFH
98fd773a08 fix DNSSec typo > DNSSEC 2022-12-20 15:22:05 +01:00
Jeff Hiner
15423b8610 Use JoinSet for resolver tokio tasks 2022-09-13 08:46:56 -07:00
Benjamin Fry
a89cde5393 remove DnsRequestOptions from AsyncResolver::lookup 2022-08-24 15:20:43 -07:00
Stefan Schindler
11b84140ff Relax mut requirements for resolver.clear_cache() and add cache flushing example (#1747) 2022-08-01 17:12:38 +02:00
Erik Hollensbe
77a821f52b Move log to tracing package
Signed-off-by: Erik Hollensbe <git@hollensbe.org>
2022-05-09 10:33:19 -07:00
Fantix King
fab0b6aa6e CRF: merge impl and raise io::Error
Also fixed a redundant closure and a Rustfmt issue.
2022-05-08 12:54:22 -07:00
Fantix King
1845ccd088 Allow customizing the static hosts configuration
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.
2022-05-08 12:54:22 -07:00
Noah Kennedy
68ff5089af make constructors for AsyncResolver with custom providers public
This allows users to use custom connection providers, like in #1653.
2022-03-02 15:02:14 -08:00
Benjamin Fry
95b2dee327 add clippy::use_self for cleanliness 2022-02-17 19:47:32 -08:00
Benjamin Fry
61da37009e first pass, make RData optional in Record 2022-02-08 00:58:14 +01:00
Stefan Schindler
a30e694421 Add resolver.clear_cache() sync and async (#1611)
* Add resolver.clear_cache() sync and async

* Synchronise the docs
2022-01-04 15:00:02 -08:00
Peter Johnston
aefb6deded Default to only switch to TCP if response was truncated
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.
2021-10-08 09:46:55 -07:00
Benjamin Fry
69829fa9ca fix negative dnssec test after trust-dns.org zone change 2021-08-22 19:51:56 -07:00
Trinity Pointard
032b33c9fc clippy 2021-05-08 13:42:42 -07:00
Trinity Pointard
e4118250f8 try to prevent search of onion domain as subdomain of a search zone 2021-05-08 13:42:42 -07:00
Benjamin Fry
6dfc6713fa fix panic on name too long 2021-04-11 08:48:15 -07:00
Benjamin Fry
4e30b1b1c9 disable mDNS, remove multi-return array 2021-04-09 21:57:43 -07:00
Benjamin Fry
3f270a0aae mark ResolverOpts and DnsRequestOptions as non_exhaustive 2021-04-06 10:29:16 +02:00
Benjamin Fry
c425bdbd6e improve resolver docs for docsrs 2021-03-27 19:53:44 -07:00
Benjamin Fry
6fcc72acca Make all warnings across crates and binaries consistent 2021-03-08 15:34:26 -08:00
Benjamin Fry
7a4b3b55c3 fix clippy warnings for rustc 1.50 2021-02-17 23:19:59 -08:00
Benjamin Fry
24c4ccdf02 remove TokioHandle from public interfaces 2020-11-28 20:38:00 -08:00
Benjamin Fry
402a14abce upgrade trust-dns-resolver to Tokio 0.3 2020-11-28 20:38:00 -08:00
Benjamin Fry
8056cb0d83 clippy updates for rust 1.48 2020-11-24 14:54:07 -08:00
Dirkjan Ochtman
4ee7ffadfd explicitly make Connect implement the Transport 2020-10-16 13:24:45 -07:00
Dirkjan Ochtman
587273247e resolver: rename lookup_state to caching_client 2020-10-16 01:53:05 -07:00
Dirkjan Ochtman
90bfbede51 move Arc<Mutex<_>> wrapper into DnsLru 2020-10-16 01:53:05 -07:00
Dirkjan Ochtman
c0cdfbf2dd inline single-use constructor method 2020-10-16 01:53:05 -07:00
Dirkjan Ochtman
5ea0956819 use synchronous Mutex for resolver cache
Since the lock is not held across await points, the sync Mutex is simpler.
2020-10-16 01:53:05 -07:00
Dirkjan Ochtman
94fa917c74 remove non-macro-use extern crate imports 2020-10-13 07:58:06 -07:00
Dirkjan Ochtman
756749bd9e avoid unwrap() for functions that don't error 2020-10-05 09:31:30 -07:00
Benjamin Fry
248fd8709b make errors generic in DnsHandle for Resolver 2020-09-15 15:27:44 -07:00
Andrew McConachie
e6f6f9dc8b Add support for tlsa RRs in trust_dns_resolver, trust_dns_resolver::Resolver.tlsa_lookup() 2020-08-16 13:22:46 -07:00
Zvi "CtrlZvi" Effron
70427e0383 Make EDNS optional for resolvers
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>
2020-08-03 17:40:09 -07:00
Benjamin Fry
2710b9f4f4 Fully support *ring* for all DNSSEC operations. (#1145)
* 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
2020-06-23 10:46:22 -07:00
Yuki Okushi
3382d887b7 resolver: Minimize futures dependencies 2020-05-19 06:16:21 -07:00
Johnny Bergström
2502c58c14 use RuntimeProvider in https (#1077)
* 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>
2020-05-02 11:18:50 -07:00
Benjamin Fry
30e0f302a0 bump version to 0.19.5 2020-04-27 11:58:09 -07:00
Benjamin Fry
87efb45bf1 add separate crate for AsyncStd 2020-04-11 13:51:52 -07:00