Struct sbd_server::Config
source · pub struct Config {
pub cert_pem_file: Option<PathBuf>,
pub priv_key_pem_file: Option<PathBuf>,
pub bind: Vec<String>,
pub trusted_ip_header: Option<String>,
pub limit_clients: i32,
pub disable_rate_limiting: bool,
pub limit_ip_kbps: i32,
pub limit_ip_byte_burst: i32,
pub limit_idle_millis: i32,
}Expand description
Configure and execute an SBD server.
Fields§
§cert_pem_file: Option<PathBuf>TLS certificate path (pem).
If specified, --priv-key-pem-file must also be specified.
It is recommended to run acme service on port 80 and only
bind SBD to port 443.
priv_key_pem_file: Option<PathBuf>TLS private key path (pem).
If specified, --cert-pem-file must also be specified.
It is recommended to run acme service on port 80 and only
bind SBD to port 443.
bind: Vec<String>Bind to this interface and port.
Can be specified more than once.
E.g. --bind 0.0.0.0:0
E.g. --bind [::]:0
E.g. --bind 192.168.0.10:443
trusted_ip_header: Option<String>Use this http header to determine IP address instead of the raw TCP connection details.
limit_clients: i32Limit client connections.
disable_rate_limiting: boolIf set, rate-limiting will be disabled on the server, and clients will be informed they have an 8gbps rate limit.
limit_ip_kbps: i32Rate limit connections to this kilobits per second. The default value of 1000 obviously limits connections to 1 mbps. If the default of 32768 connections were all sending this amount at the same time, the server would need a ~33 gbps connection. The rate limit passed to clients will be divided by the number of open connections for a given ip address.
limit_ip_byte_burst: i32Allow IPs to burst by this byte count. If the max message size is 16K, this value must be at least 16K. The default value provides 16 * 16K to allow for multiple connections from a single ip address sending full messages at the same time.
limit_idle_millis: i32How long in milliseconds connections can remain idle before being closed. Clients must send either a message or a keepalive before this time expires to keep the connection alive.
Trait Implementations§
source§impl CommandFactory for Config
impl CommandFactory for Config
source§impl FromArgMatches for Config
impl FromArgMatches for Config
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.