mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-04-21 22:39:08 +00:00
refine code
This commit is contained in:
parent
c6f9610eb3
commit
9b27dd2df2
1 changed files with 0 additions and 6 deletions
|
@ -128,14 +128,8 @@ fn main() -> ExitCode {
|
||||||
let block = || -> Result<(), Error> {
|
let block = || -> Result<(), Error> {
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
if options.setup {
|
if options.setup {
|
||||||
let bypass_tun_ip = match args.bypass {
|
|
||||||
Some(addr) => addr,
|
|
||||||
None => args.proxy.addr.ip(),
|
|
||||||
};
|
|
||||||
let mut setup = Setup::new(&args.tun, &bypass_tun_ip, get_default_cidrs(), args.bypass.is_some());
|
let mut setup = Setup::new(&args.tun, &bypass_tun_ip, get_default_cidrs(), args.bypass.is_some());
|
||||||
|
|
||||||
setup.configure()?;
|
setup.configure()?;
|
||||||
|
|
||||||
setup.drop_privileges()?;
|
setup.drop_privileges()?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue