Low-level access to the QUIC Initial Packet for mimicry purposes, hard fork of quic-go. https://quic.tlsfingerprint.io
Find a file
2023-06-02 06:54:34 -07:00
.circleci move the version negotiation tests to a separate package 2023-05-01 13:42:30 +02:00
.githooks githooks: exclude deleted files from checks (#3864) 2023-06-02 03:14:03 -07:00
.github/workflows ci: fix ordering of error output of the cross compilation workflow (#3809) 2023-06-02 03:12:53 -07:00
docs add gopher-logo 2016-05-03 10:27:59 +02:00
example remove Tracer from Config, put ConnectionTracer constructor there 2023-05-02 15:56:49 +02:00
fuzzing make Config.Allow0RTT a bool, not a callback 2023-05-02 15:56:49 +02:00
http3 http3: close the connection when closing the roundtripper (#3873) 2023-06-01 01:06:13 -07:00
integrationtests remove stray print statement in datagram test (#3828) 2023-06-02 03:08:02 -07:00
internal use ackhandler.Frame directly, not as a pointer, remove its sync.Pool (#3835) 2023-06-02 04:56:18 -07:00
interop remove Tracer from Config, put ConnectionTracer constructor there 2023-05-02 15:56:49 +02:00
logging remove Tracer from Config, put ConnectionTracer constructor there 2023-05-02 15:56:49 +02:00
qlog remove Tracer from Config, put ConnectionTracer constructor there 2023-05-02 15:56:49 +02:00
quicvarint quicvarint: remove deprecated Write function (#3781) 2023-05-09 12:06:22 -07: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 improve document of the Transport and the dial and listen functions (#3875) 2023-06-02 03:45:40 -07:00
client_test.go fix flaky client test (#3834) 2023-06-02 02:58:07 -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 config: handle overflows of stream and flow control limits (#3866) 2023-06-02 03:41:14 -07:00
config_test.go config: handle overflows of stream and flow control limits (#3866) 2023-06-02 03:41:14 -07: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 only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
connection_test.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -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 protocol: remove VersionWhatever, previously used for testing (#3763) 2023-04-19 06:19:27 -07: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 use ackhandler.Frame directly, not as a pointer, remove its sync.Pool (#3835) 2023-06-02 04:56:18 -07:00
framer_test.go use ackhandler.Frame directly, not as a pointer, remove its sync.Pool (#3835) 2023-06-02 04:56:18 -07:00
go.mod update Ginkgo to v2.9.5 and Gomega to v1.27.6 (#3845) 2023-06-02 02:57:26 -07:00
go.sum update Ginkgo to v2.9.5 and Gomega to v1.27.6 (#3845) 2023-06-02 02:57:26 -07:00
interface.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
LICENSE add Google to license file 2016-12-14 11:54:01 +01:00
mock_ack_frame_source_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_batch_conn_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_conn_runner_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_crypto_data_handler_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_crypto_stream_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_frame_source_test.go use ackhandler.Frame directly, not as a pointer, remove its sync.Pool (#3835) 2023-06-02 04:56:18 -07:00
mock_mtu_discoverer_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_packer_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_packet_handler_manager_test.go add a GetConfigForClient callback to the Config 2023-05-02 15:56:49 +02:00
mock_packet_handler_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_packetconn_test.go update gomock to v1.5.0 2021-02-20 09:33:43 +08:00
mock_quic_conn_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_receive_stream_internal_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_sealing_manager_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_send_conn_test.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
mock_send_stream_internal_test.go don't use closures for passing OnLost and OnAcked STREAM frame callbacks (#3833) 2023-06-02 04:14:04 -07:00
mock_sender_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_stream_getter_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_stream_internal_test.go don't use closures for passing OnLost and OnAcked STREAM frame callbacks (#3833) 2023-06-02 04:14:04 -07:00
mock_stream_manager_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_stream_sender_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07: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 simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mock_unpacker_test.go simplify mockgen usage for private interfaces (#3769) 2023-04-19 07:57:00 -07:00
mockgen.go implement the Transport 2023-05-02 15:56:48 +02: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 implement the Transport 2023-05-02 15:56:48 +02:00
multiplexer_test.go implement the Transport 2023-05-02 15:56:48 +02:00
packet_handler_map.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
packet_handler_map_test.go add a GetConfigForClient callback to the Config 2023-05-02 15:56:49 +02:00
packet_packer.go use ackhandler.Frame directly, not as a pointer, remove its sync.Pool (#3835) 2023-06-02 04:56:18 -07:00
packet_packer_test.go use ackhandler.Frame directly, not as a pointer, remove its sync.Pool (#3835) 2023-06-02 04:56:18 -07: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 implement the Transport 2023-05-02 15:56:48 +02:00
README.md README: restructure RFC section, add QUIC v2 (RFC 9369) (#3871) 2023-06-02 03:00:29 -07:00
receive_stream.go receive stream: put back the buffer for the last STREAM frame (#3832) 2023-06-02 03:22:51 -07: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 only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
send_conn_test.go simplify connection handling for the client 2023-05-02 15:56:49 +02: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 don't use closures for passing OnLost and OnAcked STREAM frame callbacks (#3833) 2023-06-02 04:14:04 -07:00
send_stream_test.go don't use closures for passing OnLost and OnAcked STREAM frame callbacks (#3833) 2023-06-02 04:14:04 -07:00
server.go improve document of the Transport and the dial and listen functions (#3875) 2023-06-02 03:45:40 -07:00
server_test.go remove Tracer from Config, put ConnectionTracer constructor there 2023-05-02 15:56:49 +02:00
stream.go don't use closures for passing OnLost and OnAcked STREAM frame callbacks (#3833) 2023-06-02 04:14:04 -07: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 only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
sys_conn_buffers.go add a function to set the UDP send buffer size 2023-05-08 14:35:21 +03:00
sys_conn_buffers_write.go add a function to set the UDP send buffer size 2023-05-08 14:35:21 +03:00
sys_conn_df.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
sys_conn_df_linux.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
sys_conn_df_windows.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07: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 add a function to set the UDP send buffer size 2023-05-08 14:35:21 +03:00
sys_conn_helper_linux_test.go add a function to set the UDP send buffer size 2023-05-08 14:35:21 +03:00
sys_conn_helper_nonlinux.go add a function to set the UDP send buffer size 2023-05-08 14:35:21 +03:00
sys_conn_no_oob.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
sys_conn_oob.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
sys_conn_oob_test.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07: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 only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07:00
sys_conn_windows_test.go only run DPLPMTUD if the connection can send packets with the DF bit set (#3879) 2023-06-02 06:54:34 -07: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
transport.go improve document of the Transport and the dial and listen functions (#3875) 2023-06-02 03:45:40 -07:00
transport_test.go transport: fix flaky stateless reset test (#3810) 2023-05-08 01:56:59 -07: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

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. It has support for HTTP/3 (RFC 9114), including QPACK (RFC 9204).

In addition to these base PR, it also implements the following RFS:

  • Unreliable Datagram Extension (RFC 9221)
  • Datagram Packetization Layer Path MTU Discovery (DPLPMTUD, RFC 8899)
  • QUIC Version 2 (RFC 9369)

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.