Bump version 0.2.14

This commit is contained in:
ssrlive 2024-03-28 17:03:36 +08:00
parent eab795e61c
commit 4adc38c726
4 changed files with 12 additions and 4 deletions

View file

@ -12,7 +12,7 @@ pub async fn desktop_run_async(_: Args, _: tokio_util::sync::CancellationToken)
Ok(())
}
pub fn mobile_run(args: Args, tun_mtu: u16) -> c_int {
pub fn mobile_run(args: Args, tun_mtu: u16, _packet_information: bool) -> c_int {
let shutdown_token = tokio_util::sync::CancellationToken::new();
{
if let Ok(mut lock) = TUN_QUIT.lock() {
@ -41,6 +41,12 @@ pub fn mobile_run(args: Args, tun_mtu: u16) -> c_int {
config.tun_name(tun);
}
#[cfg(unix)]
config.platform_config(|config| {
#[allow(deprecated)]
config.packet_information(_packet_information);
});
let device = tun2::create_as_async(&config).map_err(std::io::Error::from)?;
let join_handle = tokio::spawn(crate::run(device, tun_mtu, args, shutdown_token));