Enable automated setup for private IP addresses

This commit is contained in:
B. Blechschmidt 2023-03-29 13:08:33 +02:00
parent e78a3f9a73
commit 3c79fa6071
2 changed files with 86 additions and 115 deletions

View file

@ -69,7 +69,12 @@ fn main() -> ExitCode {
Some(addr) => addr,
None => args.proxy.addr.ip(),
};
setup = Setup::new(&args.tun, &bypass_tun_ip, get_default_cidrs());
setup = Setup::new(
&args.tun,
&bypass_tun_ip,
get_default_cidrs(),
args.setup_ip.is_some(),
);
if let Err(e) = setup.setup() {
log::error!("{e}");
return ExitCode::FAILURE;