cloudflared-mirror/vendor/github.com/quic-go/quic-go
Devin Carr 9426b60308 TUN-7227: Migrate to devincarr/quic-go
The lucas-clemente/quic-go package moved namespaces and our branch
went stale, this new fork provides support for the new quic-go repo
and applies the max datagram frame size change.

Until the max datagram frame size support gets upstreamed into quic-go,
this can be used to unblock go 1.20 support as the old
lucas-clemente/quic-go will not get go 1.20 support.
2023-05-10 19:44:15 +00:00
..
internal TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
logging TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
quicvarint TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
.gitignore TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
.golangci.yml TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
Changelog.md TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
LICENSE TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
README.md TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
SECURITY.md TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
buffer_pool.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
client.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
closed_conn.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
codecov.yml TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
config.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
conn_id_generator.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
conn_id_manager.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
connection.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
connection_timer.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
crypto_stream.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
crypto_stream_manager.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
datagram_queue.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
errors.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
frame_sorter.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
framer.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
interface.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
mockgen.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
mtu_discoverer.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
multiplexer.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
packet_handler_map.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
packet_packer.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
packet_unpacker.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
receive_stream.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
retransmission_queue.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
send_conn.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
send_queue.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
send_stream.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
server.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
stream.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
streams_map.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
streams_map_incoming.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
streams_map_outgoing.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn_df.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn_df_linux.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn_df_windows.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn_helper_darwin.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn_helper_freebsd.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn_helper_linux.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn_no_oob.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn_oob.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
sys_conn_windows.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
token_store.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
tools.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
transport.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00
window_update_queue.go TUN-7227: Migrate to devincarr/quic-go 2023-05-10 19:44:15 +00:00

README.md

A QUIC implementation in pure Go

PkgGoDev Code Coverage

quic-go is an implementation of the QUIC protocol (RFC 9000, RFC 9001, RFC 9002) in Go, including the Unreliable Datagram Extension (RFC 9221) and Datagram Packetization Layer Path MTU Discovery (DPLPMTUD, RFC 8899). It has support for HTTP/3 (RFC 9114), including QPACK (RFC 9204).

In addition to the RFCs listed above, it currently implements the IETF QUIC draft-29. Support for draft-29 will eventually be dropped, as it is phased out of the ecosystem.

Guides

We currently support Go 1.19.x and Go 1.20.x

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{},
}

Projects using quic-go

Project Description Stars
AdGuardHome Free and open source, powerful network-wide ads & trackers blocking DNS server. GitHub Repo stars
algernon Small self-contained pure-Go web server with Lua, Markdown, HTTP/2, QUIC, Redis and PostgreSQL support GitHub Repo stars
caddy Fast, multi-platform web server with automatic HTTPS GitHub Repo stars
cloudflared A tunneling daemon that proxies traffic from the Cloudflare network to your origins GitHub Repo stars
go-libp2p libp2p implementation in Go, powering Kubo (IPFS) and Lotus (Filecoin), among others GitHub Repo stars
Mercure An open, easy, fast, reliable and battery-efficient solution for real-time communications GitHub Repo stars
OONI Probe Next generation OONI Probe. Library and CLI tool. GitHub Repo stars
syncthing Open Source Continuous File Synchronization GitHub Repo stars
traefik The Cloud Native Application Proxy GitHub Repo stars
v2ray-core A platform for building proxies to bypass network restrictions GitHub Repo stars
YoMo Streaming Serverless Framework for Geo-distributed System GitHub Repo stars

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.