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§
- Rustls
TlsStream - A wrapper around an underlying raw stream which implements the TLS or SSL protocol.
- TlsAcceptor
Data - Internal data used as configuration/input for the
super::TlsAcceptorService. - TlsAcceptor
Data Builder TlsAcceptorDataBuildercan be used to constructrustls::ServerConfigfor most common use cases in Rama.- TlsAcceptor
Layer - A
Layerwhich wraps the given service with aTlsAcceptorService. - TlsAcceptor
Service - A
Servicewhich accepts TLS connections and delegates the underlying transport stream to the given service. - TlsStream