pub(crate) struct Args {
pub(crate) port: u16,
pub(crate) shares: Vec<String>,
pub(crate) users: Vec<String>,
pub(crate) log_filter: String,
pub(crate) metrics_bind: Option<SocketAddr>,
pub(crate) require_signing: bool,
pub(crate) encrypt: bool,
pub(crate) encrypt_shares: Vec<String>,
pub(crate) compress_shares: Vec<String>,
pub(crate) ca_shares: Vec<String>,
pub(crate) handle_store: String,
pub(crate) handle_store_path: String,
}Expand description
Command-line interface.
Fields§
§port: u16TCP port to listen on (direct hosting on 445 by tradition).
Publish a share: NAME=PATH (repeatable; defaults to public=$PWD).
users: Vec<String>Add an account USER:PASSWORD (repeatable; empty DB maps all users to guest).
log_filter: StringLog filter (tracing EnvFilter syntax); RUST_LOG overrides this value.
metrics_bind: Option<SocketAddr>Serve Prometheus metrics at http://ADDR/metrics (e.g. 127.0.0.1:9449).
require_signing: boolReject clients that do not sign their traffic.
encrypt: boolSeal authenticated sessions that offer an encryption cipher (SMB2_SESSION_FLAG_ENCRYPT_DATA).
Mark a share as requiring SMB3 encryption by NAME (repeatable). Its TREE_CONNECT response sets SMB2_SHAREFLAG_ENCRYPT_DATA and all traffic on the tree is sealed.
Advertise SMB2_SHAREFLAG_COMPRESS_DATA on a share by NAME (repeatable): its TREE_CONNECT response signals the client may compress traffic.
Mark a share as continuously available by NAME (repeatable): its TREE_CONNECT response advertises SMB2_SHAREFLAG_CONTINUOUSLY_AVAILABLE and it may grant persistent handles ([MS-SMB2] §3.3.5.9.11).
handle_store: StringDurable-handle store backend: mem (non-durable) or redb (survives
a server restart, enabling persistent-handle reclaim).
handle_store_path: StringPath for the redb handle-store database.
Trait Implementations§
Source§impl Args for Args
impl Args for Args
Source§fn group_id() -> Option<Id>
fn group_id() -> Option<Id>
ArgGroup::id][crate::ArgGroup::id] for this set of argumentsSource§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
Command] so it can instantiate self via
[FromArgMatches::update_from_arg_matches_mut] Read moreSource§impl FromArgMatches for Args
impl FromArgMatches for Args
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>
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>
ArgMatches to self.