1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//! Encrypted TXT discovery and hexadecimal IPv4 resolution.
//!
//! Disable default features to embed the resolver without the CLI, HTTP servers,
//! Cloudflare client, or built-in network transport. Supply an [`Exchange`]
//! implementation backed by the application's existing DNS resolver.
//!
//! ```
//! use std::sync::Arc;
//! use tendns::{Discovery, Exchange, Policy, Resolver};
//! use tendns::{names::canonical_name, protocol::Secret};
//!
//! fn make_resolver(upstream: Arc<dyn Exchange>, encoded_key: &str)
//! -> anyhow::Result<Resolver>
//! {
//! let policy = Policy::new(
//! vec![Discovery {
//! domain: canonical_name("example.com")?,
//! key: Arc::new(Secret::decode(encoded_key)?),
//! }],
//! vec![canonical_name("hex.internal")?],
//! 60,
//! 1024,
//! )?;
//! Ok(Resolver::new(Arc::new(policy), upstream))
//! }
//! ```
pub use TimeoutError;
pub use hickory_proto;
pub use ;
pub use ;
pub use Exchange;