Go Shell
Latest commit 6f0a027 Jul 6, 2018
Permalink
Failed to load latest commit information.
.circleci update Go to 1.9.7 and 1.10.3 on the CIs Jun 16, 2018
.travis don't run Chrome integration tests on Travis Jun 2, 2018
benchmark split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
docs add gopher-logo May 3, 2016
example Update certs Jun 9, 2018
h2quic pass an error code to Session.CloseWithError Jul 6, 2018
integrationtests split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
internal make the connection ID length configurable Jul 3, 2018
qerr create a logger interface and use it everywhere Apr 4, 2018
vendor update mint Feb 25, 2018
.editorconfig add editorconfig Apr 15, 2016
.gitignore add debug.test (dvelve output) to gitignore May 3, 2016
.gometalinter.json run gosimple in gometalinter Feb 23, 2018
.travis.yml update Go to 1.9.7 and 1.10.3 on the CIs Jun 16, 2018
Changelog.md add a Changelog entry Jul 6, 2018
LICENSE add Google to license file Dec 14, 2016
README.md add a CircleCI badge to the README Jun 2, 2018
appveyor.yml update Go to 1.9.7 and 1.10.3 on the CIs Jun 16, 2018
buffer_pool.go use pointer to byte slices in the buffer pool Feb 23, 2018
buffer_pool_test.go use pointer to byte slices in the buffer pool Feb 23, 2018
client.go split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
client_multiplexer.go split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
client_multiplexer_test.go split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
client_test.go split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
codecov.yml use Genny to generate typed lists, based on Go standard library code Mar 30, 2018
conn.go add a LocalAddr to the Session Mar 9, 2017
conn_test.go implement stateless handling of Initial packets for the TLS server Dec 8, 2017
crypto_stream.go also use the onHasStreamData callback for the crypto stream Jan 9, 2018
crypto_stream_test.go also use the onHasStreamData callback for the crypto stream Jan 9, 2018
interface.go pass an error code to Session.CloseWithError Jul 6, 2018
mint_utils.go fix logging of connection IDs for statelessly handled packets May 30, 2018
mint_utils_test.go use varint packet numbers in IETF QUIC headers Jun 6, 2018
mock_crypto_stream_test.go also use the onHasStreamData callback for the crypto stream Jan 9, 2018
mock_gquic_aead_test.go don't use trial decryption for IETF QUIC Mar 31, 2018
mock_multiplexer_test.go make the connection ID length configurable Jul 3, 2018
mock_packet_handler_manager_test.go split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
mock_quic_aead_test.go don't use trial decryption for IETF QUIC Mar 31, 2018
mock_quic_session_test.go pass an error code to Session.CloseWithError Jul 6, 2018
mock_receive_stream_internal_test.go create internal interfaces for send and receive streams Jan 10, 2018
mock_send_stream_internal_test.go create internal interfaces for send and receive streams Jan 10, 2018
mock_session_runner_test.go use a smaller packetHandler interface Jun 23, 2018
mock_stream_frame_source_test.go also use the onHasStreamData callback for the crypto stream Jan 9, 2018
mock_stream_getter_test.go create internal interfaces for send and receive streams Jan 10, 2018
mock_stream_internal_test.go immediately delete a stream when it is completed Jan 3, 2018
mock_stream_manager_test.go expose methods for opening and accepting unidirectional streams Feb 21, 2018
mock_stream_sender_test.go queue stream-level window updates from the flow controller directly May 8, 2018
mock_unpacker_test.go use a gomock packet unpacker Mar 31, 2018
mockgen.go add some more tests for the client multiplexer Jul 3, 2018
mockgen_private.sh fix mockgen script which caused a probem with the vendored curve25519 Jan 2, 2018
packet_handler_map.go split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
packet_handler_map_test.go split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
packet_number_generator.go implement stateless handling of Initial packets for the TLS server Dec 8, 2017
packet_number_generator_test.go implement stateless handling of Initial packets for the TLS server Dec 8, 2017
packet_packer.go refactor header parsing in a version independent and dependent part Jul 1, 2018
packet_packer_test.go implement parsing of headers with different connection ID lengths Jul 3, 2018
packet_unpacker.go use in place decryption for unpacking packets Apr 4, 2018
packet_unpacker_test.go don't use trial decryption for IETF QUIC Mar 31, 2018
quic_suite_test.go refactor packet unpacking Dec 8, 2017
receive_stream.go fix deadlock between onStreamCompleted and Session.Close Jun 1, 2018
receive_stream_test.go allow empty STREAM frames at arbitrary offsets May 11, 2018
send_stream.go fix deadlock between onStreamCompleted and Session.Close Jun 1, 2018
send_stream_test.go run ineffassign in gometalinter Feb 23, 2018
server.go split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
server_test.go split the Session.Close(error) in Close() and CloseWithError(error) Jul 6, 2018
server_tls.go remove unused nullAEAD struct in the quic package Jul 6, 2018
server_tls_test.go use a random length destination connection ID on the Initial packet Jul 3, 2018
session.go pass an error code to Session.CloseWithError Jul 6, 2018
session_test.go pass an error code to Session.CloseWithError Jul 6, 2018
stream.go fix deadlock between onStreamCompleted and Session.Close Jun 1, 2018
stream_frame_sorter.go allow empty STREAM frames at arbitrary offsets May 11, 2018
stream_frame_sorter_test.go allow empty STREAM frames at arbitrary offsets May 11, 2018
stream_framer.go send retransmission as separate packets Feb 26, 2018
stream_framer_test.go send retransmission as separate packets Feb 26, 2018
stream_test.go immediately delete a stream when it is completed Jan 3, 2018
streams_map.go send stream counts, not stream IDs, in the transport parameters Mar 16, 2018
streams_map_generic_helper.go close all streams when closing the IETF QUIC streams map Apr 17, 2018
streams_map_incoming_bidi.go close all streams when closing the IETF QUIC streams map Apr 17, 2018
streams_map_incoming_generic.go close all streams when closing the IETF QUIC streams map Apr 17, 2018
streams_map_incoming_generic_test.go close all streams when closing the IETF QUIC streams map Apr 17, 2018
streams_map_incoming_uni.go close all streams when closing the IETF QUIC streams map Apr 17, 2018
streams_map_legacy.go make the number of incoming streams configurable, for gQUIC Feb 23, 2018
streams_map_legacy_test.go run staticcheck in gometalinter Feb 23, 2018
streams_map_outgoing_bidi.go close all streams when closing the IETF QUIC streams map Apr 17, 2018
streams_map_outgoing_generic.go close all streams when closing the IETF QUIC streams map Apr 17, 2018
streams_map_outgoing_generic_test.go close all streams when closing the IETF QUIC streams map Apr 17, 2018
streams_map_outgoing_uni.go close all streams when closing the IETF QUIC streams map Apr 17, 2018
streams_map_test.go send stream counts, not stream IDs, in the transport parameters Mar 16, 2018
window_update_queue.go queue connection-level window updates from the flow controller directly May 8, 2018
window_update_queue_test.go queue connection-level window updates from the flow controller directly May 8, 2018

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.