Low-level access to the QUIC Initial Packet for mimicry purposes, hard fork of quic-go. https://quic.tlsfingerprint.io
Find a file
Marten Seemann a0f032ee18
ci: remove special casing for AppVeyor (#3753)
We dropped AppVeyor a long time ago.
2023-04-19 06:05:23 -07:00
.circleci drop qtls support for Go 1.18 2023-02-04 17:44:54 +13:00
.githooks only run Ginkgo focus detection in staged files in pre-commit hook 2021-03-19 14:46:21 +08:00
.github/workflows ci: update golangci-lint config, increase timeout (#3771) 2023-04-19 05:45:19 -07:00
docs add gopher-logo 2016-05-03 10:27:59 +02:00
example rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
fuzzing reject invalid active_connection_id_limit transport parameter values (#3687) 2023-02-01 17:03:19 -08:00
http3 http3: check scheme before host to be consistent with net/http (#3774) 2023-04-17 02:34:51 -07:00
integrationtests add a handshake test for post-quantum-size ClientHellos (#3759) 2023-04-19 06:01:43 -07:00
internal add a handshake test for post-quantum-size ClientHellos (#3759) 2023-04-19 06:01:43 -07:00
interop interop: publish Docker images for linux/amd64 and linux/arm64 (#3748) 2023-03-29 22:21:13 -07:00
logging rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
qlog qlog: use version_mismatch trigger on transport:connection_closed event (#3724) 2023-03-26 22:24:30 +09:00
quicvarint deprecate quicvarint.Write in favor of quicvarint.Append (#3690) 2023-02-13 02:52:25 -08:00
.gitignore add common temporary file patterns to .gitignore 2020-11-30 12:59:35 +07:00
.golangci.yml ci: update golangci-lint config, increase timeout (#3771) 2023-04-19 05:45:19 -07:00
buffer_pool.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
buffer_pool_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
Changelog.md rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
client.go qtls: don't set the tls.Config.CipherSuites for cipher suite tests (#3726) 2023-03-26 06:56:41 -07:00
client_test.go ci: remove special casing for AppVeyor (#3753) 2023-04-19 06:05:23 -07:00
closed_conn.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
closed_conn_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
codecov.yml add a logging.NullTracer 2022-08-22 13:21:35 +03:00
config.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
config_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
conn_id_generator.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
conn_id_generator_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
conn_id_manager.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
conn_id_manager_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
connection.go use a chan instead of a context in Connection.HandshakeComplete (#3709) 2023-03-26 06:51:56 -07:00
connection_test.go use a chan instead of a context in Connection.HandshakeComplete (#3709) 2023-03-26 06:51:56 -07:00
connection_timer.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
connection_timer_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
crypto_stream.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
crypto_stream_manager.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
crypto_stream_manager_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
crypto_stream_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
datagram_queue.go only allocate datagram receive queue when receiving datagrams (#3702) 2023-02-13 14:55:26 -08:00
datagram_queue_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
errors.go return StreamErrors for all kinds of stream cancelations (#3681) 2023-01-26 12:58:06 -08:00
frame_sorter.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
frame_sorter_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
framer.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
framer_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
go.mod offer only TLS 1.3 cipher suites in ClientHello (#3749) 2023-04-19 05:57:55 -07:00
go.sum offer only TLS 1.3 cipher suites in ClientHello (#3749) 2023-04-19 05:57:55 -07:00
interface.go use a chan instead of a context in Connection.HandshakeComplete (#3709) 2023-03-26 06:51:56 -07:00
LICENSE add Google to license file 2016-12-14 11:54:01 +01:00
mock_ack_frame_source_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_batch_conn_test.go rename files dealing with low level conns to sys_conn 2022-03-27 12:28:41 +01:00
mock_conn_runner_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_crypto_data_handler_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_crypto_stream_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_frame_source_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_mtu_discoverer_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_multiplexer_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_packer_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_packet_handler_manager_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_packet_handler_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_packetconn_test.go update gomock to v1.5.0 2021-02-20 09:33:43 +08:00
mock_quic_conn_test.go use a chan instead of a context in Connection.HandshakeComplete (#3709) 2023-03-26 06:51:56 -07:00
mock_receive_stream_internal_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_sealing_manager_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_send_conn_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_send_stream_internal_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_sender_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_stream_getter_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_stream_internal_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_stream_manager_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_stream_sender_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_token_store_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mock_unknown_packet_handler_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_unpacker_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mockgen.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mockgen_private.sh rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mtu_discoverer.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
mtu_discoverer_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
multiplexer.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
multiplexer_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
packet_handler_map.go add missing tracing for dropped 0-RTT packets (#3762) 2023-04-19 05:50:29 -07:00
packet_handler_map_test.go add missing tracing for dropped 0-RTT packets (#3762) 2023-04-19 05:50:29 -07:00
packet_packer.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
packet_packer_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
packet_unpacker.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
packet_unpacker_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
quic_suite_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
README.md drop qtls support for Go 1.18 2023-02-04 17:44:54 +13:00
receive_stream.go remove unneeded tracking variables from streams, optimize memory layout (#3699) 2023-02-13 13:57:00 -08:00
receive_stream_test.go remove unneeded tracking variables from streams, optimize memory layout (#3699) 2023-02-13 13:57:00 -08:00
retransmission_queue.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
retransmission_queue_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
SECURITY.md add a security policy (#3733) 2023-03-27 17:24:28 -07:00
send_conn.go rename the connection to rawConn 2022-03-27 12:28:43 +01:00
send_conn_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
send_queue.go fix availability signaling of the send queue (#3597) 2022-10-22 12:09:40 +01:00
send_queue_test.go fix flaky send queue test (#3668) 2023-01-16 23:35:15 +13:00
send_stream.go remove unneeded tracking variables from streams, optimize memory layout (#3699) 2023-02-13 13:57:00 -08:00
send_stream_test.go fix flaky send stream test (#3678) 2023-02-13 02:49:30 -08:00
server.go qtls: don't set the tls.Config.CipherSuites for cipher suite tests (#3726) 2023-03-26 06:56:41 -07:00
server_test.go use a chan instead of a context in Connection.HandshakeComplete (#3709) 2023-03-26 06:51:56 -07:00
stream.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
stream_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
streams_map.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
streams_map_incoming.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
streams_map_incoming_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
streams_map_outgoing.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
streams_map_outgoing_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
streams_map_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
sys_conn.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
sys_conn_df.go drop support for Go 1.16 and 1.17 (#3482) 2022-08-10 03:42:14 -07:00
sys_conn_df_linux.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
sys_conn_df_windows.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
sys_conn_helper_darwin.go drop support for Go 1.16 and 1.17 (#3482) 2022-08-10 03:42:14 -07:00
sys_conn_helper_freebsd.go drop support for Go 1.16 and 1.17 (#3482) 2022-08-10 03:42:14 -07:00
sys_conn_helper_linux.go drop support for Go 1.16 and 1.17 (#3482) 2022-08-10 03:42:14 -07:00
sys_conn_no_oob.go drop support for Go 1.16 and 1.17 (#3482) 2022-08-10 03:42:14 -07:00
sys_conn_oob.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
sys_conn_oob_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
sys_conn_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
sys_conn_windows.go drop support for Go 1.16 and 1.17 (#3482) 2022-08-10 03:42:14 -07:00
sys_conn_windows_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
token_store.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
token_store_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
tools.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
window_update_queue.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
window_update_queue_test.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00
zero_rtt_queue.go rename module, adjust import paths to quic-go/quic-go (#3680) 2023-01-21 19:53:57 -08:00

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
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.