mirror of
https://github.com/tun2proxy/tun2proxy.git
synced 2025-05-14 05:52:48 +00:00
--max-sessions option
This commit is contained in:
parent
b03032b8cd
commit
4ef71a5b4c
2 changed files with 12 additions and 6 deletions
|
@ -107,6 +107,10 @@ pub struct Args {
|
|||
/// 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 +153,7 @@ impl Default for Args {
|
|||
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