diff --git a/Cargo.toml b/Cargo.toml index f8b1d26..08f0d37 100755 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,6 +28,7 @@ structopt = "0.3.26" tokio = { version = "1.38.0", features = ["full"] } tokio-util = "0.7.11" tracing = "0.1.40" +myactor = { git = "https://gitea.s5s8.com/rust/actor-rs.git" } # rolling-file = { path = "../rolling-file" } [target.'cfg(unix)'.dependencies] diff --git a/src/bin/punchnet/main.rs b/src/bin/punchnet/main.rs index 995128e..1055941 100755 --- a/src/bin/punchnet/main.rs +++ b/src/bin/punchnet/main.rs @@ -1,6 +1,5 @@ use punchnet::get_base_dir; use punchnet::get_edge; -use punchnet::get_my_networks; use punchnet::mod_hostname; use punchnet::restore_dns; use punchnet::run_sdlan; @@ -9,11 +8,9 @@ use punchnet::CommandLine; use punchnet::CommandLineInput; use sdlan_sn_rs::log; -use sdlan_sn_rs::utils::gen_uuid_u64; use tracing::error; use std::net::ToSocketAddrs; -use std::time::Duration; use structopt::StructOpt; #[tokio::main] diff --git a/src/utils/pid_recorder.rs b/src/utils/pid_recorder.rs index 16e9de7..71616c3 100755 --- a/src/utils/pid_recorder.rs +++ b/src/utils/pid_recorder.rs @@ -7,6 +7,7 @@ use tracing::{error}; #[allow(unused)] pub struct PidRecorder(String); +#[allow(unused)] impl PidRecorder { pub fn new(pidfile: &str) -> Self { let pid = std::process::id(); diff --git a/src/utils/socks.rs b/src/utils/socks.rs index 1297736..840f754 100755 --- a/src/utils/socks.rs +++ b/src/utils/socks.rs @@ -78,7 +78,7 @@ impl Socket { } } if tos != 0 { - if let Err(e) = udp.set_tos(tos) { + if let Err(e) = udp.set_tos_v4(tos) { error!("failed to set tos: {}", e.to_string()); } }