Use the 622ca23d
branch of quic-go, commit at Jan 31, 2021
- The TLS Version for this branch is:
[TLS dev version (WIP)]
(0x51474fff). But for release v0.19.3, the TLS version is[draft-32 0xcaba7ada draft-29]
. So, we should consider switching to release branch, instead of main branch when we have time.
The Changelog.md
of this version is not correct. This version is at newer than v0.19.3 version, support QUIC-29/QUIC-32.
Timeline:
- Draft 32: v0.19.0, 11-13-2020
- Draft 29: v0.17.1, 06-20-2020
This version suppoert go
1.14, 1.15, and 1.16
Compatible Wireshark
version: 3.3.1 (v3.3.1-0-gd64aca7966e2)
Server
go run main.go
# using -v will increate the latency a lot
go run main.go -v
Client
# kaiyhou_client_go
go run main.go -insecure -interval 5 -numRequest 5 -keylog=key1.key -v -p https://localhost:6121/demo/echo
go run main.go ... -body "echo body" https://localhost:6121/demo/echo
go run main.go ... https://localhost:6162/demo/tiles
go run main.go ... https://localhost:6121/demo/tile
# kaiyhou_client_tls
go run main.go -insecure -interval 5 -numRequest 5 https://www.google.com
# kaiyhou_client_tcp
go run main.go -interval 5 -numRequest 5 http://www.google.com
Diff the following files:
- http3/client.go
- http3/roundtrip.go
- interface.go
- session.go
if a H3 client is timeout, we cannot resue it because
- The lower level session is cancelled
- The
streams_map_outgoing_bidi.go
still records the error msg of timeout - The H3 client will get the error msg from stream and kill itself
This is not a problem when we manual close the H3 client. Because if will empty the clients array in the H3 roundtrip. Thus will generate a new session when reuse the H3 client when call RoundTrip.
quic-go is an implementation of the QUIC protocol in Go. It implements the IETF QUIC draft-29 and draft-32.
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.
When using quic-go as a library, please always use a tagged release. Only these releases use the official draft version numbers.
We currently support Go 1.14+, with Go modules support enabled.
Running tests:
go test ./...
Take a look at this echo example.
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)
See the example client. Use a http3.RoundTripper
as a Transport
in a http.Client
.
http.Client{
Transport: &http3.RoundTripper{},
}
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.