mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-02-09 01:59:16 +08:00
upgrade to trust-dns-resolver v0.20 release
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,3 +11,4 @@
|
||||
/restart.sh
|
||||
/udp_echo_server.py
|
||||
/.idea
|
||||
/.devcontainer
|
||||
|
||||
31
Cargo.lock
generated
31
Cargo.lock
generated
@@ -20,9 +20,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "anyhow"
|
||||
version = "1.0.36"
|
||||
version = "1.0.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68803225a7b13e47191bab76f2687382b60d259e8cf37f6e1893658b84bb9479"
|
||||
checksum = "ee67c11feeac938fae061b232e38e0b6d94f97a9df10e6271319325ac4c56a86"
|
||||
|
||||
[[package]]
|
||||
name = "arc-swap"
|
||||
@@ -587,9 +587,9 @@ checksum = "3c1ad908cc71012b7bea4d0c53ba96a8cba9962f048fa68d143376143d863b7a"
|
||||
|
||||
[[package]]
|
||||
name = "hyper"
|
||||
version = "0.14.1"
|
||||
version = "0.14.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b7b980c7bc75203b968f06374cbde00bf1818e02e156b8e5b6ccf440fb53b6d0"
|
||||
checksum = "12219dc884514cb4a6a03737f4413c0e01c23a1b059b0156004b23f1e19dccbe"
|
||||
dependencies = [
|
||||
"bytes 1.0.0",
|
||||
"futures-channel",
|
||||
@@ -865,9 +865,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "native-tls"
|
||||
version = "0.2.6"
|
||||
version = "0.2.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6fcc7939b5edc4e4f86b1b4a04bb1498afaaf871b1a6691838ed06fcb48d3a3f"
|
||||
checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4"
|
||||
dependencies = [
|
||||
"lazy_static",
|
||||
"libc",
|
||||
@@ -1425,9 +1425,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.60"
|
||||
version = "1.0.61"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779"
|
||||
checksum = "4fceb2595057b6891a4ee808f70054bd2d12f0e97f1cbb78689b59f676df325a"
|
||||
dependencies = [
|
||||
"itoa",
|
||||
"ryu",
|
||||
@@ -2060,8 +2060,9 @@ checksum = "efd1f82c56340fdf16f2a953d7bda4f8fdffba13d93b00844c25572110b26079"
|
||||
|
||||
[[package]]
|
||||
name = "trust-dns-proto"
|
||||
version = "0.20.0-alpha.3"
|
||||
source = "git+https://github.com/bluejekyll/trust-dns.git?branch=main#57245de7d73008c9f960ba8c952e2dbcee54bb84"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "98a0381b2864c2978db7f8e17c7b23cca5a3a5f99241076e13002261a8ecbabd"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"cfg-if 1.0.0",
|
||||
@@ -2084,8 +2085,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "trust-dns-resolver"
|
||||
version = "0.20.0-alpha.3"
|
||||
source = "git+https://github.com/bluejekyll/trust-dns.git?branch=main#57245de7d73008c9f960ba8c952e2dbcee54bb84"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3072d18c10bd621cb00507d59cfab5517862285c353160366e37fbf4c74856e4"
|
||||
dependencies = [
|
||||
"cfg-if 1.0.0",
|
||||
"futures-util",
|
||||
@@ -2108,8 +2110,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "trust-dns-rustls"
|
||||
version = "0.20.0-alpha.3"
|
||||
source = "git+https://github.com/bluejekyll/trust-dns.git?branch=main#57245de7d73008c9f960ba8c952e2dbcee54bb84"
|
||||
version = "0.20.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "094ff0f3c89393b47a7bb6837a97b28688ef01e57a2400949db1bbb98c932502"
|
||||
dependencies = [
|
||||
"futures-channel",
|
||||
"futures-io",
|
||||
|
||||
@@ -93,7 +93,7 @@ http = { version = "0.2", optional = true }
|
||||
hyper = { version = "0.14", optional = true, features = ["full"] }
|
||||
tower = { version = "0.3", optional = true }
|
||||
|
||||
trust-dns-resolver = { git = "https://github.com/bluejekyll/trust-dns.git", branch = "main", optional = true, features = ["serde-config"] }
|
||||
trust-dns-resolver = { version = "0.20", optional = true, features = ["serde-config"] }
|
||||
|
||||
ipnet = "2.3"
|
||||
iprange = "0.6"
|
||||
|
||||
@@ -539,6 +539,22 @@ impl FromStr for ProtocolType {
|
||||
}
|
||||
}
|
||||
|
||||
/// Configuration for `tun` device, enabled by `local-tun`
|
||||
#[cfg(feature = "local-tun")]
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct TunConfig {
|
||||
/// Name of tun device. System will allocate one for you if set to empty
|
||||
pub name: String,
|
||||
/// MTU of the device
|
||||
pub mtu: Option<i32>,
|
||||
/// IPv4 address of device
|
||||
pub address: Option<Ipv4Addr>,
|
||||
/// IPv4 destination of device
|
||||
pub destination: Option<Ipv4Addr>,
|
||||
/// IPv4 netmark address of device
|
||||
pub netmask: Option<Ipv4Addr>,
|
||||
}
|
||||
|
||||
/// Configuration
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Config {
|
||||
@@ -633,10 +649,14 @@ pub struct Config {
|
||||
/// UDP Transparent Proxy type
|
||||
#[cfg(feature = "local-redir")]
|
||||
pub udp_redir: RedirType,
|
||||
/// Flow statistic report Unix socket path (only for Android)
|
||||
|
||||
/// Flow statistic report Unix socket path (only for Android)
|
||||
#[cfg(feature = "local-flow-stat")]
|
||||
pub stat_path: Option<PathBuf>,
|
||||
|
||||
/// tun device configuration
|
||||
#[cfg(feature = "local-tun")]
|
||||
pub tun: Option<TunConfig>,
|
||||
}
|
||||
|
||||
/// Configuration parsing error kind
|
||||
@@ -753,6 +773,9 @@ impl Config {
|
||||
|
||||
#[cfg(feature = "local-flow-stat")]
|
||||
stat_path: None,
|
||||
|
||||
#[cfg(feature = "local-tun")]
|
||||
tun: None,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ mio = "0.7"
|
||||
socket2 = "0.3"
|
||||
tokio = { version = "1.0", features = ["io-util", "macros", "net", "parking_lot", "process", "rt"] }
|
||||
|
||||
trust-dns-resolver = { git = "https://github.com/bluejekyll/trust-dns.git", branch = "main", optional = true }
|
||||
trust-dns-resolver = { version = "0.20", optional = true }
|
||||
|
||||
[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies]
|
||||
shadowsocks-crypto = { version = "0.1", features = ["ring"] }
|
||||
|
||||
Reference in New Issue
Block a user