Reverse-initiated, multiplexed services over QUIC.
quic-reverse is a library that enables servers to initiate streams back to clients
over an existing QUIC connection. This is useful for scenarios where:
- Clients are behind NAT and cannot accept incoming connections
- Edge devices need to expose services to a central server
- Reverse tunneling is required without opening inbound ports
Architecture
The library sits atop an existing QUIC connection and adds:
- An explicit control plane for stream lifecycle management
- Reverse-initiated stream semantics
- Service multiplexing via service identifiers
- Well-defined negotiation, backpressure, and error handling
Example
use quic_reverse::{Session, Config, Role};
// Wrap an existing QUIC connection
let session = Session::new(connection, Role::Client, Config::default());
// Start the session (performs negotiation)
let mut handle = session.start().await?;
// Open a reverse stream to a service
let (send, recv) = handle.open("ssh", Metadata::Empty).await?;