A QUIC implementation in pure go

Marten Seemann 9d6ae474d7 remove stray GinkgoRecover from the server 3 days ago
.circleci a2e61ad76d add a client and server implementation for the interop test runner 1 month ago
.travis 669138ee60 update Fuzzit binary 2 months ago
benchmark f066e2fc5f remove the testlog package 1 week ago
docs ef71186402 add gopher-logo 3 years ago
example 07dcbc8496 remove the testserver package 2 weeks ago
fuzzing 5ea33cd31e implement a buffer pool for STREAM frames 3 months ago
http3 e08b6b37c4 update the H3 ALPN to draft-24 5 days ago
integrationtests f066e2fc5f remove the testlog package 1 week ago
internal 02acf81ca1 remove the VERSION_NEGOTIATION_ERROR 6 days ago
interop 06d8eda0e9 add support for the version negotiation test 1 month ago
quictrace 6b22f36d82 add the stylecheck linter 2 months ago
.editorconfig 2e1da961c5 add editorconfig 3 years ago
.gitignore 1ff6c04bdd add .gitignore entries for fuzzing 3 months ago
.golangci.yml 6b22f36d82 add the stylecheck linter 2 months ago
.travis.yml 1350f499b5 update GolangCI-Lint to v1.18.0 2 months ago
Changelog.md b60d6ba42d add a Changelog entry for the TokenStore 3 months ago
LICENSE bd3c7a96f9 add Google to license file 3 years ago
README.md 6fc2dac432 deprecate gQUIC support 1 month ago
appveyor.yml 761b6d50f7 update CIs to Go 1.13 3 months ago
buffer_pool.go 33bf79c735 fix packet buffer usage when handling coalesced packets 9 months ago
buffer_pool_test.go 33bf79c735 fix packet buffer usage when handling coalesced packets 9 months ago
client.go 35ea8213c5 move initialization of the client's transport parameters to the session 1 month ago
client_test.go 35ea8213c5 move initialization of the client's transport parameters to the session 1 month ago
closed_session.go c7334e3e66 replace closed sessions in the packet handler map 1 month ago
closed_session_test.go c7334e3e66 replace closed sessions in the packet handler map 1 month ago
codecov.yml 031c1709e6 implement a basic store for new connection IDs 1 month ago
conn.go 34b688b3b9 add a LocalAddr to the Session 2 years ago
conn_id_generator.go 5a834851a8 route retransmissions of the client's Initial to the right session 1 week ago
conn_id_generator_test.go 5a834851a8 route retransmissions of the client's Initial to the right session 1 week ago
conn_id_manager.go f1fd07df59 retire delayed conn IDs arriving after a higher conn ID was retired 2 weeks ago
conn_id_manager_test.go f1fd07df59 retire delayed conn IDs arriving after a higher conn ID was retired 2 weeks ago
conn_test.go 81be522bf3 identify connections by their local addr when adding to the multiplexer 3 months ago
crypto_stream.go 949a65d490 Merge pull request #2235 from lucas-clemente/crypto-buffer-exceeded 2 weeks ago
crypto_stream_manager.go 2adf923ee6 process the NewSessionTicket TLS message 8 months ago
crypto_stream_manager_test.go 2adf923ee6 process the NewSessionTicket TLS message 8 months ago
crypto_stream_test.go 949a65d490 Merge pull request #2235 from lucas-clemente/crypto-buffer-exceeded 2 weeks ago
frame_sorter.go 6b22f36d82 add the stylecheck linter 2 months ago
frame_sorter_test.go 6b22f36d82 add the stylecheck linter 2 months ago
framer.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 3 months ago
framer_test.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 3 months ago
go.mod a2e61ad76d add a client and server implementation for the interop test runner 1 month ago
go.sum 88d1c78dab improve error messages on ALPN mismatches 1 month ago
interface.go 9c97a5e95f add the TokenStore to the quic.Config, store received tokens 3 months ago
mock_ack_frame_source_test.go 5e34cb1d71 run go generate ./... 9 months ago
mock_crypto_data_handler_test.go 5e34cb1d71 run go generate ./... 9 months ago
mock_crypto_stream_test.go 5e34cb1d71 run go generate ./... 9 months ago
mock_frame_source_test.go e622207822 assemble ackhandler.Frames, not wire.Frames, when packing a packet 3 months ago
mock_multiplexer_test.go 94046cdb4b implement sending of stateless resets 9 months ago
mock_packer_test.go fbbe225719 implement a function to pack probe packets 3 weeks ago
mock_packet_handler_manager_test.go e65df402dd only create a single session when two Initials arrive at the same time 1 week ago
mock_packet_handler_test.go 5e34cb1d71 run go generate ./... 9 months ago
mock_quic_session_test.go 5cbb8d6597 implement a listener that returns early sessions 3 months ago
mock_receive_stream_internal_test.go 5e34cb1d71 run go generate ./... 9 months ago
mock_sealing_manager_test.go b2d3ef691e use separate sealer interfaces for long and short header packets 5 months ago
mock_send_stream_internal_test.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 3 months ago
mock_session_runner_test.go 35ea8213c5 move initialization of the client's transport parameters to the session 1 month ago
mock_stream_getter_test.go 5e34cb1d71 run go generate ./... 9 months ago
mock_stream_internal_test.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 3 months ago
mock_stream_manager_test.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 5 months ago
mock_stream_sender_test.go 5e34cb1d71 run go generate ./... 9 months ago
mock_token_store_test.go 9c97a5e95f add the TokenStore to the quic.Config, store received tokens 3 months ago
mock_unknown_packet_handler_test.go dc75123836 fix race condition when closing the server after a Read failed 7 months ago
mock_unpacker_test.go bb48c9b31a pass the time a packet was received to the short header opener 4 months ago
mockgen.go 9c97a5e95f add the TokenStore to the quic.Config, store received tokens 3 months ago
mockgen_private.sh 76d4d43b50 move the mockgen cleanup commands to the mockgen script 1 year ago
multiplexer.go 8388b8ea3a add network to multiplexer index 2 months ago
multiplexer_test.go 81be522bf3 identify connections by their local addr when adding to the multiplexer 3 months ago
packet_handler_map.go e65df402dd only create a single session when two Initials arrive at the same time 1 week ago
packet_handler_map_test.go e65df402dd only create a single session when two Initials arrive at the same time 1 week ago
packet_packer.go fbbe225719 implement a function to pack probe packets 3 weeks ago
packet_packer_test.go fbbe225719 implement a function to pack probe packets 3 weeks ago
packet_unpacker.go 6b22f36d82 add the stylecheck linter 2 months ago
packet_unpacker_test.go 3db60534cf use a sentinel error when a sealer is not yet available 3 weeks ago
quic_suite_test.go c7334e3e66 replace closed sessions in the packet handler map 1 month ago
receive_stream.go 529e14d0cc simplify onStreamCompleted in the receiveStream 1 month ago
receive_stream_test.go dc66c8a4e4 fix handling of RESET_STREAM frames after receiving the final offset 1 month ago
retransmission_queue.go f49451ce3c queue lost STREAM frames in the stream's retransmission queue 3 months ago
retransmission_queue_test.go f49451ce3c queue lost STREAM frames in the stream's retransmission queue 3 months ago
send_queue.go 00c19f7241 implement a send queue to send packet asynchronously 3 months ago
send_queue_test.go 00c19f7241 implement a send queue to send packet asynchronously 3 months ago
send_stream.go d93afcac53 cancel the stream context as early as possible 1 month ago
send_stream_test.go 6b22f36d82 add the stylecheck linter 2 months ago
server.go 9d6ae474d7 remove stray GinkgoRecover from the server 3 days ago
server_test.go e65df402dd only create a single session when two Initials arrive at the same time 1 week ago
session.go 8a3bdaa19f Merge pull request #2251 from lucas-clemente/spa 1 week ago
session_test.go 8a3bdaa19f Merge pull request #2251 from lucas-clemente/spa 1 week ago
stream.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 3 months ago
stream_test.go 3266e36811 drop support for gQUIC 1 year ago
streams_map.go 2c2b5da612 Merge pull request #2209 from lucas-clemente/stream-count-errors 1 month ago
streams_map_generic_helper.go b69e2a805f remove nolint commands that show up in GoDoc 3 weeks ago
streams_map_incoming_bidi.go b69e2a805f remove nolint commands that show up in GoDoc 3 weeks ago
streams_map_incoming_generic.go b69e2a805f remove nolint commands that show up in GoDoc 3 weeks ago
streams_map_incoming_generic_test.go 4b58bc0d07 make the stream deletion error message more specific 1 month ago
streams_map_incoming_uni.go b69e2a805f remove nolint commands that show up in GoDoc 3 weeks ago
streams_map_outgoing_bidi.go b69e2a805f remove nolint commands that show up in GoDoc 3 weeks ago
streams_map_outgoing_generic.go b69e2a805f remove nolint commands that show up in GoDoc 3 weeks ago
streams_map_outgoing_generic_test.go 4b58bc0d07 make the stream deletion error message more specific 1 month ago
streams_map_outgoing_uni.go b69e2a805f remove nolint commands that show up in GoDoc 3 weeks ago
streams_map_test.go 2c2b5da612 Merge pull request #2209 from lucas-clemente/stream-count-errors 1 month ago
token_store.go fe0f7aff3b define a quic.TokenStore interface and provide a LRU implementation 3 months ago
token_store_test.go fe0f7aff3b define a quic.TokenStore interface and provide a LRU implementation 3 months ago
window_update_queue.go 8bd6168511 never increase the flow control limit for the crypto stream 1 year ago
window_update_queue_test.go 8bd6168511 never increase the flow control limit for the crypto stream 1 year ago

README.md

A QUIC implementation in pure Go

Godoc Reference Travis Build Status CircleCI Build Status Windows Build Status Code Coverage fuzzit

quic-go is an implementation of the QUIC protocol in Go. It roughly implements the IETF QUIC draft, although we don't fully support any of the draft versions at the moment.

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.13+, with Go modules support enabled.

Installing and updating dependencies:

go get -u ./...

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.