pub struct ServerArgs {
pub listen: String,
pub tun_name: Option<String>,
pub key_file: Option<String>,
pub config: Option<String>,
pub clients_db: String,
pub add_client: Option<String>,
pub remove_client: Option<String>,
pub list_clients: bool,
pub show_client: Option<String>,
pub server_ip: Option<String>,
pub per_ip_pps_limit: u64,
pub mask_dir: Option<String>,
}Expand description
AIVPN Server - Censorship-resistant VPN gateway
Fields§
§listen: StringListen address
tun_name: Option<String>TUN device name (random if not specified — avoids fingerprinting)
key_file: Option<String>Path to 32-byte server private key file
config: Option<String>Config file path
clients_db: StringPath to clients database file
add_client: Option<String>Add a new client with the given name and print config
remove_client: Option<String>Remove a client by ID
list_clients: boolList all registered clients with stats
show_client: Option<String>Show client config by ID (for QR / import)
server_ip: Option<String>Public IP of this server (embedded into connection keys). Required when using –add-client or –show-client to generate connection keys.
per_ip_pps_limit: u64Per-IP packet rate limit for incoming UDP traffic.
mask_dir: Option<String>Directory for mask file storage. Resolved in order: CLI flag → env AIVPN_MASK_DIR → server.json “mask_dir” → default.
Trait Implementations§
Source§impl Args for ServerArgs
impl Args for ServerArgs
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for ServerArgs
impl CommandFactory for ServerArgs
Source§impl Debug for ServerArgs
impl Debug for ServerArgs
Source§impl FromArgMatches for ServerArgs
impl FromArgMatches for ServerArgs
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
Assign values from
ArgMatches to self.Source§impl Parser for ServerArgs
impl Parser for ServerArgs
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on error.
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for ServerArgs
impl RefUnwindSafe for ServerArgs
impl Send for ServerArgs
impl Sync for ServerArgs
impl Unpin for ServerArgs
impl UnsafeUnpin for ServerArgs
impl UnwindSafe for ServerArgs
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more