A QUIC implementation in pure go

Marten Seemann ae685f9d42 Merge pull request #1869 from lucas-clemente/http-gzip 4 days ago
.circleci c00eb1f5b5 add Go mod support 1 month ago
.travis b52d45a1e5 use GolangCI-Lint instead of gometalinter 1 month ago
benchmark 8b2992a243 split the Session.Close(error) in Close() and CloseWithError(error) 9 months ago
docs ef71186402 add gopher-logo 3 years ago
example 4f6d0e651a implement HTTP/3 1 week ago
http3 de6ab88437 add support for gzipped HTTP/3 requests 4 days ago
integrationtests de6ab88437 add support for gzipped HTTP/3 requests 4 days ago
internal 450d777a51 use the timer granularity as a minimum for the loss detection timer 5 days ago
.editorconfig 2e1da961c5 add editorconfig 3 years ago
.gitignore c3da72d498 add debug.test (dvelve output) to gitignore 3 years ago
.golangci.yml 4f6d0e651a implement HTTP/3 1 week ago
.travis.yml c00eb1f5b5 add Go mod support 1 month ago
Changelog.md 5080afeac3 add a Changelog entry for HTTP/3 1 week ago
LICENSE bd3c7a96f9 add Google to license file 2 years ago
README.md 4f6d0e651a implement HTTP/3 1 week ago
appveyor.yml c00eb1f5b5 add Go mod support 1 month ago
buffer_pool.go 33bf79c735 fix packet buffer usage when handling coalesced packets 1 month ago
buffer_pool_test.go 33bf79c735 fix packet buffer usage when handling coalesced packets 1 month ago
client.go 94046cdb4b implement sending of stateless resets 1 month ago
client_test.go 94046cdb4b implement sending of stateless resets 1 month ago
codecov.yml de6ab88437 add support for gzipped HTTP/3 requests 4 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 4 months ago
crypto_stream.go e7ed5e3c92 implement the crypto stream for post-handshake crypto messages 2 months ago
crypto_stream_manager.go 2adf923ee6 process the NewSessionTicket TLS message 2 weeks ago
crypto_stream_manager_test.go 2adf923ee6 process the NewSessionTicket TLS message 2 weeks ago
crypto_stream_test.go e7ed5e3c92 implement the crypto stream for post-handshake crypto messages 2 months ago
frame_sorter.go 1864e301ef move tracking of the final stream offset to the stream 2 months ago
frame_sorter_test.go 1864e301ef move tracking of the final stream offset to the stream 2 months ago
framer.go 82508f1562 use tls-tris instead of mint 5 months ago
framer_test.go fbe8844006 remove some unneccessary type conversions 1 month ago
go.mod 4f6d0e651a implement HTTP/3 1 week ago
go.sum 4f6d0e651a implement HTTP/3 1 week ago
interface.go a5e9d34ebd improve the documentation for Stream.Context() 2 weeks ago
mock_ack_frame_source_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_crypto_data_handler_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_crypto_stream_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_frame_source_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_multiplexer_test.go 94046cdb4b implement sending of stateless resets 1 month ago
mock_packer_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_packet_handler_manager_test.go 94046cdb4b implement sending of stateless resets 1 month ago
mock_packet_handler_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_quic_session_test.go 09574a6653 expose the tls.ConnectionState 2 weeks ago
mock_receive_stream_internal_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_sealing_manager_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_send_stream_internal_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_session_runner_test.go 94046cdb4b implement sending of stateless resets 1 month ago
mock_stream_getter_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_stream_internal_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_stream_manager_test.go 51c9c42adc reject transport parameters with too large stream counts 2 weeks ago
mock_stream_sender_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_unknown_packet_handler_test.go 5e34cb1d71 run go generate ./... 1 month ago
mock_unpacker_test.go 5e34cb1d71 run go generate ./... 1 month ago
mockgen.go 67f923c736 return the Opener from the crypto setup 4 months ago
mockgen_private.sh 76d4d43b50 move the mockgen cleanup commands to the mockgen script 8 months ago
multiplexer.go 94046cdb4b implement sending of stateless resets 1 month ago
multiplexer_test.go 94046cdb4b implement sending of stateless resets 1 month ago
packet_handler_map.go b3fe0fdbf9 only send stateless resets if a stateless reset key is configured 1 month ago
packet_handler_map_test.go b3fe0fdbf9 only send stateless resets if a stateless reset key is configured 1 month ago
packet_packer.go b5336be518 rename retransmittable to ack-eliciting 1 week ago
packet_packer_test.go b5336be518 rename retransmittable to ack-eliciting 1 week ago
packet_unpacker.go 855b643c7c move frame parsing to the session 3 months ago
packet_unpacker_test.go 28ed85b9c6 move cutting of coalesced packets to the wire package 1 month ago
quic_suite_test.go 3266e36811 drop support for gQUIC 5 months ago
receive_stream.go 2787a6051a remove some defer statements in the stream 2 months ago
receive_stream_test.go ca939df44e remove the error return value from Stream.CancelRead 2 months ago
send_stream.go 9b5a20e772 remove some unused functions 1 month ago
send_stream_test.go 3372fa794c remove the error return value from Stream.CancelWrite 2 months ago
server.go 94046cdb4b implement sending of stateless resets 1 month ago
server_test.go 7b569ba071 fix flaky server unit test 2 weeks ago
session.go b5336be518 rename retransmittable to ack-eliciting 1 week ago
session_test.go b5336be518 rename retransmittable to ack-eliciting 1 week ago
stream.go 022189dfda rename the RST_STREAM frame to RESET_STREAM frame 5 months ago
stream_test.go 3266e36811 drop support for gQUIC 5 months ago
streams_map.go 51c9c42adc reject transport parameters with too large stream counts 2 weeks ago
streams_map_generic_helper.go 9518c90c0a implement and use the MAX_STREAMS frame 5 months ago
streams_map_incoming_bidi.go f17ddffb70 don't delete a stream until it has been accepted 2 months ago
streams_map_incoming_generic.go f17ddffb70 don't delete a stream until it has been accepted 2 months ago
streams_map_incoming_generic_test.go f17ddffb70 don't delete a stream until it has been accepted 2 months ago
streams_map_incoming_uni.go f17ddffb70 don't delete a stream until it has been accepted 2 months ago
streams_map_outgoing_bidi.go 9c09e84765 use IETF QUIC transport error codes 1 month ago
streams_map_outgoing_generic.go 9c09e84765 use IETF QUIC transport error codes 1 month ago
streams_map_outgoing_generic_test.go 9c09e84765 use IETF QUIC transport error codes 1 month ago
streams_map_outgoing_uni.go 9c09e84765 use IETF QUIC transport error codes 1 month ago
streams_map_test.go 51c9c42adc reject transport parameters with too large stream counts 2 weeks ago
window_update_queue.go 8bd6168511 never increase the flow control limit for the crypto stream 7 months ago
window_update_queue_test.go 8bd6168511 never increase the flow control limit for the crypto stream 7 months ago

README.md

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 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+.

Installing and updating dependencies:

go get -t -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.