README.md revision 4ffff819
1[![Linux and MacOS build status](https://ci.appveyor.com/api/projects/status/x790ve5msewmva2b/branch/master?svg=true)](https://ci.appveyor.com/project/litespeedtech/lsquic-linux/branch/master) 2[![Windows build status](https://ci.appveyor.com/api/projects/status/ij4n3vy343pkgm1j/branch/master?svg=true)](https://ci.appveyor.com/project/litespeedtech/lsquic-windows/branch/master) 3[![FreeBSD build status](https://api.cirrus-ci.com/github/litespeedtech/lsquic.svg)](https://cirrus-ci.com/github/litespeedtech/lsquic) 4[![Documentation Status](https://readthedocs.org/projects/lsquic/badge/?version=latest)](https://lsquic.readthedocs.io/en/latest/?badge=latest) 5 6LiteSpeed QUIC (LSQUIC) Library README 7============================================= 8 9Description 10----------- 11 12LiteSpeed QUIC (LSQUIC) Library is an open-source implementation of QUIC 13and HTTP/3 functionality for servers and clients. Most of the code in this 14distribution is used in our own products: LiteSpeed Web Server, LiteSpeed ADC, 15and OpenLiteSpeed. 16 17Currently supported QUIC versions are v1 (disabled by default until the 18QUIC RFC is released); Internet-Draft versions 34, 29, and 27; 19and the older "Google" QUIC versions Q043, Q046, an Q050. 20 21Documentation 22------------- 23 24Documentation is available at https://lsquic.readthedocs.io/en/latest/. 25 26In addition, see example programs for API usage and EXAMPLES.txt for 27some compilation and run-time options. 28 29Requirements 30------------ 31 32To build LSQUIC, you need CMake, zlib, and BoringSSL. The example program 33uses libevent to provide the event loop. 34 35Building BoringSSL 36------------------ 37 38BoringSSL is not packaged; you have to build it yourself. The process is 39straightforward. You will need `go` installed. 40 411. Clone BoringSSL by issuing the following command: 42 43``` 44git clone https://boringssl.googlesource.com/boringssl 45cd boringssl 46``` 47 48You may need to install pre-requisites like zlib and libevent. 49 502. Use specific BoringSSL version 51 52``` 53git checkout a2278d4d2cabe73f6663e3299ea7808edfa306b9 54``` 55 563. Compile the library 57 58``` 59cmake . && make 60``` 61 62Remember where BoringSSL sources are: 63``` 64BORINGSSL=$PWD 65``` 66 67If you want to turn on optimizations, do 68 69``` 70cmake -DCMAKE_BUILD_TYPE=Release . && make 71``` 72 73If you want to build as a library, (necessary to build lsquic itself 74as as shared library) do: 75 76``` 77cmake -DBUILD_SHARED_LIBS=1 . && make 78``` 79 80Building LSQUIC Library 81----------------------- 82 83LSQUIC's `http_client`, `http_server`, and the tests link BoringSSL 84libraries statically. Following previous section, you can build LSQUIC 85as follows: 86 871. Get the source code 88 89``` 90git clone https://github.com/litespeedtech/lsquic.git 91cd lsquic 92git submodule init 93git submodule update 94``` 95 962. Compile the library 97 98Statically: 99 100 101``` 102# $BORINGSSL is the top-level BoringSSL directory from the previous step 103cmake -DBORINGSSL_DIR=$BORINGSSL . 104make 105``` 106 107As a dynamic library: 108 109``` 110cmake -DLSQUIC_SHARED_LIB=1 -DBORINGSSL_DIR=$BORINGSSL . 111make 112``` 113 114 1153. Run tests 116 117``` 118make test 119``` 120 121Building with Docker 122--------- 123The library and the example client and server can be built with Docker. 124 125Initialize Git submodules: 126``` 127cd lsquic 128git submodule init 129git submodule update 130``` 131 132Build the Docker image: 133``` 134docker build -t lsquic . 135``` 136 137Then you can use the examples from the command line. For example: 138``` 139sudo docker run -it --rm lsquic http_client -s www.google.com -p / -o version=Q046 140sudo 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 141``` 142 143Platforms 144--------- 145 146The library has been tested on the following platforms: 147- Linux 148 - i386 149 - x86_64 150 - ARM (Raspberry Pi 3) 151- FreeBSD 152 - i386 153- MacOS 154 - x86_64 155- Android 156 - ARM 157- Windows 158 - x86_64 159 160Get Involved 161------------ 162 163Do not hesitate to report bugs back to us. Even better, send us fixes 164and improvements! 165 166Have fun, 167 168LiteSpeed QUIC Team. 169 170Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc 171