pub struct ServerConfig {
    pub transport: Arc<TransportConfig>,
    pub crypto: Arc<dyn ServerConfig>,
    /* private fields */
}
Expand description

Parameters governing incoming connections

Default values should be suitable for most internet applications.

Fields

transport: Arc<TransportConfig>

Transport configuration to use for incoming connections

crypto: Arc<dyn ServerConfig>

TLS configuration used for incoming connections.

Must be set to use TLS 1.3 only.

Implementations

Create a default config with a particular handshake token key

Private key used to authenticate data included in handshake tokens.

Whether to require clients to prove ownership of an address before committing resources.

Introduces an additional round-trip to the handshake to make denial of service attacks more difficult.

Duration after a stateless retry token was issued for which it’s considered valid.

Maximum number of simultaneous connections to accept.

New incoming connections are only accepted if the total number of incoming or outgoing connections is less than this. Outgoing connections are unaffected.

Whether to allow clients to migrate to new addresses

Improves behavior for clients that move between different internet connections or suffer NAT rebinding. Enabled by default.

Create a server config with the given certificate chain to be presented to clients

Uses a randomized handshake token key.

Create a server config with the given rustls::ServerConfig

Uses a randomized handshake token key.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more