|
|
|
@ -1,4 +1,3 @@ |
|
|
|
use tun::DEFAULT_MTU as MTU; |
|
|
|
use tun2proxy::{Args, BoxError}; |
|
|
|
|
|
|
|
fn main() -> Result<(), BoxError> { |
|
|
|
@ -50,7 +49,7 @@ async fn main_async(args: Args) -> Result<(), BoxError> { |
|
|
|
} |
|
|
|
unsafe { tun2proxy::tun2proxy_set_traffic_status_callback(1, Some(traffic_cb), std::ptr::null_mut()) }; |
|
|
|
|
|
|
|
if let Err(err) = tun2proxy::general_run_async(args, MTU, false, shutdown_token).await { |
|
|
|
if let Err(err) = tun2proxy::general_run_async(args, tun::DEFAULT_MTU, cfg!(target_os = "macos"), shutdown_token).await { |
|
|
|
log::error!("main loop error: {}", err); |
|
|
|
} |
|
|
|
} |
|
|
|
|