Skip to content

Commit

Permalink
fix build on other plats
Browse files Browse the repository at this point in the history
  • Loading branch information
ibigbug committed Oct 30, 2024
1 parent 23895a8 commit 9f4ea79
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions clash_lib/src/proxy/tun/routes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
10 changes: 9 additions & 1 deletion clash_lib/src/proxy/tun/routes/other.rs
Original file line number Diff line number Diff line change
@@ -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(())
}

0 comments on commit 9f4ea79

Please sign in to comment.