README.md revision e55a4502
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. Do not hesitate to report bugs back to us. Even better, 15send us fixes and improvements! 16 17Currently supported QUIC versions are Q043, Q046, Q050, ID-27, ID-28, ID-29, 18ID-30, and ID-31. Support for newer versions will be added soon after they 19are released. 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 b117a3a0b7bd11fe6ebd503ec6b45d6b910b41a1 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 160Have fun, 161 162LiteSpeed QUIC Team. 163 164Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc 165