mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-06-21 00:20:53 +00:00
Make close_fd_on_drop configurable (#132)
This commit is contained in:
parent
15fe95a2c6
commit
635c7e557f
3 changed files with 31 additions and 2 deletions
|
@ -33,6 +33,9 @@ pub fn mobile_run(args: Args, tun_mtu: u16, _packet_information: bool) -> c_int
|
|||
#[cfg(unix)]
|
||||
if let Some(fd) = args.tun_fd {
|
||||
config.raw_fd(fd);
|
||||
if let Some(v) = args.close_fd_on_drop {
|
||||
config.close_fd_on_drop(v);
|
||||
};
|
||||
} else if let Some(ref tun) = args.tun {
|
||||
config.tun_name(tun);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue