Documentation ¶
Overview ¶
Package quictun is an implementation of quictun. The package can be used to implement quictun clients and servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidResponse = errors.New("server returned an invalid response") ErrInvalidSequence = errors.New("client sequence number invalid") ErrNotAQuictunServer = errors.New("server does not seems to be a quictun server") ErrWrongCredentials = errors.New("authentication credentials seems to be wrong") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { // config ListenAddr string TunnelAddr string UserAgent string TlsCfg *tls.Config QuicConfig *quic.Config DialTimeout time.Duration // contains filtered or unexported fields }
Client holds the configuration and state of a quictun client
type SequenceCache ¶
type SequenceCache interface { Set(key uint64, value uint32) (old uint32) Get(key uint64) (value uint32) }
SequenceCache is a cache for client sequence numbers. Implementations should limit the number of cached key-value pairs using a strategy like least recently used (LRU).
type Server ¶
type Server struct { DialTimeout time.Duration SequenceCache SequenceCache }
Server is a quictun server which handles QUIC sessions upgraded to the quictun protocol.
func (*Server) CheckSequenceNumber ¶
CheckSequenceNumber checks and caches the sequence number sent by a client
func (*Server) Upgrade ¶
Upgrade starts using a given QUIC session with the quictun protocol. The quictun server immediately starts accepting new QUIC streams and assumes them to speak the quictun protocol (QTP). The actual protocol upgrade (via a HTTP/2 request-response) is handled entirely by the web server.
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package h2quic is a drop-in replacement for quic-go's h2quic package with integrated quictun support.
|
Package h2quic is a drop-in replacement for quic-go's h2quic package with integrated quictun support. |
internal
|
|