nautalid 0.1.0

Scratch container substrate — TLS 1.3 HTTP/2+3 kernel, LID/AetherDB, optional filter bus (GPL-3.0-or-later).
//! Pure-Rust DNS for scratch containers (Hickory resolver, no `getaddrinfo`).
//!
//! | Traffic | Resolver |
//! |---------|----------|
//! | Outbound HTTPS (reqwest) | [`https_client`] / [`reqwest_resolver`] |
//! | AetherDB wire (`tcp://host:port`) | [`resolve_tcp_connect`] |
//! | Embedded AetherDB (`local` / unset URL) | None — no DNS |
//!
//! Configure upstream nameservers with **`NAUTALID_DNS`** (comma-separated IPs). When unset,
//! Hickory reads **`/etc/resolv.conf`** if the runtime injects it; otherwise falls back to
//! public resolvers with a warning. Optional warm-up probe: **`NAUTALID_AETHER_CONNECT`**.

mod config;
mod endpoint;
mod error;
mod reqwest_resolve;
mod runtime;
#[cfg(feature = "bus")]
mod zmq_connect;

pub use config::{DnsConfigError, DnsSource, nameservers_from_env, parse_nameserver_list};
pub use endpoint::{
    format_tcp_endpoint, host_is_literal, log_aether_connect_resolution, parse_tcp_host_port,
    resolve_tcp_connect, resolve_tcp_connect_all,
};
pub use error::{DnsError, TcpEndpointError};
pub use runtime::{install_from_env, log_sample_resolution, lookup_ip, reqwest_resolver, source};
#[cfg(feature = "bus")]
pub use zmq_connect::{connect_resolved, connect_resolved_first};

/// Shared HTTP client using the in-process Hickory resolver (rustls + Mozilla roots).
pub fn https_client() -> Result<reqwest::Client, DnsError> {
    install_from_env()?;
    let resolver = reqwest_resolver()?;
    reqwest::Client::builder()
        .use_rustls_tls()
        .dns_resolver(resolver)
        .build()
        .map_err(DnsError::HttpClient)
}