Module server
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_services.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§
- TlsAcceptor
Data - Internal data used as configuration/input for the
super::TlsAcceptorService
. - TlsAcceptor
Data Builder TlsAcceptorDataBuilder
can be used to constructrustls::ServerConfig
for most common use cases in Rama.- TlsAcceptor
Layer - A
Layer
which wraps the given service with aTlsAcceptorService
. - TlsAcceptor
Service - A
Service
which accepts TLS connections and delegates the underlying transport stream to the given service.