Skip to content

Commit

Permalink
fix: republished crypto conditionally
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed Nov 2, 2024
1 parent 9945262 commit 212a458
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions crates/shadowsocks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,33 @@ hickory-dns = ["hickory-resolver", "arc-swap", "notify"]
# Hickory-DNS was renamed from Trust-DNS, keep compatibility.
trust-dns = ["hickory-dns"]

# Enable cryptography features.
crypto = ["shadowsocks-crypto"]

# Enable Stream Cipher Protocol
# 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", "shadowsocks-crypto/v1-stream"]
stream-cipher = ["crypto", "shadowsocks-crypto/v1-stream"]

# Enable extra AEAD ciphers
# WARN: These non-standard AEAD ciphers are not officially supported by shadowsocks community
aead-cipher-extra = ["shadowsocks-crypto", "shadowsocks-crypto/v1-aead-extra"]
aead-cipher-extra = ["crypto", "shadowsocks-crypto/v1-aead-extra"]

# Enable AEAD 2022
aead-cipher-2022 = [
"shadowsocks-crypto",
"crypto",
"shadowsocks-crypto/v2",
"rand/small_rng",
"aes",
"lru_time_cache",
]
# Enable AEAD 2022 with extra ciphers
aead-cipher-2022-extra = ["aead-cipher-2022", "shadowsocks-crypto/v2-extra"]
aead-cipher-2022-extra = [
"crypto",
"aead-cipher-2022",
"shadowsocks-crypto/v2-extra",
]

# Enable detection against replay attack
security-replay-attack-detect = ["bloomfilter"]
Expand Down
1 change: 1 addition & 0 deletions crates/shadowsocks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub use self::{
},
};

#[cfg(feature = "crypto")]
pub use shadowsocks_crypto as crypto;

pub mod config;
Expand Down

0 comments on commit 212a458

Please sign in to comment.