mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-23 01:20:52 +00:00
port to windows or macos (#61)
This commit is contained in:
parent
4b42413ab0
commit
bbb8d3b244
8 changed files with 69 additions and 12 deletions
|
@ -95,11 +95,15 @@ fn main() -> ExitCode {
|
|||
options = options.with_ipv6_enabled();
|
||||
}
|
||||
|
||||
#[allow(unused_assignments)]
|
||||
let interface = match args.tun_fd {
|
||||
None => NetworkInterface::Named(args.tun.clone()),
|
||||
Some(fd) => {
|
||||
Some(_fd) => {
|
||||
options = options.with_mtu(args.tun_mtu);
|
||||
NetworkInterface::Fd(fd)
|
||||
#[cfg(not(target_family = "unix"))]
|
||||
panic!("Not supported");
|
||||
#[cfg(target_family = "unix")]
|
||||
NetworkInterface::Fd(_fd)
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue