The instructions below are for building QUIC code from the chromium code base. This is pretty much guaranteed to work on any platform Chrome supports, and has extensive troubleshooting documents should you run into problems. If you prefer not checking out all of chrome, you can try the quick and dirty proto-quic lib on github. This is a clone of the chrome code, stripping most of the unnecessary dependencies so is far faster to check out and build, but is not expected to extend to the full chrome platform set so may simply not build on your platform of choice.
A sample server and client implementation are provided in Chromium. To use these you should first have checked out the Chromium source, and then build the binaries:
Download a copy of www.example.org, which we will serve locally using the quic_server binary:
Manually edit index.html and adjust the headers:
In order to run the server, you will need a valid certificate, and a private key in pkcs8 format. If you don't have one, there are scripts you can use to generate them:
In addition to the server's certificate and public key, this script will also generate a CA certificate (
Run the quic_server:
And you should be able to successfully request the file over QUIC using quic_client:
Note that if you let the server's port default to 6121, you must specify the client port because it defaults to 80.
Moreover, if your local machine has multiple loopback addresses (as it would if using both IPv4 and IPv6), you have to pick a specific address.
It remains to be determined whether the latter shortcoming is a bug.
note: both the client and server are meant mainly for integration testing: neither is performant at scale!
To test the same download using chrome,
If you run into troubles, try running the server or client with --v=1. It will increase the logging verbosity and the additional logs will often help expose the underlying problem.