mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-23 01:20:52 +00:00
Add file descriptor support
This commit is contained in:
parent
9437308283
commit
500f6ef21f
5 changed files with 31 additions and 10 deletions
|
@ -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(())
|
||||
})() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue