README.md revision 8d534ef0
1Linux: [![Build status](https://ci.appveyor.com/api/projects/status/x790ve5msewmva2b/branch/master?svg=true)](https://ci.appveyor.com/project/litespeedtech/lsquic-linux/branch/master); 2Windows: 3[![Build status](https://ci.appveyor.com/api/projects/status/ij4n3vy343pkgm1j/branch/master?svg=true)](https://ci.appveyor.com/project/litespeedtech/lsquic-windows/branch/master); 4FreeBSD: 5[![Build Status](https://api.cirrus-ci.com/github/litespeedtech/lsquic.svg)](https://cirrus-ci.com/github/litespeedtech/lsquic) 6 7LiteSpeed QUIC (LSQUIC) Library README 8============================================= 9 10Description 11----------- 12 13LiteSpeed QUIC (LSQUIC) Library is an open-source implementation of QUIC 14and HTTP/3 functionality for servers and clients. Most of the code in this 15distribution is used in our own products: LiteSpeed Web Server, LiteSpeed ADC, 16and OpenLiteSpeed. 17 18Currently supported QUIC versions are v1 (disabled by default until the 19QUIC RFC is released); Internet-Draft versions 34, 29, and 27; 20and the older "Google" QUIC versions Q043, Q046, an Q050. 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 a2278d4d2cabe73f6663e3299ea7808edfa306b9 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 74If you want to build as a library, (necessary to build lsquic itself 75as as shared library) do: 76 77``` 78cmake -DBUILD_SHARED_LIBS=1 . && make 79``` 80 81Building LSQUIC Library 82----------------------- 83 84LSQUIC's `http_client`, `http_server`, and the tests link BoringSSL 85libraries statically. Following previous section, you can build LSQUIC 86as follows: 87 881. Get the source code 89 90``` 91git clone https://github.com/litespeedtech/lsquic.git 92cd lsquic 93git submodule init 94git submodule update 95``` 96 972. Compile the library 98 99Statically: 100 101 102``` 103# $BORINGSSL is the top-level BoringSSL directory from the previous step 104cmake -DBORINGSSL_DIR=$BORINGSSL . 105make 106``` 107 108As a dynamic library: 109 110``` 111cmake -DLSQUIC_SHARED_LIB=1 -DBORINGSSL_DIR=$BORINGSSL . 112make 113``` 114 115 1163. Run tests 117 118``` 119make test 120``` 121 122Building with Docker 123--------- 124The library and the example client and server can be built with Docker. 125 126Initialize Git submodules: 127``` 128cd lsquic 129git submodule init 130git submodule update 131``` 132 133Build the Docker image: 134``` 135docker build -t lsquic . 136``` 137 138Then you can use the examples from the command line. For example: 139``` 140sudo docker run -it --rm lsquic http_client -s www.google.com -p / -o version=Q046 141sudo 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 142``` 143 144Platforms 145--------- 146 147The library has been tested on the following platforms: 148- Linux 149 - i386 150 - x86_64 151 - ARM (Raspberry Pi 3) 152- FreeBSD 153 - i386 154- MacOS 155 - x86_64 156- Android 157 - ARM 158- Windows 159 - x86_64 160 161Get Involved 162------------ 163 164Do not hesitate to report bugs back to us. Even better, send us fixes 165and improvements! 166 167Have fun, 168 169LiteSpeed QUIC Team. 170 171Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc 172