From d79b018b9e84adfaf53bdf3db655c1a604ef7e36 Mon Sep 17 00:00:00 2001 From: zonyitoo Date: Sun, 3 Nov 2024 00:36:07 +0800 Subject: [PATCH] feat: shadowsocks-crypto enables ring for all platforms --- crates/shadowsocks/Cargo.toml | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/crates/shadowsocks/Cargo.toml b/crates/shadowsocks/Cargo.toml index 8c5e0e60e0be..4861d0f42069 100644 --- a/crates/shadowsocks/Cargo.toml +++ b/crates/shadowsocks/Cargo.toml @@ -26,10 +26,10 @@ trust-dns = ["hickory-dns"] # WARN: Stream Cipher Protocol is proved to be insecure # https://github.com/shadowsocks/shadowsocks-rust/issues/373 # Users should always avoid using these ciphers in practice -stream-cipher = ["shadowsocks-crypto/v1-stream"] +stream-cipher = ["shadowsocks-crypto", "shadowsocks-crypto/v1-stream"] # Enable AEAD ciphers -aead-cipher = ["shadowsocks-crypto/v1-aead"] +aead-cipher = ["shadowsocks-crypto", "shadowsocks-crypto/v1-aead"] # Enable extra AEAD ciphers # WARN: These non-standard AEAD ciphers are not officially supported by shadowsocks community @@ -37,6 +37,7 @@ aead-cipher-extra = ["aead-cipher", "shadowsocks-crypto/v1-aead-extra"] # Enable AEAD 2022 aead-cipher-2022 = [ + "shadowsocks-crypto", "shadowsocks-crypto/v2", "rand/small_rng", "aes", @@ -91,15 +92,9 @@ notify = { version = "7.0", optional = true } aes = { version = "0.8", optional = true } blake3 = "1.5" - -[target.'cfg(any(target_arch = "x86_64", target_arch = "aarch64"))'.dependencies] shadowsocks-crypto = { version = "0.5.8", default-features = false, features = [ "ring", -] } - -[target.'cfg(not(any(target_arch = "x86_64", target_arch = "aarch64")))'.dependencies] -shadowsocks-crypto = { version = "0.5.8", default-features = false, features = [ -] } +], optional = true } [target.'cfg(any(windows, target_os = "linux", target_os = "android", target_os = "freebsd", target_os = "macos", target_os = "ios", target_os = "watchos", target_os = "tvos"))'.dependencies] tokio-tfo = "0.3"