Low-level access to the QUIC Initial Packet for mimicry purposes, hard fork of quic-go. https://quic.tlsfingerprint.io
Find a file
2022-10-11 16:38:44 +04:00
.circleci migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
.githooks only run Ginkgo focus detection in staged files in pre-commit hook 2021-03-19 14:46:21 +08:00
.github/workflows migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
docs add gopher-logo 2016-05-03 10:27:59 +02:00
example update golangci-lint action to v3, golangci-lint to v1.48.0 (#3499) 2022-08-10 09:50:48 -07:00
fuzzing migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
http3 migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
integrationtests migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
internal migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
interop migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
logging migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
qlog migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
quicvarint migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
.gitignore add common temporary file patterns to .gitignore 2020-11-30 12:59:35 +07:00
.golangci.yml remove deprecated scopelint linter from golangci-lint 2022-04-02 20:36:18 +01:00
buffer_pool.go rename MaxReceivePacketSize to MaxPacketBufferSize 2021-03-03 12:00:14 +08:00
buffer_pool_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
Changelog.md Update Changelog 2021-08-01 17:03:56 +02:00
client.go add support for providing a custom Connection ID generator via Config (#3452) 2022-08-24 04:06:16 -07:00
client_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
closed_conn.go use a single Go routine to send copies of CONNECTION_CLOSE packets 2022-08-21 15:41:47 +03:00
closed_conn_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
codecov.yml add a logging.NullTracer 2022-08-22 13:21:35 +03:00
config.go add support for providing a custom Connection ID generator via Config (#3452) 2022-08-24 04:06:16 -07:00
config_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
conn_id_generator.go remove ConnectionID.Equal function 2022-08-29 11:30:32 +03:00
conn_id_generator_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
conn_id_manager.go remove ConnectionID.Equal function 2022-08-29 11:30:32 +03:00
conn_id_manager_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
connection.go use a monotonous timer for the connection (#3570) 2022-10-11 05:36:10 -07:00
connection_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
connection_timer.go use a monotonous timer for the connection (#3570) 2022-10-11 05:36:10 -07:00
connection_timer_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
crypto_stream.go implement generic Min and Max functions 2022-08-10 14:59:05 +02:00
crypto_stream_manager.go add the exhaustive linter 2020-10-05 13:47:57 +07:00
crypto_stream_manager_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
crypto_stream_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
datagram_queue.go use a Peek / Pop API for the datagram queue (#3582) 2022-10-11 02:25:17 -07:00
datagram_queue_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
errors.go export the IdleTimeoutError and the HandshakeTimeoutError 2021-05-01 09:39:52 +07:00
frame_sorter.go use a generic linked list (#3487) 2022-08-10 09:50:21 -07:00
frame_sorter_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
framer.go drop STREAM and *_BLOCKED frames from queue when 0-RTT is rejected 2021-03-09 17:59:11 +08:00
framer_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
go.mod migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
go.sum migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
interface.go use an array instead of a byte slice for Connection IDs 2022-08-29 11:30:31 +03:00
LICENSE add Google to license file 2016-12-14 11:54:01 +01:00
mock_ack_frame_source_test.go use mockgen source mode 2021-02-20 09:59:44 +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 use a single Go routine to send copies of CONNECTION_CLOSE packets 2022-08-21 15:41:47 +03:00
mock_crypto_data_handler_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_crypto_stream_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_frame_source_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_mtu_discoverer_test.go don't send path MTU probe packets on a timer (#3423) 2022-05-20 03:10:39 -07:00
mock_multiplexer_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_packer_test.go remove the MaybePackAckPacket from the packet packer 2022-09-09 11:39:25 +03:00
mock_packet_handler_manager_test.go use a single Go routine to send copies of CONNECTION_CLOSE packets 2022-08-21 15:41:47 +03:00
mock_packet_handler_test.go use mockgen source mode 2021-02-20 09:59:44 +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 rename quicConn.earlySessionReady to quicConn.earlyConnReady 2022-03-27 11:27:25 +01:00
mock_receive_stream_internal_test.go introduce a quic.StreamError type and use it for stream cancelations 2021-05-01 09:39:52 +07:00
mock_sealing_manager_test.go use mockgen source mode 2021-02-20 09:59:44 +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 introduce a quic.StreamError type and use it for stream cancelations 2021-05-01 09:39:52 +07:00
mock_sender_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_stream_getter_test.go rename the session to connection 2022-03-27 12:50:14 +01:00
mock_stream_internal_test.go introduce a quic.StreamError type and use it for stream cancelations 2021-05-01 09:39:52 +07:00
mock_stream_manager_test.go rename the session to connection 2022-03-27 12:50:14 +01:00
mock_stream_sender_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_token_store_test.go update gomock to v1.5.0 2021-02-20 09:33:43 +08:00
mock_unknown_packet_handler_test.go use mockgen source mode 2021-02-20 09:59:44 +08:00
mock_unpacker_test.go remove the wire.ShortHeader in favor of more return values (#3535) 2022-08-30 04:37:36 -07:00
mockgen.go rename the sessionRunner to connRunner 2022-03-27 11:27:25 +01:00
mockgen_private.sh remove unneeded calls to goimports when generating mocks 2022-01-09 10:11:21 +04:00
mtu_discoverer.go don't send path MTU probe packets on a timer (#3423) 2022-05-20 03:10:39 -07:00
mtu_discoverer_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
multiplexer.go rename the session to connection 2022-03-27 12:50:14 +01:00
multiplexer_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
packet_handler_map.go use an array instead of a byte slice for Connection IDs 2022-08-29 11:30:31 +03:00
packet_handler_map_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
packet_packer.go use a Peek / Pop API for the datagram queue (#3582) 2022-10-11 02:25:17 -07:00
packet_packer_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
packet_unpacker.go remove the wire.ShortHeader in favor of more return values (#3535) 2022-08-30 04:37:36 -07:00
packet_unpacker_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
quic_suite_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
README.md add DPLPMTUD (RFC 8899) to list of supported RFCs in README (#3520) 2022-08-29 10:27:38 +03:00
receive_stream.go protect against concurrent use of Stream.Read (#3380) 2022-04-25 03:58:11 -07:00
receive_stream_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
retransmission_queue.go add the exhaustive linter 2020-10-05 13:47:57 +07:00
retransmission_queue_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04: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 sendQueue: ignore "datagram too large" error (#3328) 2022-02-20 00:21:32 -08:00
send_queue_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
send_stream.go implement generic Min and Max functions 2022-08-10 14:59:05 +02:00
send_stream_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
server.go introduce a separate code path for unpacking short header packets 2022-08-29 15:55:37 +03:00
server_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
stream.go introduce a quic.StreamError type and use it for stream cancelations 2021-05-01 09:39:52 +07:00
stream_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
streams_map.go use a generic streams map for incoming streams 2022-08-11 18:31:45 +04:00
streams_map_incoming.go use a generic streams map for incoming streams 2022-08-11 18:31:45 +04:00
streams_map_incoming_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
streams_map_outgoing.go use a generic streams map for outgoing streams (#3488) 2022-08-11 05:14:52 -07:00
streams_map_outgoing_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
streams_map_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
sys_conn.go only set DF for sockets that can handle it (#3448) 2022-06-19 10:38:34 -07: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 drop support for Go 1.16 and 1.17 (#3482) 2022-08-10 03:42:14 -07:00
sys_conn_df_windows.go drop support for Go 1.16 and 1.17 (#3482) 2022-08-10 03:42:14 -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 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 preallocate the message buffers of the ipv4.Message passed to ReadBatch (#3541) 2022-08-30 04:11:43 -07:00
sys_conn_oob_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
sys_conn_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04: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 implement generic Min and Max functions 2022-08-10 14:59:05 +02: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 MaxStreamDataFrame.ByteOffset to MaximumStreamData 2020-07-02 16:41:43 +07:00
window_update_queue_test.go migrate to Ginkgo v2 2022-10-11 16:38:44 +04:00
zero_rtt_queue.go move the 0-RTT queue to a separate file 2022-08-21 12:46:40 +03: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.18.x and Go 1.19.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
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
go-ipfs IPFS implementation in go 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
cloudflared A tunneling daemon that proxies traffic from the Cloudflare network to your origins GitHub Repo stars
OONI Probe The Open Observatory of Network Interference (OONI) aims to empower decentralized efforts in documenting Internet censorship around the world. 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.