README.md revision 96214405
1[![Build Status](https://travis-ci.com/litespeedtech/lsquic.svg?branch=master)](https://travis-ci.com/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. 15 16Currently supported QUIC versions are Q043, Q046, Q050, ID-27, ID-28, ID-29, 17and ID-32. Support for newer versions is added soon after they are released. 18 19Documentation 20------------- 21 22Documentation is available at https://lsquic.readthedocs.io/en/latest/. 23 24In addition, see example programs for API usage and EXAMPLES.txt for 25some compilation and run-time options. 26 27Requirements 28------------ 29 30To build LSQUIC, you need CMake, zlib, and BoringSSL. The example program 31uses libevent to provide the event loop. 32 33Building BoringSSL 34------------------ 35 36BoringSSL is not packaged; you have to build it yourself. The process is 37straightforward. You will need `go` installed. 38 391. Clone BoringSSL by issuing the following command: 40 41``` 42git clone https://boringssl.googlesource.com/boringssl 43cd boringssl 44``` 45 46You may need to install pre-requisites like zlib and libevent. 47 482. Use specific BoringSSL version 49 50``` 51git checkout b117a3a0b7bd11fe6ebd503ec6b45d6b910b41a1 52``` 53 543. Compile the library 55 56``` 57cmake . && make 58``` 59 60Remember where BoringSSL sources are: 61``` 62BORINGSSL=$PWD 63``` 64 65If you want to turn on optimizations, do 66 67``` 68cmake -DCMAKE_BUILD_TYPE=Release . && make 69``` 70 71If you want to build as a library, (necessary to build lsquic itself 72as as shared library) do: 73 74``` 75cmake -DBUILD_SHARED_LIBS=1 . && make 76``` 77 78Building LSQUIC Library 79----------------------- 80 81LSQUIC's `http_client`, `http_server`, and the tests link BoringSSL 82libraries statically. Following previous section, you can build LSQUIC 83as follows: 84 851. Get the source code 86 87``` 88git clone https://github.com/litespeedtech/lsquic.git 89cd lsquic 90git submodule init 91git submodule update 92``` 93 942. Compile the library 95 96Statically: 97 98 99``` 100# $BORINGSSL is the top-level BoringSSL directory from the previous step 101cmake -DBORINGSSL_DIR=$BORINGSSL . 102make 103``` 104 105As a dynamic library: 106 107``` 108cmake -DLSQUIC_SHARED_LIB=1 -DBORINGSSL_DIR=$BORINGSSL . 109make 110``` 111 112 1133. Run tests 114 115``` 116make test 117``` 118 119Building with Docker 120--------- 121The library and the example client and server can be built with Docker. 122 123Initialize Git submodules: 124``` 125cd lsquic 126git submodule init 127git submodule update 128``` 129 130Build the Docker image: 131``` 132docker build -t lsquic . 133``` 134 135Then you can use the examples from the command line. For example: 136``` 137sudo docker run -it --rm lsquic http_client -s www.google.com -p / -o version=Q046 138sudo 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 139``` 140 141Platforms 142--------- 143 144The library has been tested on the following platforms: 145- Linux 146 - i386 147 - x86_64 148 - ARM (Raspberry Pi 3) 149- FreeBSD 150 - i386 151- MacOS 152 - x86_64 153- Android 154 - ARM 155- Windows 156 - x86_64 157 158Get Involved 159------------ 160 161Do not hesitate to report bugs back to us. Even better, send us fixes 162and improvements! 163 164Have fun, 165 166LiteSpeed QUIC Team. 167 168Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc 169