Skip to main content

Module full_https_transport

Module full_https_transport 

Source
Expand description

§Production HTTPS transport

The server-binding half of the transport stack. Wraps [hashiverse_lib::transport::partial_https_transport::PartialHttpsTransportFactory] (which supplies the client-side outbound rpc() and the bootstrap lookup) and adds everything needed to accept inbound TLS connections:

  • a TcpListener acquired lazily so the factory can live inside Arc before the port is actually bound,
  • a rustls TlsAcceptor driven by crate::transport::https_transport_cert_refresher::HttpsTransportCertRefresher so certificates roll over without downtime,
  • a Semaphore capping concurrent connections at [hashiverse_lib::tools::config::HTTPS_SERVER_TRANSPORT_MAX_CONNECTIONS] so a connection-exhaustion attack can’t starve the OS of file descriptors,
  • handshake / header-read / body-read timeouts for Slow Loris defence (values in [hashiverse_lib::tools::config]).

Per-connection state flows through [hashiverse_lib::transport::ddos::ddos::DdosConnectionGuard]s so per-IP accounting happens automatically without each handler needing to remember it.

Structs§

FullHttpsTransportFactory
Full HTTPS transport factory for server use.
FullHttpsTransportServer