Skip to content

Commit

Permalink
upgrade crates
Browse files Browse the repository at this point in the history
  • Loading branch information
lazytiger committed Jul 31, 2024
1 parent 9d26e6b commit 4abe790
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 215 deletions.
220 changes: 67 additions & 153 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ mio = { version = "1.0", features = ["net", "os-poll"] }
log = "0.4"
chrono = "0.4"
libc = "0.2"
rustls = { version = "0.23", features = ["ring"] }
rustls = { version = "0.23", default-features = false, features = ["ring"] }
sha2 = "0.10"
bytes = "1.6"
dns-lookup = "2.0"
Expand Down Expand Up @@ -40,17 +40,17 @@ notify = "6.1"
ringbuf = "0.4"
httparse = "1.9"
async_smoltcp = { path = "async_smoltcp" }
tokio-rustls = "0.26"
tokio-rustls = { version = "0.26", default-features = false, features = ["logging", "tls12"] }
rustls-pki-types = "1.7"
futures = "0.3"

[dev-dependencies]
env_logger = "0.11"

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

[target.'cfg(not(windows))'.dependencies]
backtrace-on-stack-overflow = "0.3"
Expand Down
8 changes: 4 additions & 4 deletions async_smoltcp/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions async_smoltcp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ edition = "2021"

[dependencies]
smoltcp = { version = "0.11", features = [] }
bytes = "1.5"
tokio = { version = "1.35", features = [] }
bytes = "1.6"
tokio = { version = "1.39", features = [] }
tokio-util = "0.7"
log = "0.4"
45 changes: 23 additions & 22 deletions mobile/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 23 additions & 22 deletions mobile2/backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions src/aproxy/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use std::{
sync::{Arc, atomic::AtomicBool},
};

use ipset::types::AddOption;
use rustls::{
client::danger::{HandshakeSignatureValid, ServerCertVerified, ServerCertVerifier},
ClientConfig,
Expand Down Expand Up @@ -172,10 +171,10 @@ async fn wait_until_stop(running: Arc<AtomicBool>, ip: IpAddr) {
.unwrap()
.lock()
.await;
match proxy_data
.no_bypass_session
.add(ip, vec![AddOption::Timeout(timeout as u32 + 5)])
{
match proxy_data.no_bypass_session.add(
ip,
vec![ipset::types::AddOption::Timeout(timeout as u32 + 5)],
) {
Ok(ret) => {
if !ret {
log::error!("add ip:{} to ipset failed", ip);
Expand Down
6 changes: 3 additions & 3 deletions src/aserver/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::{
net::{IpAddr, SocketAddr},
sync::{
atomic::{AtomicU32, Ordering},
Arc,
atomic::{AtomicU32, Ordering},
},
time::{Duration, Instant},
};
Expand All @@ -25,7 +25,7 @@ use crate::{
udp::start_udp,
},
config::OPTIONS,
proto::{RequestParseResult, Sock5Address, TrojanRequest, CONNECT, PING, UDP_ASSOCIATE},
proto::{CONNECT, PING, RequestParseResult, Sock5Address, TrojanRequest, UDP_ASSOCIATE},
server::{init_config, ping_backend::PingResult},
types::{Result, TrojanError},
};
Expand Down Expand Up @@ -60,7 +60,7 @@ async fn async_run() -> Result<()> {
log::error!(
"connection count:{}, active task count:{}",
task_count.load(Ordering::Relaxed),
Handle::current().metrics().active_tasks_count()
Handle::current().metrics().num_alive_tasks()
);
}
}
Expand Down

0 comments on commit 4abe790

Please sign in to comment.