mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-14 05:52:48 +00:00
--exit-on-fatal-error option
This commit is contained in:
parent
fe32a65291
commit
c991006f4c
2 changed files with 11 additions and 0 deletions
|
@ -103,6 +103,10 @@ pub struct Args {
|
|||
/// Daemonize for unix family or run as Windows service
|
||||
#[arg(long)]
|
||||
pub daemonize: bool,
|
||||
|
||||
/// Exit immediately when fatal error occurs, useful for running as a service
|
||||
#[arg(long)]
|
||||
pub exit_on_fatal_error: bool,
|
||||
}
|
||||
|
||||
fn validate_tun(p: &str) -> Result<String> {
|
||||
|
@ -144,6 +148,7 @@ impl Default for Args {
|
|||
verbosity: ArgVerbosity::Info,
|
||||
virtual_dns_pool: IpCidr::from_str("198.18.0.0/15").unwrap(),
|
||||
daemonize: false,
|
||||
exit_on_fatal_error: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue