Low-level access to the QUIC Initial Packet for mimicry purposes, hard fork of quic-go. https://quic.tlsfingerprint.io
Find a file
2020-11-30 12:59:35 +07:00
.circleci regenerate the testdata certificate with SAN instead of CommonName 2020-08-20 13:48:48 +07:00
.github/workflows use the current version of setup-go on GitHub Actions 2020-10-29 13:53:09 +07:00
.travis read the ECN bits 2020-09-15 10:51:22 +07:00
benchmark run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
docs add gopher-logo 2016-05-03 10:27:59 +02:00
example simplify the Tracer interface by combining the TracerFor... methods 2020-07-11 13:22:52 +07:00
fuzzing only write headers with a length that fits into 2 bytes in fuzz test 2020-11-19 13:43:48 +07:00
http3 explicitly set the supported versions in the HTTP/3 server test 2020-11-02 12:47:40 +07:00
integrationtests send 5 kB of stream data in the handshake drop test 2020-11-17 13:34:01 +07:00
internal avoid duplicate mutex locking when reading data 2020-11-20 15:45:38 +07:00
interop run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
logging implement qlogging of the preferred address in the transport parameters 2020-11-02 12:39:48 +07:00
metrics run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
qlog Merge pull request #2861 from lucas-clemente/no-viable-path-error 2020-11-10 20:50:40 +07:00
quictrace Merge pull request #2799 from lucas-clemente/optional-quic-trace 2020-10-06 20:24:13 +07:00
.editorconfig add editorconfig 2016-04-15 12:13:33 +02:00
.gitignore add common temporary file patterns to .gitignore 2020-11-30 12:59:35 +07:00
.golangci.yml run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
.travis.yml read the ECN bits 2020-09-15 10:51:22 +07:00
buffer_pool.go simplify content storage in packed packets 2020-02-20 16:25:54 +07:00
buffer_pool_test.go simplify content storage in packed packets 2020-02-20 16:25:54 +07:00
Changelog.md add Changelog entries for v0.17 2020-08-20 13:49:09 +07:00
client.go client: Add DialEarlyContext and DialAddrEarlyContext API 2020-10-07 22:20:28 -04:00
client_test.go use consistent version numbers in client test 2020-11-11 16:58:23 +07:00
closed_session.go simplify the connection, rename it to sendConn 2020-08-09 19:24:04 +07:00
closed_session_test.go simplify the connection, rename it to sendConn 2020-08-09 19:24:04 +07:00
codecov.yml add a metrics package using OpenCensus, trace connections 2020-07-11 09:39:36 +07:00
config.go limit Config.MaxIncoming{Uni}Streams to 2^60 2020-08-11 18:42:32 +07:00
config_test.go move the logging mock implementations to a separate package 2020-09-09 15:15:49 +07:00
conn.go introduce an ECNCapablePacketConn interface to determine ECN support 2020-09-15 14:41:06 +07:00
conn_ecn.go only use syscalls on platforms that we're actually testing 2020-11-18 19:00:07 +07:00
conn_ecn_test.go read the ECN bits 2020-09-15 10:51:22 +07:00
conn_generic.go only use syscalls on platforms that we're actually testing 2020-11-18 19:00:07 +07:00
conn_helper_darwin.go fix linting error on OSX 2020-10-05 13:32:06 +07:00
conn_helper_linux.go only use syscalls on platforms that we're actually testing 2020-11-18 19:00:07 +07:00
conn_id_generator.go only use the conn ID backwards compatibility mode with draft-29 2020-10-22 20:33:17 +07:00
conn_id_generator_test.go only use the conn ID backwards compatibility mode with draft-29 2020-10-22 20:33:17 +07:00
conn_id_manager.go wait until the handshake is complete before updating the connection ID 2020-11-02 16:21:38 +07:00
conn_id_manager_test.go wait until the handshake is complete before updating the connection ID 2020-11-02 16:21:38 +07:00
conn_test.go use a mock net.PacketConn in tests 2020-09-27 15:13:07 +07:00
crypto_stream.go use the correct error code for crypto stream errors 2020-05-14 17:12:07 +07:00
crypto_stream_manager.go add the exhaustive linter 2020-10-05 13:47:57 +07:00
crypto_stream_manager_test.go process the NewSessionTicket TLS message 2019-04-01 11:45:20 +09:00
crypto_stream_test.go run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
frame_sorter.go rewrite the frame sorter 2020-05-25 13:10:26 +07:00
frame_sorter_test.go fix seed generation in frame sorter tests 2020-06-01 09:59:54 +07:00
framer.go add a function to tell if the framer has data 2020-06-01 09:31:11 +07:00
framer_test.go rename DataBlockedFrame.DataLimit to MaximumData 2020-07-02 16:41:43 +07:00
go.mod update qpack to v0.2.1 2020-10-29 11:06:22 +07:00
go.sum update qpack to v0.2.1 2020-10-29 11:06:22 +07:00
interface.go expose draft version constants in the quic package 2020-10-22 20:33:17 +07:00
LICENSE add Google to license file 2016-12-14 11:54:01 +01:00
mock_ack_frame_source_test.go bundle ACK frames when packing a packet 2020-06-01 09:56:06 +07:00
mock_crypto_data_handler_test.go run go generate ./... 2019-03-05 13:42:56 +09:00
mock_crypto_stream_test.go run go generate ./... 2019-03-05 13:42:56 +09:00
mock_frame_source_test.go bundle ACK frames when packing a packet 2020-06-01 09:56:06 +07:00
mock_multiplexer_test.go read the ECN bits 2020-09-15 10:51:22 +07:00
mock_packer_test.go allow an amplification factor of 3.x 2020-11-06 14:16:11 +07:00
mock_packet_handler_manager_test.go introduce a protocol.StatelessResetToken 2020-07-10 19:55:20 +07:00
mock_packet_handler_test.go remove Session.Close() 2020-01-26 17:41:53 +07:00
mock_packetconn_test.go use a mock net.PacketConn in tests 2020-09-27 15:13:07 +07:00
mock_quic_session_test.go move all dependencies on qtls to a separate package 2020-08-18 14:26:23 +07:00
mock_receive_stream_internal_test.go run go generate ./... 2019-03-05 13:42:56 +09:00
mock_sealing_manager_test.go implement unpacking of 0-RTT packets 2019-12-30 18:39:21 +04:00
mock_send_conn_test.go simplify the connection, rename it to sendConn 2020-08-09 19:24:04 +07:00
mock_send_stream_internal_test.go return ackhandler.Frames from sendStream.popStreamFrame 2019-08-31 17:34:54 +07:00
mock_session_runner_test.go introduce a protocol.StatelessResetToken 2020-07-10 19:55:20 +07:00
mock_stream_getter_test.go run go generate ./... 2019-03-05 13:42:56 +09:00
mock_stream_internal_test.go return ackhandler.Frames from sendStream.popStreamFrame 2019-08-31 17:34:54 +07:00
mock_stream_manager_test.go move the transport parameters from the handshake to the wire package 2020-03-13 16:20:11 +07:00
mock_stream_sender_test.go run go generate ./... 2019-03-05 13:42:56 +09:00
mock_token_store_test.go add the TokenStore to the quic.Config, store received tokens 2019-08-13 10:52:59 +07:00
mock_unknown_packet_handler_test.go fix race condition when closing the server after a Read failed 2019-05-10 09:47:52 +09:00
mock_unpacker_test.go pass the time a packet was received to the short header opener 2019-08-11 13:33:02 +07:00
mockgen.go use a mock net.PacketConn in tests 2020-09-27 15:13:07 +07:00
mockgen_private.sh move all dependencies on qtls to a separate package 2020-08-18 14:26:23 +07:00
multiplexer.go use a mock net.PacketConn in tests 2020-09-27 15:13:07 +07:00
multiplexer_test.go use a mock net.PacketConn in tests 2020-09-27 15:13:07 +07:00
packet_handler_map.go replace the RWMutex with a Mutex in the packet handler map 2020-11-06 17:09:21 +07:00
packet_handler_map_test.go fix deadlock when closing the server and the connection at the same time 2020-10-29 17:56:14 +07:00
packet_packer.go account for the size of the header when packing 1-RTT probe packets 2020-11-17 13:08:06 +07:00
packet_packer_test.go account for the size of the header when packing 1-RTT probe packets 2020-11-17 13:08:06 +07:00
packet_unpacker.go remove stray print statement 2020-11-24 09:05:23 +07:00
packet_unpacker_test.go close session on errors unpacking errors other than decryption errors 2020-09-09 23:59:24 +07:00
quic_suite_test.go run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
README.md add version constants for draft-29 and draft-32 2020-10-22 20:33:16 +07:00
receive_stream.go run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
receive_stream_test.go increase the threshold for the receive stream deadline test 2020-09-11 17:10:16 +07:00
retransmission_queue.go add the exhaustive linter 2020-10-05 13:47:57 +07:00
retransmission_queue_test.go rename MaxDataFrame.ByteOffset to MaximumData 2020-07-02 16:41:43 +07:00
send_conn.go read the ECN bits 2020-09-15 10:51:22 +07:00
send_conn_test.go use a mock net.PacketConn in tests 2020-09-27 15:13:07 +07:00
send_queue.go simplify the connection, rename it to sendConn 2020-08-09 19:24:04 +07:00
send_queue_test.go simplify the connection, rename it to sendConn 2020-08-09 19:24:04 +07:00
send_stream.go run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
send_stream_test.go rename StreamFrame.FinBit to Fin 2020-07-02 16:41:43 +07:00
server.go fix deadlock when closing the server and the connection at the same time 2020-10-29 17:56:14 +07:00
server_test.go only send Version Negotiation packets for packets larger than 1200 bytes 2020-10-08 16:22:39 +07:00
session.go only trace dropped 0-RTT packets when a tracer is set 2020-11-11 17:13:56 +07:00
session_test.go Merge pull request #2856 from lucas-clemente/conn-id-update-handshake-completion 2020-11-10 20:52:09 +07:00
stream.go run gofumpt, enable the gofumpt linter 2020-10-26 09:33:35 +07:00
stream_deadline_error.go use the os.ErrDeadlineExceeded for stream deadline errors on Go 1.15 2020-08-31 14:50:07 +07:00
stream_deadline_error_go115.go use the os.ErrDeadlineExceeded for stream deadline errors on Go 1.15 2020-08-31 14:50:07 +07:00
stream_deadline_error_test.go use the os.ErrDeadlineExceeded for stream deadline errors on Go 1.15 2020-08-31 14:50:07 +07:00
stream_test.go drop support for gQUIC 2018-10-30 10:20:39 +07:00
streams_map.go rename the constructors for the various qerr.Error flavors 2020-03-21 10:53:03 +07:00
streams_map_generic_helper.go remove nolint commands that show up in GoDoc 2019-11-16 18:52:25 +08:00
streams_map_incoming_bidi.go fix race condition when stream is created while AcceptStream is waiting 2020-11-13 18:13:02 +07:00
streams_map_incoming_generic.go fix race condition when stream is created while AcceptStream is waiting 2020-11-13 18:13:02 +07:00
streams_map_incoming_generic_test.go add a randomized test for accepting streams 2020-11-13 18:13:03 +07:00
streams_map_incoming_uni.go fix race condition when stream is created while AcceptStream is waiting 2020-11-13 18:13:02 +07:00
streams_map_outgoing_bidi.go send STREAMS_BLOCKED frame when MAX_STREAMS frame allows too few streams 2020-10-30 15:28:09 +07:00
streams_map_outgoing_generic.go send STREAMS_BLOCKED frame when MAX_STREAMS frame allows too few streams 2020-10-30 15:28:09 +07:00
streams_map_outgoing_generic_test.go send STREAMS_BLOCKED frame when MAX_STREAMS frame allows too few streams 2020-10-30 15:28:09 +07:00
streams_map_outgoing_uni.go send STREAMS_BLOCKED frame when MAX_STREAMS frame allows too few streams 2020-10-30 15:28:09 +07:00
streams_map_test.go move the transport parameters from the handshake to the wire package 2020-03-13 16:20:11 +07:00
token_store.go define a quic.TokenStore interface and provide a LRU implementation 2019-08-13 10:30:31 +07:00
token_store_test.go define a quic.TokenStore interface and provide a LRU implementation 2019-08-13 10:30:31 +07:00
window_update_queue.go rename MaxStreamDataFrame.ByteOffset to MaximumStreamData 2020-07-02 16:41:43 +07:00
window_update_queue_test.go rename MaxStreamDataFrame.ByteOffset to MaximumStreamData 2020-07-02 16:41:43 +07:00
zero_rtt_queue.go make it easier to test the timer in the zeroRTTQueue 2020-08-28 18:03:51 +07:00
zero_rtt_queue_test.go make it easier to test the timer in the zeroRTTQueue 2020-08-28 18:03:51 +07:00

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.

If you want to use quic-go as a library in other projects, please consider using a tagged release. These releases expose experimental QUIC versions, which are guaranteed to be stable.

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.