A QUIC implementation in pure go

Marten Seemann bbe8c64cb7 release 0.10 11 months ago
.circleci e23c08eef9 update CIs to Go 1.11 1 year ago
.travis a3821af65a don't run Chrome integration tests on Travis 1 year ago
benchmark 8b2992a243 split the Session.Close(error) in Close() and CloseWithError(error) 1 year ago
docs ef71186402 add gopher-logo 3 years ago
example 7a566d9f28 Update certs 1 year ago
h2quic e23c08eef9 update CIs to Go 1.11 1 year ago
integrationtests 91d65baf1b add gQUIC 44 to the supported versions 11 months ago
internal 91d65baf1b add gQUIC 44 to the supported versions 11 months ago
qerr 948eef3e42 create a logger interface and use it everywhere 1 year ago
vendor e34256beed update mint 1 year ago
.editorconfig 2e1da961c5 add editorconfig 3 years ago
.gitignore c3da72d498 add debug.test (dvelve output) to gitignore 3 years ago
.gometalinter.json e23c08eef9 update CIs to Go 1.11 1 year ago
.travis.yml e23c08eef9 update CIs to Go 1.11 1 year ago
Changelog.md bbe8c64cb7 release 0.10 11 months ago
LICENSE bd3c7a96f9 add Google to license file 2 years ago
README.md f1b49c2280 add a CircleCI badge to the README 1 year ago
appveyor.yml e23c08eef9 update CIs to Go 1.11 1 year ago
buffer_pool.go 07b8821ef7 use pointer to byte slices in the buffer pool 1 year ago
buffer_pool_test.go 07b8821ef7 use pointer to byte slices in the buffer pool 1 year ago
client.go c0d4f00b20 implement gQUIC 44 11 months ago
client_test.go c0d4f00b20 implement gQUIC 44 11 months ago
codecov.yml 7346d12d6c use Genny to generate typed lists, based on Go standard library code 1 year ago
conn.go 34b688b3b9 add a LocalAddr to the Session 2 years ago
conn_test.go 25a6dc9654 implement stateless handling of Initial packets for the TLS server 1 year ago
crypto_stream.go dbada7ad02 store stream data, not STREAM frames, in the streamFrameSorter 1 year ago
crypto_stream_test.go dbada7ad02 store stream data, not STREAM frames, in the streamFrameSorter 1 year ago
frame_sorter.go 74662e8dae rename the streamFrameSorter to frameSorter 1 year ago
frame_sorter_test.go 74662e8dae rename the streamFrameSorter to frameSorter 1 year ago
interface.go 91d65baf1b add gQUIC 44 to the supported versions 11 months ago
mint_utils.go f88b7bb175 implement the new Retry mechanism 1 year ago
mint_utils_test.go f88b7bb175 implement the new Retry mechanism 1 year ago
mock_crypto_stream_test.go d330fda94c also use the onHasStreamData callback for the crypto stream 1 year ago
mock_gquic_aead_test.go 302d2a1715 don't use trial decryption for IETF QUIC 1 year ago
mock_multiplexer_test.go c8d20e86d7 move listening from the multiplexer to the packet handler map 1 year ago
mock_packet_handler_manager_test.go ad5a3e2fa0 also use the multiplexer for the server 1 year ago
mock_packet_handler_test.go ad5a3e2fa0 also use the multiplexer for the server 1 year ago
mock_quic_aead_test.go 302d2a1715 don't use trial decryption for IETF QUIC 1 year ago
mock_quic_session_test.go f88b7bb175 implement the new Retry mechanism 1 year ago
mock_receive_stream_internal_test.go e802491a8f create internal interfaces for send and receive streams 1 year ago
mock_send_stream_internal_test.go e802491a8f create internal interfaces for send and receive streams 1 year ago
mock_session_runner_test.go b3fd768a61 use a smaller packetHandler interface 1 year ago
mock_stream_frame_source_test.go d330fda94c also use the onHasStreamData callback for the crypto stream 1 year ago
mock_stream_getter_test.go e802491a8f create internal interfaces for send and receive streams 1 year ago
mock_stream_internal_test.go 8a3f807a12 immediately delete a stream when it is completed 1 year ago
mock_stream_manager_test.go da49295b52 expose methods for opening and accepting unidirectional streams 1 year ago
mock_stream_sender_test.go 2e8a5807ba queue stream-level window updates from the flow controller directly 1 year ago
mock_unknown_packet_handler_test.go ad5a3e2fa0 also use the multiplexer for the server 1 year ago
mock_unpacker_test.go a298bd01c9 use a gomock packet unpacker 1 year ago
mockgen.go 76d4d43b50 move the mockgen cleanup commands to the mockgen script 1 year ago
mockgen_private.sh 76d4d43b50 move the mockgen cleanup commands to the mockgen script 1 year ago
multiplexer.go ad5a3e2fa0 also use the multiplexer for the server 1 year ago
multiplexer_test.go c8d20e86d7 move listening from the multiplexer to the packet handler map 1 year ago
packet_handler_map.go c0d4f00b20 implement gQUIC 44 11 months ago
packet_handler_map_test.go 46f8c07daa improve the version negotiation integration test 11 months ago
packet_number_generator.go 25a6dc9654 implement stateless handling of Initial packets for the TLS server 1 year ago
packet_number_generator_test.go 25a6dc9654 implement stateless handling of Initial packets for the TLS server 1 year ago
packet_packer.go 01100c56df implement packing of packets for gQUIC 44 11 months ago
packet_packer_test.go 01100c56df implement packing of packets for gQUIC 44 11 months ago
packet_unpacker.go 38efa84e9c use in place decryption for unpacking packets 1 year ago
packet_unpacker_test.go 302d2a1715 don't use trial decryption for IETF QUIC 1 year ago
quic_suite_test.go 759b0d87b1 refactor packet unpacking 1 year ago
receive_stream.go 74662e8dae rename the streamFrameSorter to frameSorter 1 year ago
receive_stream_test.go 5f5bb1f700 allow empty STREAM frames at arbitrary offsets 1 year ago
send_stream.go 50397a979c only send BLOCKED frames if there is more data to send 1 year ago
send_stream_test.go 50397a979c only send BLOCKED frames if there is more data to send 1 year ago
server.go c0d4f00b20 implement gQUIC 44 11 months ago
server_session.go c0d4f00b20 implement gQUIC 44 11 months ago
server_session_test.go c0d4f00b20 implement gQUIC 44 11 months ago
server_test.go c0d4f00b20 implement gQUIC 44 11 months ago
server_tls.go 2c75b795ae move adding of stateless reset tokens to the transport parameter struct 1 year ago
server_tls_test.go 9e83c96598 Merge pull request #1486 from lucas-clemente/send-ietf-quic-vnp 1 year ago
session.go c0d4f00b20 implement gQUIC 44 11 months ago
session_test.go c0d4f00b20 implement gQUIC 44 11 months ago
stream.go 83be64bb73 fix deadlock between onStreamCompleted and Session.Close 1 year ago
stream_framer.go 04147d86da rename the cryptoStreamI interface to cryptoStream 1 year ago
stream_framer_test.go ca7291e8cf send retransmission as separate packets 1 year ago
stream_test.go 50397a979c only send BLOCKED frames if there is more data to send 1 year ago
streams_map.go b40942d39e send stream counts, not stream IDs, in the transport parameters 1 year ago
streams_map_generic_helper.go f8d28a96fe close all streams when closing the IETF QUIC streams map 1 year ago
streams_map_incoming_bidi.go f8d28a96fe close all streams when closing the IETF QUIC streams map 1 year ago
streams_map_incoming_generic.go f8d28a96fe close all streams when closing the IETF QUIC streams map 1 year ago
streams_map_incoming_generic_test.go f8d28a96fe close all streams when closing the IETF QUIC streams map 1 year ago
streams_map_incoming_uni.go f8d28a96fe close all streams when closing the IETF QUIC streams map 1 year ago
streams_map_legacy.go 245af2c596 make the number of incoming streams configurable, for gQUIC 1 year ago
streams_map_legacy_test.go 286a51bcc0 run staticcheck in gometalinter 1 year ago
streams_map_outgoing_bidi.go f8d28a96fe close all streams when closing the IETF QUIC streams map 1 year ago
streams_map_outgoing_generic.go f8d28a96fe close all streams when closing the IETF QUIC streams map 1 year ago
streams_map_outgoing_generic_test.go f8d28a96fe close all streams when closing the IETF QUIC streams map 1 year ago
streams_map_outgoing_uni.go f8d28a96fe close all streams when closing the IETF QUIC streams map 1 year ago
streams_map_test.go b40942d39e send stream counts, not stream IDs, in the transport parameters 1 year ago
window_update_queue.go 04147d86da rename the cryptoStreamI interface to cryptoStream 1 year ago
window_update_queue_test.go 08160ab18f queue connection-level window updates from the flow controller directly 1 year 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.

