Crate quic_reverse

Crate quic_reverse 

Source
Expand description

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?;

Structs§

Config
Configuration for a quic-reverse session.
Features
Feature flags negotiated during Hello/HelloAck exchange.
NegotiatedParams
Result of successful negotiation.
OpenFlags
Flags for OpenRequest messages.
QuinnConnection
Wrapper around a Quinn connection implementing the Connection trait.
QuinnRecvStream
Wrapper around a Quinn receive stream implementing the RecvStream trait.
QuinnSendStream
Wrapper around a Quinn send stream implementing the SendStream trait.
ServiceId
Identifies a logical service for multiplexing.
Session
A quic-reverse session over a QUIC connection.
SessionClient
A high-level, cloneable client for quic-reverse sessions.
SessionHandle
Active session handle with control stream access.
StreamBind
Stream binding frame sent on data streams.

Enums§

ClientEvent
Events delivered to the event handler callback.
CloseCode
Close codes for StreamClose messages.
ControlEvent
Events that can occur on the control stream.
Error
Errors that can occur during session operations.
Metadata
Metadata attached to stream open requests.
RejectCode
Reason codes for rejecting an OpenRequest.
Role
Role in a quic-reverse session.
State
Session lifecycle state.

Traits§

Connection
Abstraction over a QUIC connection.
RecvStream
Abstraction over a QUIC receive stream.
SendStream
Abstraction over a QUIC send stream.