Skip to main content

Module server

Module server 

Available on crate feature rustls only.
Expand description

TLS server support for Rama.

This module provides a TlsAcceptorLayer to accept TLS connections and a TlsAcceptorService to handle them.

§Examples

See the Examples Directory:

  • /examples/tls_rustls_termination.rs: Spawns a mini handmade http server, as well as a TLS termination proxy, forwarding the plain text stream to the first.
  • /examples/mtls_tunnel_and_service.rs: Example of how to do mTls (manual Tls, where the client also needs a certificate) using rama, as well as how one might use this concept to provide a tunnel service build with these concepts;

Structs§

ModifyRustlsServerConfig
Escape hatch: take over the final rustls ServerConfig build.
RustlsDynamicConfig
A DynamicConfigProvider piece: resolves a full rustls config per ClientHello
RustlsTlsAcceptorConfig
Gather all config pieces support by rustls
RustlsTlsStream
A wrapper around an underlying raw stream which implements the TLS or SSL protocol.
TlsAcceptorData
Internal data used as configuration/input for the super::TlsAcceptorService.
TlsAcceptorLayer
A Layer which wraps the given service with a TlsAcceptorService.
TlsAcceptorService
A Service which accepts TLS connections and delegates the underlying transport stream to the given service.
TlsStream

Traits§

DynamicConfigProvider
RustlsServerConfigExt
Rustls-specific setters.

Functions§

self_signed_server_authboring
Generate a self-signed server certificate (leaf signed by a generated CA).