Skip to content

Commit

Permalink
Replace unmaintained trust-dns with hickory-dns (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
yhx-12243 authored Nov 6, 2024
1 parent 0ad3e39 commit b8b5c68
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions lib/grammers-mtsender/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories = ["api-bindings", "network-programming"]
edition = "2021"

[features]
proxy = ["tokio-socks", "trust-dns-resolver", "url"]
proxy = ["tokio-socks", "hickory-resolver", "url"]

[dependencies]
bytes = "1.7.1"
Expand All @@ -27,7 +27,7 @@ grammers-tl-types = { path = "../grammers-tl-types", version = "0.7.0", features
log = "0.4.22"
tokio = { version = "1.40.0", default-features = false, features = ["net", "io-util", "sync", "time"] }
tokio-socks = { version = "0.5.2", optional = true }
trust-dns-resolver = { version = "0.23.2", optional = true }
hickory-resolver = { version = "0.24.1", optional = true }
url = { version = "2.5.2", optional = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion lib/grammers-mtsender/DEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Used to test that this file lists all dependencies from `Cargo.toml`.

Used to parse the optional proxy URL.

## trust-dns-resolver
## hickory-resolver

Used to look up the IP address of the proxy host if a domain is provided.

Expand Down
4 changes: 2 additions & 2 deletions lib/grammers-mtsender/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ use tokio::time::{sleep_until, Duration, Instant};

#[cfg(feature = "proxy")]
use {
hickory_resolver::config::{ResolverConfig, ResolverOpts},
hickory_resolver::AsyncResolver,
std::io::ErrorKind,
std::net::{IpAddr, SocketAddr},
tokio_socks::tcp::Socks5Stream,
trust_dns_resolver::config::{ResolverConfig, ResolverOpts},
trust_dns_resolver::AsyncResolver,
url::Host,
};

Expand Down

0 comments on commit b8b5c68

Please sign in to comment.