From 6775cb5b9b6b75a3a38399d70de096037977983f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 03:10:03 +1100 Subject: [PATCH] build(deps): bump the rust-dependencies group with 10 updates (#659) * build(deps): bump the rust-dependencies group with 10 updates Bumps the rust-dependencies group with 10 updates: | Package | From | To | | --- | --- | --- | | [socket2](https://github.com/rust-lang/socket2) | `0.5.7` | `0.5.8` | | [opentelemetry](https://github.com/open-telemetry/opentelemetry-rust) | `0.27.0` | `0.27.1` | | [opentelemetry_sdk](https://github.com/open-telemetry/opentelemetry-rust) | `0.27.0` | `0.27.1` | | [bytes](https://github.com/tokio-rs/bytes) | `1.8.0` | `1.9.0` | | [libc](https://github.com/rust-lang/libc) | `0.2.164` | `0.2.167` | | [smoltcp](https://github.com/smoltcp-rs/smoltcp) | `0.11.0` | `0.12.0` | | [tracing](https://github.com/tokio-rs/tracing) | `0.1.40` | `0.1.41` | | [tracing-subscriber](https://github.com/tokio-rs/tracing) | `0.3.18` | `0.3.19` | | [tuic](https://github.com/Itsusinn/tuic) | `v1.3.4` | `v1.3.5` | | [tuic-quinn](https://github.com/Itsusinn/tuic) | `v1.3.4` | `v1.3.5` | Updates `socket2` from 0.5.7 to 0.5.8 - [Release notes](https://github.com/rust-lang/socket2/releases) - [Changelog](https://github.com/rust-lang/socket2/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/socket2/commits) Updates `opentelemetry` from 0.27.0 to 0.27.1 - [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-rust/compare/opentelemetry-0.27.0...opentelemetry-0.27.1) Updates `opentelemetry_sdk` from 0.27.0 to 0.27.1 - [Release notes](https://github.com/open-telemetry/opentelemetry-rust/releases) - [Commits](https://github.com/open-telemetry/opentelemetry-rust/compare/opentelemetry_sdk-0.27.0...opentelemetry_sdk-0.27.1) Updates `bytes` from 1.8.0 to 1.9.0 - [Release notes](https://github.com/tokio-rs/bytes/releases) - [Changelog](https://github.com/tokio-rs/bytes/blob/master/CHANGELOG.md) - [Commits](https://github.com/tokio-rs/bytes/compare/v1.8.0...v1.9.0) Updates `libc` from 0.2.164 to 0.2.167 - [Release notes](https://github.com/rust-lang/libc/releases) - [Changelog](https://github.com/rust-lang/libc/blob/0.2.167/CHANGELOG.md) - [Commits](https://github.com/rust-lang/libc/compare/0.2.164...0.2.167) Updates `smoltcp` from 0.11.0 to 0.12.0 - [Release notes](https://github.com/smoltcp-rs/smoltcp/releases) - [Changelog](https://github.com/smoltcp-rs/smoltcp/blob/main/CHANGELOG.md) - [Commits](https://github.com/smoltcp-rs/smoltcp/compare/v0.11.0...v0.12.0) Updates `tracing` from 0.1.40 to 0.1.41 - [Release notes](https://github.com/tokio-rs/tracing/releases) - [Commits](https://github.com/tokio-rs/tracing/compare/tracing-0.1.40...tracing-0.1.41) Updates `tracing-subscriber` from 0.3.18 to 0.3.19 - [Release notes](https://github.com/tokio-rs/tracing/releases) - [Commits](https://github.com/tokio-rs/tracing/compare/tracing-subscriber-0.3.18...tracing-subscriber-0.3.19) Updates `tuic` from v1.3.4 to v1.3.5 - [Release notes](https://github.com/Itsusinn/tuic/releases) - [Commits](https://github.com/Itsusinn/tuic/compare/333f80df681ed2f8ecc1d8b18efe585c148fc77c...2bb3ba7990bb0a60913c17c5ae1c1c3d79510efa) Updates `tuic-quinn` from v1.3.4 to v1.3.5 - [Release notes](https://github.com/Itsusinn/tuic/releases) - [Commits](https://github.com/Itsusinn/tuic/compare/333f80df681ed2f8ecc1d8b18efe585c148fc77c...2bb3ba7990bb0a60913c17c5ae1c1c3d79510efa) --- updated-dependencies: - dependency-name: socket2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: opentelemetry dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: opentelemetry_sdk dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: bytes dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: libc dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: smoltcp dependency-type: direct:production update-type: version-update:semver-minor dependency-group: rust-dependencies - dependency-name: tracing dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: tracing-subscriber dependency-type: direct:production update-type: version-update:semver-patch dependency-group: rust-dependencies - dependency-name: tuic dependency-type: direct:production dependency-group: rust-dependencies - dependency-name: tuic-quinn dependency-type: direct:production dependency-group: rust-dependencies ... Signed-off-by: dependabot[bot] * up --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: dev0 --- Cargo.lock | 74 ++++++++++++++--------------- clash_lib/Cargo.toml | 6 +-- clash_lib/src/app/logging.rs | 9 ++-- clash_lib/src/proxy/wg/device.rs | 2 +- clash_lib/src/proxy/wg/wireguard.rs | 8 +--- 5 files changed, 46 insertions(+), 53 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 18a9a0594..2b97012c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -789,9 +789,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "c2rust-bitfields" @@ -1096,7 +1096,7 @@ dependencies = [ "sha2", "shadowsocks", "smoltcp", - "socket2 0.5.7", + "socket2 0.5.8", "tempfile", "thiserror 2.0.3", "tokio", @@ -2807,7 +2807,7 @@ dependencies = [ "http-body", "hyper", "pin-project-lite", - "socket2 0.5.7", + "socket2 0.5.8", "tokio", "tower-service", "tracing", @@ -3138,7 +3138,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f" dependencies = [ - "socket2 0.5.7", + "socket2 0.5.8", "widestring", "windows-sys 0.48.0", "winreg", @@ -3267,9 +3267,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.164" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libloading" @@ -3278,7 +3278,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets 0.48.5", ] [[package]] @@ -3795,16 +3795,16 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "opentelemetry" -version = "0.27.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3cebff57f7dbd1255b44d8bddc2cebeb0ea677dbaa2e25a3070a91b318f660" +checksum = "ab70038c28ed37b97d8ed414b6429d343a8bbf44c9f79ec854f3a643029ba6d7" dependencies = [ "futures-core", "futures-sink", "js-sys", - "once_cell", "pin-project-lite", "thiserror 1.0.69", + "tracing", ] [[package]] @@ -3855,16 +3855,15 @@ checksum = "bc1b6902ff63b32ef6c489e8048c5e253e2e4a803ea3ea7e783914536eb15c52" [[package]] name = "opentelemetry_sdk" -version = "0.27.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27b742c1cae4693792cc564e58d75a2a0ba29421a34a85b50da92efa89ecb2bc" +checksum = "231e9d6ceef9b0b2546ddf52335785ce41252bc7474ee8ba05bfad277be13ab8" dependencies = [ "async-trait", "futures-channel", "futures-executor", "futures-util", "glob", - "once_cell", "opentelemetry", "percent-encoding", "rand", @@ -4398,7 +4397,7 @@ dependencies = [ "quinn-udp", "rustc-hash 2.0.0", "rustls", - "socket2 0.5.7", + "socket2 0.5.8", "thiserror 2.0.3", "tokio", "tracing", @@ -4432,7 +4431,7 @@ checksum = "4fe68c2e9e1a1234e218683dbdf9f9dfcb094113c5ac2b938dfcb9bab4c4140b" dependencies = [ "libc", "once_cell", - "socket2 0.5.7", + "socket2 0.5.8", "tracing", "windows-sys 0.59.0", ] @@ -5134,7 +5133,7 @@ dependencies = [ "serde_json", "serde_urlencoded", "shadowsocks-crypto", - "socket2 0.5.7", + "socket2 0.5.8", "spin 0.9.8", "thiserror 1.0.69", "tokio", @@ -5256,9 +5255,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "smoltcp" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a1a996951e50b5971a2c8c0fa05a381480d70a933064245c4a223ddc87ccc97" +checksum = "dad095989c1533c1c266d9b1e8d70a1329dd3723c3edac6d03bbd67e7bf6f4bb" dependencies = [ "bitflags 1.3.2", "byteorder", @@ -5281,9 +5280,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -5612,7 +5611,7 @@ dependencies = [ "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.7", + "socket2 0.5.8", "tokio-macros", "tracing", "windows-sys 0.52.0", @@ -5675,7 +5674,7 @@ dependencies = [ "log", "once_cell", "pin-project", - "socket2 0.5.7", + "socket2 0.5.8", "tokio", "windows-sys 0.52.0", ] @@ -5761,7 +5760,7 @@ dependencies = [ "percent-encoding", "pin-project", "prost", - "socket2 0.5.7", + "socket2 0.5.8", "tokio", "tokio-stream", "tower 0.4.13", @@ -6739,9 +6738,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -6763,9 +6762,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -6774,9 +6773,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -6827,9 +6826,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -6913,8 +6912,8 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tuic" -version = "1.3.4" -source = "git+https://github.com/Itsusinn/tuic.git?tag=v1.3.4#333f80df681ed2f8ecc1d8b18efe585c148fc77c" +version = "1.3.5" +source = "git+https://github.com/Itsusinn/tuic.git?tag=v1.3.5#2bb3ba7990bb0a60913c17c5ae1c1c3d79510efa" dependencies = [ "bytes", "futures-util", @@ -6926,13 +6925,14 @@ dependencies = [ [[package]] name = "tuic-quinn" -version = "1.3.4" -source = "git+https://github.com/Itsusinn/tuic.git?tag=v1.3.4#333f80df681ed2f8ecc1d8b18efe585c148fc77c" +version = "1.3.5" +source = "git+https://github.com/Itsusinn/tuic.git?tag=v1.3.5#2bb3ba7990bb0a60913c17c5ae1c1c3d79510efa" dependencies = [ "bytes", "futures-util", "quinn", "thiserror 1.0.69", + "tracing", "tuic", "uuid", ] @@ -7370,7 +7370,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.48.0", ] [[package]] diff --git a/clash_lib/Cargo.toml b/clash_lib/Cargo.toml index 844d7ba1e..96cc2a451 100644 --- a/clash_lib/Cargo.toml +++ b/clash_lib/Cargo.toml @@ -90,7 +90,7 @@ tun = { git = "https://github.com/Watfaq/rust-tun.git", rev = "8f7568190f1200d3e netstack-lwip = { git = "https://github.com/Watfaq/netstack-lwip.git", rev = "2817bf82740e04bbee6b7bf1165f55657a6ed163" } boringtun = { version = "0.6", git = "https://github.com/cloudflare/boringtun.git", rev = "f672bb6c1e1e371240a8d151f15854687eb740bb" } -smoltcp = { version = "0.11", default-features = false, features = ["std", "log", "medium-ip", "proto-ipv4", "proto-ipv6", "socket-udp", "socket-tcp"] } +smoltcp = { version = "0.12", default-features = false, features = ["std", "log", "medium-ip", "proto-ipv4", "proto-ipv6", "socket-udp", "socket-tcp"] } serde = { version = "1", features=["derive"] } serde_yaml = "0.9" @@ -120,8 +120,8 @@ arti-client = { version = "0.24", optional = true, default-features = false, fea tor-rtcompat = { version = "0.24", optional = true, default-features = false } # tuic -tuic = { tag = "v1.3.4", optional = true, git = "https://github.com/Itsusinn/tuic.git" } -tuic-quinn = { tag = "v1.3.4", optional = true, git = "https://github.com/Itsusinn/tuic.git" } +tuic = { tag = "v1.3.5", optional = true, git = "https://github.com/Itsusinn/tuic.git" } +tuic-quinn = { tag = "v1.3.5", optional = true, git = "https://github.com/Itsusinn/tuic.git" } register-count = { version = "0.1", optional = true } quinn = { version = "0.11", default-features = false, features = ["futures-io", "runtime-tokio", "rustls"] } diff --git a/clash_lib/src/app/logging.rs b/clash_lib/src/app/logging.rs index fbf3572da..02c422d61 100644 --- a/clash_lib/src/app/logging.rs +++ b/clash_lib/src/app/logging.rs @@ -7,10 +7,7 @@ use opentelemetry::{ KeyValue, }; use opentelemetry_otlp::SpanExporter; -use opentelemetry_sdk::{ - trace::{Config, TracerProvider}, - Resource, -}; +use opentelemetry_sdk::{trace::TracerProvider, Resource}; use opentelemetry_semantic_conventions::{ resource::{DEPLOYMENT_ENVIRONMENT_NAME, SERVICE_NAME, SERVICE_VERSION}, SCHEMA_URL, @@ -105,7 +102,7 @@ pub fn setup_logging( let exporter = SpanExporter::builder().with_tonic().build()?; let provider = TracerProvider::builder() - .with_config(Config::default().with_resource(Resource::from_schema_url( + .with_resource(Resource::from_schema_url( [ KeyValue::new(SERVICE_NAME, env!("CARGO_PKG_NAME")), KeyValue::new(SERVICE_VERSION, env!("CARGO_PKG_VERSION")), @@ -115,7 +112,7 @@ pub fn setup_logging( ), ], SCHEMA_URL, - ))) + )) .with_batch_exporter(exporter, opentelemetry_sdk::runtime::Tokio) .build(); diff --git a/clash_lib/src/proxy/wg/device.rs b/clash_lib/src/proxy/wg/device.rs index 3e401c71f..a604a0f24 100644 --- a/clash_lib/src/proxy/wg/device.rs +++ b/clash_lib/src/proxy/wg/device.rs @@ -736,7 +736,7 @@ pub struct RxToken { impl smoltcp::phy::RxToken for RxToken { fn consume(mut self, f: F) -> R where - F: FnOnce(&mut [u8]) -> R, + F: FnOnce(&[u8]) -> R, { f(&mut self.buffer) } diff --git a/clash_lib/src/proxy/wg/wireguard.rs b/clash_lib/src/proxy/wg/wireguard.rs index ec4277c6d..c77497ea7 100644 --- a/clash_lib/src/proxy/wg/wireguard.rs +++ b/clash_lib/src/proxy/wg/wireguard.rs @@ -380,9 +380,7 @@ impl WireguardTunnel { match IpVersion::of_packet(packet) { Ok(IpVersion::Ipv4) => Ipv4Packet::new_checked(&packet) .ok() - .filter(|packet| { - Ipv4Addr::from(packet.dst_addr()) == self.source_peer_ip - }) + .filter(|packet| packet.dst_addr() == self.source_peer_ip) .and_then(|packet| { match packet.next_header() { IpProtocol::Tcp => Some(PortProtocol::Tcp), @@ -394,9 +392,7 @@ impl WireguardTunnel { }), Ok(IpVersion::Ipv6) => Ipv6Packet::new_checked(&packet) .ok() - .filter(|packet| { - Some(Ipv6Addr::from(packet.dst_addr())) == self.source_peer_ipv6 - }) + .filter(|packet| Some(packet.dst_addr()) == self.source_peer_ipv6) .and_then(|packet| { match packet.next_header() { IpProtocol::Tcp => Some(PortProtocol::Tcp),