Roadmap

quic-go is compatible with the current version(s) of Google Chrome and QUIC as deployed on Google's servers. We're actively tracking the development of the Chrome code to ensure compatibility as the protocol evolves. In that process, we're dropping support for old QUIC versions. As Google's QUIC versions are expected to converge towards the IETF QUIC draft, quic-go will eventually implement that draft.

Guides

We currently support Go 1.9+.

Installing and updating dependencies:

go get -t -u ./...

Running tests:

go test ./...

Running the example server

go run example/main.go -www /var/www/

Using the quic_client from chromium:

quic_client --host=127.0.0.1 --port=6121 --v=1 https://quic.clemente.io

Using Chrome:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/chrome --no-proxy-server --enable-quic --origin-to-force-quic-on=quic.clemente.io:443 --host-resolver-rules='MAP quic.clemente.io:443 127.0.0.1:6121' https://quic.clemente.io

QUIC without HTTP/2

Take a look at this echo example.

Using the example client

go run example/client/main.go https://clemente.io

Usage

As a server

See the example server or try out Caddy (from version 0.9, instructions here). Starting a QUIC server is very similar to the standard lib http in go:

http.Handle("/", http.FileServer(http.Dir(wwwDir)))
h2quic.ListenAndServeQUIC("localhost:4242", "/path/to/cert/chain.pem", "/path/to/privkey.pem", nil)

As a client

See the example client. Use a h2quic.RoundTripper as a Transport in a http.Client.

http.Client{
  Transport: &h2quic.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.