Skip to content

Commit 4abe790

Browse files
committed
upgrade crates
1 parent 9d26e6b commit 4abe790

File tree

8 files changed

+130
-215
lines changed

8 files changed

+130
-215
lines changed

Cargo.lock

+67-153
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mio = { version = "1.0", features = ["net", "os-poll"] }
1212
log = "0.4"
1313
chrono = "0.4"
1414
libc = "0.2"
15-
rustls = { version = "0.23", features = ["ring"] }
15+
rustls = { version = "0.23", default-features = false, features = ["ring"] }
1616
sha2 = "0.10"
1717
bytes = "1.6"
1818
dns-lookup = "2.0"
@@ -40,17 +40,17 @@ notify = "6.1"
4040
ringbuf = "0.4"
4141
httparse = "1.9"
4242
async_smoltcp = { path = "async_smoltcp" }
43-
tokio-rustls = "0.26"
43+
tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "tls12"] }
4444
rustls-pki-types = "1.7"
4545
futures = "0.3"
4646

4747
[dev-dependencies]
4848
env_logger = "0.11"
4949

5050
[target.'cfg(windows)'.dependencies]
51-
wintun = "0.4"
51+
wintun = "0.5"
5252
wintool = { path = "wintool" }
53-
winapi = { version = "0.3", features = ["netioapi", "impl-debug", "impl-default", "combaseapi", "ipifcons"] }
53+
winapi = { version = "0.3", features = ["netioapi", "impl-debug", "impl-default", "combaseapi", "ipifcons", "consoleapi"] }
5454

5555
[target.'cfg(not(windows))'.dependencies]
5656
backtrace-on-stack-overflow = "0.3"

async_smoltcp/Cargo.lock

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

async_smoltcp/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77

88
[dependencies]
99
smoltcp = { version = "0.11", features = [] }
10-
bytes = "1.5"
11-
tokio = { version = "1.35", features = [] }
10+
bytes = "1.6"
11+
tokio = { version = "1.39", features = [] }
1212
tokio-util = "0.7"
1313
log = "0.4"

mobile/src-tauri/Cargo.lock

+23-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mobile2/backend/Cargo.lock

+23-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/aproxy/mod.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ use std::{
33
sync::{Arc, atomic::AtomicBool},
44
};
55

6-
use ipset::types::AddOption;
76
use rustls::{
87
client::danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier},
98
ClientConfig,
@@ -172,10 +171,10 @@ async fn wait_until_stop(running: Arc<AtomicBool>, ip: IpAddr) {
172171
.unwrap()
173172
.lock()
174173
.await;
175-
match proxy_data
176-
.no_bypass_session
177-
.add(ip, vec![AddOption::Timeout(timeout as u32 + 5)])
178-
{
174+
match proxy_data.no_bypass_session.add(
175+
ip,
176+
vec![ipset::types::AddOption::Timeout(timeout as u32 + 5)],
177+
) {
179178
Ok(ret) => {
180179
if !ret {
181180
log::error!("add ip:{} to ipset failed", ip);

src/aserver/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::{
22
net::{IpAddr, SocketAddr},
33
sync::{
4-
atomic::{AtomicU32, Ordering},
54
Arc,
5+
atomic::{AtomicU32, Ordering},
66
},
77
time::{Duration, Instant},
88
};
@@ -25,7 +25,7 @@ use crate::{
2525
udp::start_udp,
2626
},
2727
config::OPTIONS,
28-
proto::{RequestParseResult, Sock5Address, TrojanRequest, CONNECT, PING, UDP_ASSOCIATE},
28+
proto::{CONNECT, PING, RequestParseResult, Sock5Address, TrojanRequest, UDP_ASSOCIATE},
2929
server::{init_config, ping_backend::PingResult},
3030
types::{Result, TrojanError},
3131
};
@@ -60,7 +60,7 @@ async fn async_run() -> Result<()> {
6060
log::error!(
6161
"connection count:{}, active task count:{}",
6262
task_count.load(Ordering::Relaxed),
63-
Handle::current().metrics().active_tasks_count()
63+
Handle::current().metrics().num_alive_tasks()
6464
);
6565
}
6666
}

0 commit comments

Comments
 (0)