README.md revision b1a7c3f9
1[![Build Status](https://travis-ci.org/litespeedtech/lsquic.svg?branch=master)](https://travis-ci.org/litespeedtech/lsquic) 2[![Build Status](https://api.cirrus-ci.com/github/litespeedtech/lsquic.svg)](https://cirrus-ci.com/github/litespeedtech/lsquic) 3[![Build status](https://ci.appveyor.com/api/projects/status/ij4n3vy343pkgm1j?svg=true)](https://ci.appveyor.com/project/litespeedtech/lsquic) 4 5LiteSpeed QUIC (LSQUIC) Library README 6============================================= 7 8Description 9----------- 10 11LiteSpeed QUIC (LSQUIC) Library is an open-source implementation of QUIC 12and HTTP/3 functionality for servers and clients. Most of the code in this 13distribution is used in our own products: LiteSpeed Web Server, LiteSpeed ADC, 14and OpenLiteSpeed. We think it is free of major problems. Nevertheless, do 15not hesitate to report bugs back to us. Even better, send us fixes and 16improvements! 17 18Currently supported QUIC versions are Q043, Q046, Q050, ID-27, ID-28, ID-29, 19and ID-30. Support for newer versions will be added soon after they are 20released. 21 22Documentation 23------------- 24 25Documentation is available at https://lsquic.readthedocs.io/en/latest/. 26 27In addition, see example programs for API usage and EXAMPLES.txt for 28some compilation and run-time options. 29 30Requirements 31------------ 32 33To build LSQUIC, you need CMake, zlib, and BoringSSL. The example program 34uses libevent to provide the event loop. 35 36Building BoringSSL 37------------------ 38 39BoringSSL is not packaged; you have to build it yourself. The process is 40straightforward. You will need `go` installed. 41 421. Clone BoringSSL by issuing the following command: 43 44``` 45git clone https://boringssl.googlesource.com/boringssl 46cd boringssl 47``` 48 49You may need to install pre-requisites like zlib and libevent. 50 512. Use specific BoringSSL version 52 53``` 54git checkout 251b5169fd44345f455438312ec4e18ae07fd58c 55``` 56 573. Compile the library 58 59``` 60cmake . && make 61``` 62 63Remember where BoringSSL sources are: 64``` 65BORINGSSL=$PWD 66``` 67 68If you want to turn on optimizations, do 69 70``` 71cmake -DCMAKE_BUILD_TYPE=Release . && make 72``` 73 74Building LSQUIC Library 75----------------------- 76 77LSQUIC's `http_client`, `http_server`, and the tests link BoringSSL 78libraries statically. Following previous section, you can build LSQUIC 79as follows: 80 811. Get the source code 82 83``` 84git clone https://github.com/litespeedtech/lsquic.git 85cd lsquic 86git submodule init 87git submodule update 88``` 89 902. Compile the library 91 92 93``` 94# $BORINGSSL is the top-level BoringSSL directory from the previous step 95cmake -DBORINGSSL_DIR=$BORINGSSL . 96make 97``` 98 993. Run tests 100 101``` 102make test 103``` 104 105Building with Docker 106--------- 107The library and the example client and server can be built with Docker. 108 109Initialize Git submodules: 110``` 111cd lsquic 112git submodule init 113git submodule update 114``` 115 116Build the Docker image: 117``` 118docker build -t lsquic . 119``` 120 121Then you can use the examples from the command line. For example: 122``` 123sudo docker run -it --rm lsquic http_client -s www.google.com -p / -o version=Q046 124sudo docker run -p 12345:12345/udp -v /path/to/certs:/mnt/certs -it --rm lsquic http_server -c www.example.com,/mnt/certs/chain,/mnt/certs/key 125``` 126 127Platforms 128--------- 129 130The library has been tested on the following platforms: 131- Linux 132 - i386 133 - x86_64 134 - ARM (Raspberry Pi 3) 135- FreeBSD 136 - i386 137- MacOS 138 - x86_64 139- Android 140 - ARM 141- Windows 142 - x86_64 143 144Have fun, 145 146LiteSpeed QUIC Team. 147 148Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc 149