From 47169d6fc1ab117898cbcf85f389901147db3923 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Mon, 4 Jan 2021 19:52:30 +0800 Subject: [PATCH] BREAKING: completely deprecated local-dns-relay and single-threaded features --- Cargo.toml | 5 ----- bin/common/validator/mod.rs | 1 + bin/sslocal.rs | 2 +- bin/ssmanager.rs | 2 +- bin/ssserver.rs | 2 +- 5 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e5a1034c0026..2dda24a57199 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,8 +78,6 @@ logging = ["log4rs"] # Enable DNS-relay local-dns = ["local", "shadowsocks-service/local-dns"] -# Backward compatibility, DO NOT USE -local-dns-relay = ["local-dns"] # Enable client flow statistic report # Currently is only used in Android local-flow-stat = ["local", "shadowsocks-service/local-flow-stat"] @@ -102,9 +100,6 @@ tcmalloc-vendored = ["tcmalloc/bundled"] # Enable tokio's multi-threaded runtime multi-threaded = ["tokio/rt-multi-thread"] -# Enable tokio's single-threaded -# DEPRECATED. Uses multi-threaded instead -single-threaded = [] [dependencies] log = "0.4" diff --git a/bin/common/validator/mod.rs b/bin/common/validator/mod.rs index dc5b5cdfd6e9..ba551f1e7e45 100644 --- a/bin/common/validator/mod.rs +++ b/bin/common/validator/mod.rs @@ -31,6 +31,7 @@ validate_type!( ManagerAddr, "should be either ip:port, domain:port or /path/to/unix.sock" ); +#[cfg(feature = "local-dns")] validate_type!( validate_name_server_addr, NameServerAddr, diff --git a/bin/sslocal.rs b/bin/sslocal.rs index 2994fa293b1f..4742c9aab149 100644 --- a/bin/sslocal.rs +++ b/bin/sslocal.rs @@ -397,7 +397,7 @@ fn main() { info!("shadowsocks {}", VERSION); #[cfg(feature = "multi-threaded")] - let mut builder = if matches.is_present("SINGLE_THREADED") || cfg!(feature = "single-threaded") { + let mut builder = if matches.is_present("SINGLE_THREADED") { Builder::new_current_thread() } else { Builder::new_multi_thread() diff --git a/bin/ssmanager.rs b/bin/ssmanager.rs index 910546a0cbe2..71f6148236c7 100644 --- a/bin/ssmanager.rs +++ b/bin/ssmanager.rs @@ -242,7 +242,7 @@ fn main() { info!("shadowsocks {}", VERSION); #[cfg(feature = "multi-threaded")] - let mut builder = if matches.is_present("SINGLE_THREADED") || cfg!(feature = "single-threaded") { + let mut builder = if matches.is_present("SINGLE_THREADED") { Builder::new_current_thread() } else { Builder::new_multi_thread() diff --git a/bin/ssserver.rs b/bin/ssserver.rs index 5104c082cd55..5c44e991fda3 100644 --- a/bin/ssserver.rs +++ b/bin/ssserver.rs @@ -271,7 +271,7 @@ fn main() { info!("shadowsocks {}", VERSION); #[cfg(feature = "multi-threaded")] - let mut builder = if matches.is_present("SINGLE_THREADED") || cfg!(feature = "single-threaded") { + let mut builder = if matches.is_present("SINGLE_THREADED") { Builder::new_current_thread() } else { Builder::new_multi_thread()