diff --git a/CHANGELOG.md b/CHANGELOG.md index 418e692..1326500 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Unreleased (Yet) +## ttfb lib + +- **BREAKING** The MSRV is now `1.67.0` stable. +- dependency updates + +## ttfb binary + +- dependency updates + # v1.11.0 (2024-04-09) ## ttfb lib diff --git a/Cargo.lock b/Cargo.lock index 43f9888..da0e3a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -352,6 +352,56 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hickory-proto" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf" +dependencies = [ + "async-trait", + "cfg-if", + "data-encoding", + "enum-as-inner", + "futures-channel", + "futures-io", + "futures-util", + "idna 0.4.0", + "ipnet", + "once_cell", + "rand", + "rustls 0.21.10", + "rustls-pemfile 1.0.4", + "thiserror", + "tinyvec", + "tokio", + "tokio-rustls", + "tracing", + "url", +] + +[[package]] +name = "hickory-resolver" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35b8f021164e6a984c9030023544c57789c51760065cd510572fedcfb04164e8" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto", + "ipconfig", + "lru-cache", + "once_cell", + "parking_lot", + "rand", + "resolv-conf", + "rustls 0.21.10", + "smallvec", + "thiserror", + "tokio", + "tokio-rustls", + "tracing", +] + [[package]] name = "hostname" version = "0.3.1" @@ -572,9 +622,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -676,11 +726,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.22.3" +version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99008d7ad0bbbea527ec27bddbc0e432c5b87d8175178cee68d2eec9c4a1813c" +checksum = "8c4d6d8ad9f2492485e13453acbb291dd08f64441b6609c491f1c2cd2c6b4fe1" dependencies = [ "log", + "once_cell", "ring", "rustls-pki-types", "rustls-webpki 0.102.2", @@ -690,16 +741,15 @@ dependencies = [ [[package]] name = "rustls-connector" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5bd40675c79c896f46d0031bf64c448b35e583dd2bc949751ddd800351e453a" +version = "0.21.0" +source = "git+https://github.com/phip1611/rustls-connector?branch=rustls-fix#eb2a5ed6542de224cfc9b45fd5f0c61507613080" dependencies = [ "log", - "rustls 0.22.3", + "rustls 0.23.4", "rustls-native-certs", "rustls-pki-types", "rustls-webpki 0.102.2", - "webpki-roots 0.26.1", + "webpki-roots", ] [[package]] @@ -1006,59 +1056,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "trust-dns-proto" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3119112651c157f4488931a01e586aa459736e9d6046d3bd9105ffb69352d374" -dependencies = [ - "async-trait", - "cfg-if", - "data-encoding", - "enum-as-inner", - "futures-channel", - "futures-io", - "futures-util", - "idna 0.4.0", - "ipnet", - "once_cell", - "rand", - "rustls 0.21.10", - "rustls-pemfile 1.0.4", - "rustls-webpki 0.101.7", - "smallvec", - "thiserror", - "tinyvec", - "tokio", - "tokio-rustls", - "tracing", - "url", -] - -[[package]] -name = "trust-dns-resolver" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a3e6c3aff1718b3c73e395d1f35202ba2ffa847c6a62eea0db8fb4cfe30be6" -dependencies = [ - "cfg-if", - "futures-util", - "ipconfig", - "lru-cache", - "once_cell", - "parking_lot", - "rand", - "resolv-conf", - "rustls 0.21.10", - "smallvec", - "thiserror", - "tokio", - "tokio-rustls", - "tracing", - "trust-dns-proto", - "webpki-roots 0.25.4", -] - [[package]] name = "ttfb" version = "1.11.0" @@ -1066,10 +1063,10 @@ dependencies = [ "clap", "crossterm", "derive_more", - "rustls 0.22.3", + "hickory-resolver", + "rustls 0.23.4", "rustls-connector", "tokio", - "trust-dns-resolver", "url", ] @@ -1144,12 +1141,6 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "webpki-roots" version = "0.26.1" diff --git a/Cargo.toml b/Cargo.toml index 3341db7..0c3e2e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,7 @@ absolute timings of DNS lookup, TCP connect, and TLS handshake. """ version = "1.11.0" edition = "2021" -rust-version = "1.65" # MSRV of the library (= min(lib,bin)) +rust-version = "1.67" # MSRV of the library (= min(lib,bin)) keywords = ["ttfb", "http", "timings", "web"] categories = ["network-programming", "command-line-utilities"] readme = "README.md" @@ -38,10 +38,11 @@ bin = ["dep:clap", "dep:crossterm"] # +++ LIBRARY +++ # DNS over systems default DNS resolver -trust-dns-resolver = { version = "0.23.0", features = ["dns-over-rustls"] } +hickory-resolver = { version = "0.24.0", default-features = false, features = ["dns-over-rustls", "system-config"] } # TLS handshake -rustls = { version = "0.22.0", features = [] } -rustls-connector = { version = "0.19.0", features = [ +rustls = { version = "0.23.0", default-features = false, features = [ "tls12", "logging", "ring"] } +# rustls-connector = { version = "0.21.0", features = [ +rustls-connector = { git = "https://github.com/phip1611/rustls-connector", branch = "rustls-fix", features = [ "rustls-native-certs", "webpki-roots", "webpki-roots-certs", diff --git a/src/error.rs b/src/error.rs index ce6aee7..e7c71e3 100644 --- a/src/error.rs +++ b/src/error.rs @@ -24,11 +24,11 @@ SOFTWARE. //! Module for [`TtfbError`]. use derive_more::Display; +use hickory_resolver::error::{ResolveError, ResolveErrorKind}; use rustls_connector::HandshakeError; use std::error::Error; use std::io; use std::net::TcpStream; -use trust_dns_resolver::error::{ResolveError, ResolveErrorKind}; /// Errors during DNS resolving. #[derive(Clone, Debug, Display)] diff --git a/src/lib.rs b/src/lib.rs index ae768fc..0cafc72 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,6 +57,7 @@ SOFTWARE. pub use error::{InvalidUrlError, ResolveDnsError, TtfbError}; pub use outcome::{DurationPair, TtfbOutcome}; +use hickory_resolver::Resolver as DnsResolver; use rustls::client::danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier}; use rustls::pki_types::{CertificateDer, ServerName, UnixTime}; use rustls::{ClientConfig, DigitallySignedStruct, Error, SignatureScheme}; @@ -67,7 +68,6 @@ use std::str::FromStr; use std::sync::Arc; use std::thread; use std::time::{Duration, Instant}; -use trust_dns_resolver::Resolver as DnsResolver; use url::Url; mod error; diff --git a/ttfb-lib-msrv-check/rust-toolchain.toml b/ttfb-lib-msrv-check/rust-toolchain.toml index 329dfc9..8111ee7 100644 --- a/ttfb-lib-msrv-check/rust-toolchain.toml +++ b/ttfb-lib-msrv-check/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.65.0" # MSRV of the library +channel = "1.67.0" # MSRV of the library profile = "minimal"