Categorygithub.com/Nxxaux/quic-go
modulepackage
0.19.5
Repository: https://github.com/nxxaux/quic-go.git
Documentation: pkg.go.dev

# README

A QUIC implementation in pure Go

Godoc Reference Travis Build Status CircleCI Build Status Windows Build Status Code Coverage

quic-go is an implementation of the QUIC protocol in Go. It implements the IETF QUIC draft-29 and draft-32.

Version compatibility

Since quic-go is under active development, there's no guarantee that two builds of different commits are interoperable. The QUIC version used in the master branch is just a placeholder, and should not be considered stable.

When using quic-go as a library, please always use a tagged release. Only these releases use the official draft version numbers.

Guides

We currently support Go 1.14+, with Go modules support enabled.

Running tests:

go test ./...

QUIC without HTTP/3

Take a look at this echo example.

Usage

As a server

See the example server. Starting a QUIC server is very similar to the standard lib http in go:

http.Handle("/", http.FileServer(http.Dir(wwwDir)))
http3.ListenAndServeQUIC("localhost:4242", "/path/to/cert/chain.pem", "/path/to/privkey.pem", nil)

As a client

See the example client. Use a http3.RoundTripper as a Transport in a http.Client.

http.Client{
  Transport: &http3.RoundTripper{},
}

Contributing

We are always happy to welcome new contributors! We have a number of self-contained issues that are suitable for first-time contributors, they are tagged with help wanted. If you have any questions, please feel free to reach out by opening an issue or leaving a comment.

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package logging defines a logging interface for quic-go.
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

Dial establishes a new QUIC connection to a server using a net.PacketConn.
DialAddr establishes a new QUIC connection to a server.
DialAddrContext establishes a new QUIC connection to a server using the provided context.
DialAddrEarly establishes a new 0-RTT QUIC connection to a server.
DialAddrEarlyContext establishes a new 0-RTT QUIC connection to a server using provided context.
DialContext establishes a new QUIC connection to a server using a net.PacketConn using the provided context.
DialEarly establishes a new 0-RTT QUIC connection to a server using a net.PacketConn.
DialEarlyContext establishes a new 0-RTT QUIC connection to a server using a net.PacketConn using the provided context.
Listen listens for QUIC connections on a given net.PacketConn.
ListenAddr creates a QUIC server listening on a given address.
ListenAddrEarly works like ListenAddr, but it returns sessions before the handshake completes.
ListenEarly works like Listen, but it returns sessions before the handshake completes.
NewLRUTokenStore creates a new LRU cache for tokens received by the client.

# Constants

VersionDraft29 is IETF QUIC draft-29.
VersionDraft32 is IETF QUIC draft-32.

# Variables

RetireBugBackwardsCompatibilityMode controls a backwards compatibility mode, necessary due to a bug in quic-go v0.17.2 (and earlier), where under certain circumstances, an endpoint would retire the connection ID it is currently using.

# Structs

A ClientToken is a token received by the client.
Config contains all configuration data needed for a QUIC server or client.
ConnectionState records basic details about a QUIC connection.
A Token can be used to verify the ownership of the client address.

# Interfaces

An EarlyListener listens for incoming QUIC connections, and returns them before the handshake completes.
An EarlySession is a session that is handshaking.
If the PacketConn passed to Dial or Listen satisfies this interface, quic-go will read the ECN bits from the IP header.
A Listener for incoming QUIC connections.
A ReceiveStream is a unidirectional Receive Stream.
A SendStream is a unidirectional Send Stream.
A Session is a QUIC connection between two peers.
Stream is the interface implemented by QUIC streams.
StreamError is returned by Read and Write when the peer cancels the stream.
No description provided by the author

# Type aliases

An ErrorCode is an application-defined error code.
The StreamID is the ID of a QUIC stream.
A VersionNumber is a QUIC version number.