A QUIC implementation in pure go

Marten Seemann 2133d01956 Merge pull request #2069 from lucas-clemente/grease-transport-parameters 2 days ago
.circleci c00eb1f5b5 add Go mod support 5 months ago
.travis 0d7c6b9d72 run fuzzit 4 days ago
benchmark 5550ba2c3b add a context to Session.Accept{Uni}Stream 2 months ago
docs ef71186402 add gopher-logo 3 years ago
example 84c6a60771 make example server conform with the GET /xxx format used for interop 2 weeks ago
fuzzing 2c22eb644c fuzz the header parsing 5 days ago
http3 566c709548 update H3 ALPN to draft-22 1 month ago
integrationtests 9c00802303 Merge pull request #2023 from lucas-clemente/early-data 1 week ago
internal 481cf25910 grease transport parameters 2 days ago
quictrace c6b8ed9322 update quic-trace to handle CRYPTO frames 2 months ago
.editorconfig 2e1da961c5 add editorconfig 3 years ago
.gitignore 73f83ca4bb add a tracing option to the example server 2 months ago
.golangci.yml 4f6d0e651a implement HTTP/3 4 months ago
.travis.yml 0d7c6b9d72 run fuzzit 4 days ago
Changelog.md dfedde672c add a Changelog entry for the EarlyListener 1 week ago
LICENSE bd3c7a96f9 add Google to license file 2 years ago
README.md 0d7c6b9d72 run fuzzit 4 days ago
appveyor.yml 3b9abbd076 use appveyor-retry for downloading remote resources 1 week ago
buffer_pool.go 33bf79c735 fix packet buffer usage when handling coalesced packets 5 months ago
buffer_pool_test.go 33bf79c735 fix packet buffer usage when handling coalesced packets 5 months ago
client.go b06d7b0cba use the HandshakeComplete() context for accepting sessions in the server 1 week ago
client_test.go b06d7b0cba use the HandshakeComplete() context for accepting sessions in the server 1 week ago
codecov.yml 2c22eb644c fuzz the header parsing 5 days ago
conn.go 34b688b3b9 add a LocalAddr to the Session 2 years ago
conn_test.go 5e01c49fdf send Version Negotiation packets in a separate Go routine 8 months ago
crypto_stream.go e7ed5e3c92 implement the crypto stream for post-handshake crypto messages 6 months ago
crypto_stream_manager.go 2adf923ee6 process the NewSessionTicket TLS message 4 months ago
crypto_stream_manager_test.go 2adf923ee6 process the NewSessionTicket TLS message 4 months ago
crypto_stream_test.go e7ed5e3c92 implement the crypto stream for post-handshake crypto messages 6 months ago
frame_sorter.go 1864e301ef move tracking of the final stream offset to the stream 7 months ago
frame_sorter_test.go 1864e301ef move tracking of the final stream offset to the stream 7 months ago
framer.go c0286b0c2e fix calculation of the length of appended STREAM frames 1 week ago
framer_test.go c0286b0c2e fix calculation of the length of appended STREAM frames 1 week ago
go.mod ce0b1f2736 fix crash when the server disabled session resumption 1 month ago
go.sum ce0b1f2736 fix crash when the server disabled session resumption 1 month ago
interface.go 5cbb8d6597 implement a listener that returns early sessions 1 week ago
mock_ack_frame_source_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_crypto_data_handler_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_crypto_stream_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_frame_source_test.go 109bb3fe62 pass the length of the packet being packet around in the packet packer 4 months ago
mock_multiplexer_test.go 94046cdb4b implement sending of stateless resets 5 months ago
mock_packer_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_packet_handler_manager_test.go 94046cdb4b implement sending of stateless resets 5 months ago
mock_packet_handler_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_quic_session_test.go 5cbb8d6597 implement a listener that returns early sessions 1 week ago
mock_receive_stream_internal_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_sealing_manager_test.go b2d3ef691e use separate sealer interfaces for long and short header packets 2 months ago
mock_send_stream_internal_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_session_runner_test.go b06d7b0cba use the HandshakeComplete() context for accepting sessions in the server 1 week ago
mock_stream_getter_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_stream_internal_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_stream_manager_test.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 2 months ago
mock_stream_sender_test.go 5e34cb1d71 run go generate ./... 5 months ago
mock_unknown_packet_handler_test.go dc75123836 fix race condition when closing the server after a Read failed 3 months ago
mock_unpacker_test.go bb48c9b31a pass the time a packet was received to the short header opener 1 week ago
mockgen.go 67f923c736 return the Opener from the crypto setup 8 months ago
mockgen_private.sh 76d4d43b50 move the mockgen cleanup commands to the mockgen script 1 year ago
multiplexer.go 94046cdb4b implement sending of stateless resets 5 months ago
multiplexer_test.go 94046cdb4b implement sending of stateless resets 5 months ago
packet_handler_map.go dc75123836 fix race condition when closing the server after a Read failed 3 months ago
packet_handler_map_test.go b3fe0fdbf9 only send stateless resets if a stateless reset key is configured 5 months ago
packet_packer.go fc77dee22d add a bug check for consistent payload length in the packet packer 1 week ago
packet_packer_test.go 0ce749b5f1 pack ACK-only packets for all encryption levels 1 month ago
packet_unpacker.go bb48c9b31a pass the time a packet was received to the short header opener 1 week ago
packet_unpacker_test.go bb48c9b31a pass the time a packet was received to the short header opener 1 week ago
quic_suite_test.go 3266e36811 drop support for gQUIC 9 months ago
receive_stream.go 2787a6051a remove some defer statements in the stream 6 months ago
receive_stream_test.go ca939df44e remove the error return value from Stream.CancelRead 6 months ago
send_stream.go 9b5a20e772 remove some unused functions 5 months ago
send_stream_test.go 3372fa794c remove the error return value from Stream.CancelWrite 6 months ago
server.go 7df59b855f remove stray TODO in the server 1 week ago
server_test.go 5cbb8d6597 implement a listener that returns early sessions 1 week ago
session.go 5cbb8d6597 implement a listener that returns early sessions 1 week ago
session_test.go cc76441539 implement a function that blocks until an early session can be used 1 week ago
stream.go 022189dfda rename the RST_STREAM frame to RESET_STREAM frame 9 months ago
stream_test.go 3266e36811 drop support for gQUIC 9 months ago
streams_map.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 2 months ago
streams_map_generic_helper.go 9518c90c0a implement and use the MAX_STREAMS frame 9 months ago
streams_map_incoming_bidi.go 5550ba2c3b add a context to Session.Accept{Uni}Stream 2 months ago
streams_map_incoming_generic.go 5550ba2c3b add a context to Session.Accept{Uni}Stream 2 months ago
streams_map_incoming_generic_test.go 5550ba2c3b add a context to Session.Accept{Uni}Stream 2 months ago
streams_map_incoming_uni.go 5550ba2c3b add a context to Session.Accept{Uni}Stream 2 months ago
streams_map_outgoing_bidi.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 2 months ago
streams_map_outgoing_generic.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 2 months ago
streams_map_outgoing_generic_test.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 2 months ago
streams_map_outgoing_uni.go 2b8cece60a add a context to Session.Open{Uni}StreamSync 2 months ago
streams_map_test.go 5550ba2c3b add a context to Session.Accept{Uni}Stream 2 months ago
window_update_queue.go 8bd6168511 never increase the flow control limit for the crypto stream 11 months ago
window_update_queue_test.go 8bd6168511 never increase the flow control limit for the crypto stream 11 months 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.12+, 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.