mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-14 05:52:48 +00:00
Merge branch 'master' of https://github.com/sujiacong/tun2proxy
This commit is contained in:
commit
87c2b666ab
4 changed files with 40 additions and 13 deletions
10
src/args.rs
10
src/args.rs
|
@ -107,6 +107,14 @@ 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,
|
||||
|
||||
/// Maximum number of sessions to be handled concurrently
|
||||
#[arg(long, value_name = "number", default_value = "200")]
|
||||
pub max_sessions: usize,
|
||||
}
|
||||
|
||||
fn validate_tun(p: &str) -> Result<String> {
|
||||
|
@ -149,6 +157,8 @@ 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,
|
||||
max_sessions: 200,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue