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,
pub authentication_hook_server: Option<String>,
}
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. If multiple bindings specify port
zero, the server will attempt to bind the same port to each interface.
If it cannot, it will allow all the ports to be different.
Can be specified more than once.
E.g. --bind 127.0.0.1:0 --bind [::1]:0 --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: i32
Limit client connections.
disable_rate_limiting: bool
If set, rate-limiting will be disabled on the server, and clients will be informed they have an 8gbps rate limit.
limit_ip_kbps: i32
Rate 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: i32
Allow 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: i32
How 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.
authentication_hook_server: Option<String>
The authentication “Hook Server” as defined by https://github.com/holochain/sbd/blob/main/spec-auth.md
Trait Implementations§
Source§impl Args for Config
impl Args for Config
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
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§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
.