README.md revision 038a9441
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 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 -DAS_SHARED_LIB=true . 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 161Have fun, 162 163LiteSpeed QUIC Team. 164 165Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc 166