Skip to content

Commit

Permalink
Fix the dependency issue
Browse files Browse the repository at this point in the history
  • Loading branch information
SajjadPourali committed Mar 27, 2024
1 parent 84accb2 commit f932d57
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
14 changes: 6 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,20 @@ tokio = { version = "1.36", features = [
"time",
"io-util",
"macros",
"rt-multi-thread",
], default-features = false }
etherparse = { version = "0.14", default-features = false, features = ["std"] }
thiserror = { version = "1.0", default-features = false }
log = { version = "0.4", default-features = false}
rand = {version = "0.8.5", default-features = false, features = ["std","std_rng"] }
log = { version = "0.4", default-features = false }
rand = { version = "0.8.5", default-features = false, features = [
"std",
"std_rng",
] }

[dev-dependencies]
clap = { version = "4.5", features = ["derive"] }
env_logger = "0.11"
udp-stream = { version = "0.0", default-features = false }
tokio = { version = "1.36", features = [
"rt-multi-thread",
], default-features = false }


#tun2.rs example
Expand All @@ -52,6 +53,3 @@ incremental = false # Disable incremental compilation.
overflow-checks = false # Disable overflow checks.
strip = true # Automatically strip symbols from the binary.

[[example]]
name = "tun2"
required-features = ["log"]
2 changes: 1 addition & 1 deletion examples/tun_wintun.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct Args {
server_addr: SocketAddr,
}

#[tokio::main(flavor = "current_thread")]
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let args = Args::parse();

Expand Down
4 changes: 0 additions & 4 deletions src/stream/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,10 +531,6 @@ impl Drop for IpStackTcpStream {
task::block_in_place(move || {
Handle::current().block_on(async move {
_ = self.shutdown().await;
println!(
"Shudown done, Drop for IpStackTcpStream {:?}",
self.dst_addr
);
if let Ok(p) = self.create_rev_packet(NON, DROP_TTL, None, Vec::new()) {
_ = self.packet_sender.send(p);
}
Expand Down

0 comments on commit f932d57

Please sign in to comment.