From 352d69ceac619548a3007524fb59605b9ed6f448 Mon Sep 17 00:00:00 2001 From: Jun Kurihara Date: Fri, 27 Oct 2023 20:41:18 +0900 Subject: [PATCH] chore: trust-dns is now hickory-dns --- dap-lib/Cargo.toml | 2 +- dap-lib/src/bootstrap.rs | 6 +++--- dap-lib/src/error.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dap-lib/Cargo.toml b/dap-lib/Cargo.toml index 0ef2c30..7ab2a9e 100644 --- a/dap-lib/Cargo.toml +++ b/dap-lib/Cargo.toml @@ -66,7 +66,7 @@ reqwest = { version = "0.11.22", default-features = false, features = [ url = "2.4.1" # for bootstrap dns resolver -trust-dns-resolver = { version = "0.23.2", default-features = false, features = [ +hickory-resolver = { version = "0.24.0", default-features = false, features = [ "tokio-runtime", ] } diff --git a/dap-lib/src/bootstrap.rs b/dap-lib/src/bootstrap.rs index 3aed770..1951c0e 100644 --- a/dap-lib/src/bootstrap.rs +++ b/dap-lib/src/bootstrap.rs @@ -5,13 +5,13 @@ use crate::{ trait_resolve_ips::{ResolveIpResponse, ResolveIps}, }; use async_trait::async_trait; -use reqwest::Url; -use std::{net::SocketAddr, sync::Arc}; -use trust_dns_resolver::{ +use hickory_resolver::{ config::{NameServerConfigGroup, ResolverConfig, ResolverOpts}, name_server::{GenericConnector, TokioRuntimeProvider}, AsyncResolver, TokioAsyncResolver, }; +use reqwest::Url; +use std::{net::SocketAddr, sync::Arc}; #[derive(Clone)] /// stub resolver using bootstrap DNS resolver diff --git a/dap-lib/src/error.rs b/dap-lib/src/error.rs index a85e1f1..72d2c31 100644 --- a/dap-lib/src/error.rs +++ b/dap-lib/src/error.rs @@ -8,7 +8,7 @@ pub type Result = std::result::Result; #[derive(Debug, Error)] pub enum DapError { #[error("Bootstrap resolver error: {0}")] - BootstrapResolverError(#[from] trust_dns_resolver::error::ResolveError), + BootstrapResolverError(#[from] hickory_resolver::error::ResolveError), #[error("Url error: {0}")] UrlError(#[from] url::ParseError),