diff --git a/Cargo.lock b/Cargo.lock index cda662606cd5..437b87719eea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -283,12 +283,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bit-vec" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" - [[package]] name = "bitflags" version = "1.3.2" @@ -350,11 +344,10 @@ dependencies = [ [[package]] name = "bloomfilter" -version = "2.0.0" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ee97b815938a5cbb3a0d487d8006fec4859e46c3cd9d1edb1f81090dab14ac" +checksum = "1f6d7f06817e48ea4e17532fa61bc4e8b9a101437f0623f69d2ea54284f3a817" dependencies = [ - "bit-vec", "getrandom", "siphasher", ] diff --git a/crates/shadowsocks/Cargo.toml b/crates/shadowsocks/Cargo.toml index b4382d7ae25a..7c8ea5434cfc 100644 --- a/crates/shadowsocks/Cargo.toml +++ b/crates/shadowsocks/Cargo.toml @@ -60,7 +60,7 @@ url = "2.5" once_cell = "1.17" spin = { version = "0.9", features = ["std"] } pin-project = "1.1" -bloomfilter = { version = "2.0.0", optional = true } +bloomfilter = { version = "3.0.0", optional = true } thiserror = "2.0" rand = { version = "0.8", optional = true } lru_time_cache = { version = "0.11", optional = true } diff --git a/crates/shadowsocks/src/security/replay/ppbloom.rs b/crates/shadowsocks/src/security/replay/ppbloom.rs index 50490ccba7a9..88dfa20d16ad 100644 --- a/crates/shadowsocks/src/security/replay/ppbloom.rs +++ b/crates/shadowsocks/src/security/replay/ppbloom.rs @@ -47,8 +47,8 @@ impl PingPongBloom { PingPongBloom { blooms: [ - Bloom::new_for_fp_rate(item_count, fp_p), - Bloom::new_for_fp_rate(item_count, fp_p), + Bloom::new_for_fp_rate(item_count, fp_p).expect("BloomFilter1"), + Bloom::new_for_fp_rate(item_count, fp_p).expect("BloomFilter2"), ], bloom_count: [0, 0], item_count,