A QUIC implementation in pure go

Marten Seemann 2ef8429ce1 Merge pull request #2166 from juliens/alt-svc 4 days ago
.circleci 761b6d50f7 update CIs to Go 1.13 1 month ago
.travis 669138ee60 update Fuzzit binary 1 month ago
benchmark 305d6e0fbe make the benchmark suite compatible with Go 1.13 1 month ago
docs ef71186402 add gopher-logo 3 years ago
example 84c6a60771 make example server conform with the GET /xxx format used for interop 2 months ago
fuzzing 5ea33cd31e implement a buffer pool for STREAM frames 1 month ago
http3 2ef8429ce1 Merge pull request #2166 from juliens/alt-svc 4 days ago
integrationtests 6b22f36d82 add the stylecheck linter 1 month ago
internal 2ef8429ce1 Merge pull request #2166 from juliens/alt-svc 4 days ago
quictrace 6b22f36d82 add the stylecheck linter 1 month ago
.editorconfig 2e1da961c5 add editorconfig 3 years ago
.gitignore 1ff6c04bdd add .gitignore entries for fuzzing 1 month ago
.golangci.yml 6b22f36d82 add the stylecheck linter 1 month ago
.travis.yml 1350f499b5 update GolangCI-Lint to v1.18.0 1 month ago
Changelog.md b60d6ba42d add a Changelog entry for the TokenStore 2 months ago
LICENSE bd3c7a96f9 add Google to license file 2 years ago
README.md 08ab7fb0df Make Go 1.13 requirement more explicit in README 2 weeks ago
appveyor.yml 761b6d50f7 update CIs to Go 1.13 1 month ago
buffer_pool.go 33bf79c735 fix packet buffer usage when handling coalesced packets 7 months ago
buffer_pool_test.go 33bf79c735 fix packet buffer usage when handling coalesced packets 7 months ago
client.go 6b22f36d82 add the stylecheck linter 1 month ago
client_test.go 9c97a5e95f add the TokenStore to the quic.Config, store received tokens 2 months ago
closed_session.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
closed_session_test.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
codecov.yml 2c22eb644c fuzz the header parsing 2 months ago
conn.go 34b688b3b9 add a LocalAddr to the Session 2 years ago
conn_test.go 81be522bf3 identify connections by their local addr when adding to the multiplexer 1 month ago
crypto_stream.go ba1bcf6e0c use the STREAM frame buffer for receiving data 1 month ago
crypto_stream_manager.go 2adf923ee6 process the NewSessionTicket TLS message 6 months ago
crypto_stream_manager_test.go 2adf923ee6 process the NewSessionTicket TLS message 6 months ago
crypto_stream_test.go e622207822 assemble ackhandler.Frames, not wire.Frames, when packing a packet 1 month ago
frame_sorter.go 6b22f36d82 add the stylecheck linter 1 month ago
frame_sorter_test.go 6b22f36d82 add the stylecheck linter 1 month ago
framer.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 1 month ago
framer_test.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 1 month ago
go.mod 88d1c78dab improve error messages on ALPN mismatches 1 week ago
go.sum 88d1c78dab improve error messages on ALPN mismatches 1 week ago
interface.go 9c97a5e95f add the TokenStore to the quic.Config, store received tokens 2 months ago
mock_ack_frame_source_test.go 5e34cb1d71 run go generate ./... 7 months ago
mock_crypto_data_handler_test.go 5e34cb1d71 run go generate ./... 7 months ago
mock_crypto_stream_test.go 5e34cb1d71 run go generate ./... 7 months ago
mock_frame_source_test.go e622207822 assemble ackhandler.Frames, not wire.Frames, when packing a packet 1 month ago
mock_multiplexer_test.go 94046cdb4b implement sending of stateless resets 7 months ago
mock_packer_test.go 1d392b4276 retransmit frames instead of packets 1 month ago
mock_packet_handler_manager_test.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
mock_packet_handler_test.go 5e34cb1d71 run go generate ./... 7 months ago
mock_quic_session_test.go 5cbb8d6597 implement a listener that returns early sessions 2 months ago
mock_receive_stream_internal_test.go 5e34cb1d71 run go generate ./... 7 months ago
mock_sealing_manager_test.go b2d3ef691e use separate sealer interfaces for long and short header packets 3 months ago
mock_send_stream_internal_test.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 1 month ago
mock_session_runner_test.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
mock_stream_getter_test.go 5e34cb1d71 run go generate ./... 7 months ago
mock_stream_internal_test.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 1 month ago
mock_stream_manager_test.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 3 months ago
mock_stream_sender_test.go 5e34cb1d71 run go generate ./... 7 months ago
mock_token_store_test.go 9c97a5e95f add the TokenStore to the quic.Config, store received tokens 2 months ago
mock_unknown_packet_handler_test.go dc75123836 fix race condition when closing the server after a Read failed 5 months ago
mock_unpacker_test.go bb48c9b31a pass the time a packet was received to the short header opener 2 months ago
mockgen.go 9c97a5e95f add the TokenStore to the quic.Config, store received tokens 2 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 weeks ago
multiplexer_test.go 81be522bf3 identify connections by their local addr when adding to the multiplexer 1 month ago
packet_handler_map.go 35e3455a97 Merge pull request #2147 from lucas-clemente/deleting-sessions 2 weeks ago
packet_handler_map_test.go da0288b273 destroy sessions when deleting them from the packet handler map 3 weeks ago
packet_packer.go ab2b26a5cb add the unparam linter 1 month ago
packet_packer_test.go 5ea33cd31e implement a buffer pool for STREAM frames 1 month ago
packet_unpacker.go 6b22f36d82 add the stylecheck linter 1 month ago
packet_unpacker_test.go bb48c9b31a pass the time a packet was received to the short header opener 2 months ago
quic_suite_test.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
receive_stream.go 6b22f36d82 add the stylecheck linter 1 month ago
receive_stream_test.go 6b22f36d82 add the stylecheck linter 1 month ago
retransmission_queue.go f49451ce3c queue lost STREAM frames in the stream's retransmission queue 1 month ago
retransmission_queue_test.go f49451ce3c queue lost STREAM frames in the stream's retransmission queue 1 month ago
send_queue.go 00c19f7241 implement a send queue to send packet asynchronously 1 month ago
send_queue_test.go 00c19f7241 implement a send queue to send packet asynchronously 1 month ago
send_stream.go 6b22f36d82 add the stylecheck linter 1 month ago
send_stream_test.go 6b22f36d82 add the stylecheck linter 1 month ago
server.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
server_test.go 5cbb8d6597 implement a listener that returns early sessions 2 months ago
session.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
session_test.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
stream.go 0edb3f2b93 return ackhandler.Frames from sendStream.popStreamFrame 1 month ago
stream_test.go 3266e36811 drop support for gQUIC 11 months ago
streams_map.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 3 months ago
streams_map_generic_helper.go ab2b26a5cb add the unparam linter 1 month ago
streams_map_incoming_bidi.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
streams_map_incoming_generic.go ab2b26a5cb add the unparam linter 1 month ago
streams_map_incoming_generic_test.go 5550ba2c3b add a context to Session.Accept{Uni}Stream 3 months ago
streams_map_incoming_uni.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
streams_map_outgoing_bidi.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
streams_map_outgoing_generic.go ab2b26a5cb add the unparam linter 1 month ago
streams_map_outgoing_generic_test.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 3 months ago
streams_map_outgoing_uni.go 03483d5e71 refactor how sessions are deleted 3 weeks ago
streams_map_test.go 5550ba2c3b add a context to Session.Accept{Uni}Stream 3 months ago
token_store.go fe0f7aff3b define a quic.TokenStore interface and provide a LRU implementation 2 months ago
token_store_test.go fe0f7aff3b define a quic.TokenStore interface and provide a LRU implementation 2 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.

Google QUIC

quic-go used to support both the QUIC versions supported by Google Chrome and QUIC as deployed on Google's servers, as well as IETF QUIC. Due to the divergence of the two protocols, we decided to not support both versions any more.

The master branch only supports IETF QUIC. For Google QUIC support, please refer to the gquic branch.

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.