Add file descriptor support

This commit is contained in:
B. Blechschmidt 2023-04-10 23:24:53 +02:00
parent 9437308283
commit 500f6ef21f
5 changed files with 31 additions and 10 deletions

View file

@ -5,8 +5,8 @@ use std::net::IpAddr;
use std::process::ExitCode;
use tun2proxy::error::Error;
use tun2proxy::Options;
use tun2proxy::{main_entry, Proxy};
use tun2proxy::{NetworkInterface, Options};
#[cfg(target_os = "linux")]
use tun2proxy::setup::{get_default_cidrs, Setup};
@ -89,7 +89,8 @@ fn main() -> ExitCode {
}
}
main_entry(&args.tun, &args.proxy, options)?;
let interface = NetworkInterface::Named(args.tun);
main_entry(&interface, &args.proxy, options)?;
Ok(())
})() {