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