diff --git a/clash_lib/src/proxy/tun/routes/mod.rs b/clash_lib/src/proxy/tun/routes/mod.rs index 6ab32c20a..10a15af78 100644 --- a/clash_lib/src/proxy/tun/routes/mod.rs +++ b/clash_lib/src/proxy/tun/routes/mod.rs @@ -23,6 +23,8 @@ pub use linux::maybe_routes_clean_up; mod other; #[cfg(not(any(windows, target_os = "macos", target_os = "linux")))] use other::add_route; +#[cfg(not(any(windows, target_os = "macos", target_os = "linux")))] +pub use other::maybe_routes_clean_up; use tracing::warn; diff --git a/clash_lib/src/proxy/tun/routes/other.rs b/clash_lib/src/proxy/tun/routes/other.rs index 01bda4583..52ada4a57 100644 --- a/clash_lib/src/proxy/tun/routes/other.rs +++ b/clash_lib/src/proxy/tun/routes/other.rs @@ -1,9 +1,17 @@ use ipnet::IpNet; use tracing::warn; -use crate::proxy::utils::OutboundInterface; +use crate::{config::internal::config::TunConfig, proxy::utils::OutboundInterface}; pub fn add_route(_: &OutboundInterface, _: &IpNet) -> std::io::Result<()> { warn!("add_route is not implemented on {}", std::env::consts::OS); Ok(()) } + +pub fn maybe_routes_clean_up(_: &TunConfig) -> std::io::Result<()> { + warn!( + "maybe_routes_clean_up is not implemented on {}", + std::env::consts::OS + ); + Ok(()) +}