minor changes

This commit is contained in:
ssrlive 2024-09-29 18:17:45 +08:00
parent 2396d769d2
commit c9b24a865c
4 changed files with 5 additions and 5 deletions

View file

@ -3,8 +3,8 @@ name = "tun2proxy"
version = "0.5.0" version = "0.5.0"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"
repository = "https://github.com/blechschmidt/tun2proxy" repository = "https://github.com/tun2proxy/tun2proxy"
homepage = "https://github.com/blechschmidt/tun2proxy" homepage = "https://github.com/tun2proxy/tun2proxy"
authors = ["B. Blechschmidt", "ssrlive"] authors = ["B. Blechschmidt", "ssrlive"]
description = "Tunnel interface to proxy" description = "Tunnel interface to proxy"
readme = "README.md" readme = "README.md"

View file

@ -129,7 +129,7 @@ pub async fn desktop_run_async(args: Args, shutdown_token: tokio_util::sync::Can
} }
// TproxyState implements the Drop trait to restore network configuration, // TproxyState implements the Drop trait to restore network configuration,
// so we we need to assign it to a variable, even if it is not used. // so we need to assign it to a variable, even if it is not used.
let mut _restore: Option<tproxy_config::TproxyState> = None; let mut _restore: Option<tproxy_config::TproxyState> = None;
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]

View file

@ -329,7 +329,7 @@ where
} }
IpStackStream::UnknownTransport(u) => { IpStackStream::UnknownTransport(u) => {
let len = u.payload().len(); let len = u.payload().len();
log::info!("#0 unhandled transport - Ip Protocol {:?}, length {}", u.ip_protocol(), len); log::info!("#0 unhandled transport - Ip Protocol 0x{:02X}, length {}", u.ip_protocol(), len);
continue; continue;
} }
IpStackStream::UnknownNetwork(pkt) => { IpStackStream::UnknownNetwork(pkt) => {

View file

@ -16,7 +16,7 @@ impl std::fmt::Display for IpProtocol {
IpProtocol::Tcp => write!(f, "TCP"), IpProtocol::Tcp => write!(f, "TCP"),
IpProtocol::Udp => write!(f, "UDP"), IpProtocol::Udp => write!(f, "UDP"),
IpProtocol::Icmp => write!(f, "ICMP"), IpProtocol::Icmp => write!(f, "ICMP"),
IpProtocol::Other(v) => write!(f, "Other({})", v), IpProtocol::Other(v) => write!(f, "Other(0x{:02X})", v),
} }
} }
} }