README.md revision c38e7df7
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/kei9649t9leoqicr?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 12functionality for servers and clients. It is released in the hope to speed 13the adoption of QUIC. Most of the code in this distribution is used in 14our own products: LiteSpeed Web Server, LiteSpeed ADC, and OpenLiteSpeed. 15We think it is free of major problems. Nevertheless, do not hesitate to 16report bugs back to us. Even better, send us fixes and improvements! 17 18Currently supported QUIC versions are Q039, Q043, Q046, and ID-22. Support 19for newer versions will be added soon after they are released. 20 21Documentation 22------------- 23 24The documentation for this module is admittedly sparse. The API is 25documented in include/lsquic.h. If you have doxygen, you can run 26`doxygen dox.cfg` or `make docs`. The example program is 27test/http_client.c: a bare-bones, but working, QUIC client. Have a look 28in EXAMPLES.txt to see how it can be used. 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 32e59d2d3264e4e104b355ef73663b8b79ac4093 55``` 56 573. Patch the library 58 59This patch is required for IETF QUIC support. 60 61``` 62patch -p1 -i ../patches/boringssl-meds.patch 63``` 64 654. Compile the library 66 67``` 68cmake . && make 69``` 70 71Remember where BoringSSL sources are: 72``` 73BORINGSSL=$PWD 74``` 75 76If you want to turn on optimizations, do 77 78``` 79cmake -DCMAKE_BUILD_TYPE=Release . && make 80``` 81 82Building LSQUIC Library 83----------------------- 84 85LSQUIC's `http_client`, `http_server`, and the tests link BoringSSL 86libraries statically. Following previous section, you can build LSQUIC 87as follows: 88 891. Get the source code 90 91``` 92git clone https://github.com/litespeedtech/lsquic.git 93cd lsquic 94git submodule init 95git submodule update 96``` 97 982. Compile the library 99 100 101``` 102# $BORINGSSL is the top-level BoringSSL directory from the previous step 103cmake -DBORINGSSL_DIR=$BORINGSSL . 104make 105``` 106 1073. Run tests 108 109``` 110make test 111``` 112 113Building with Docker 114--------- 115The library and http_client example can be built with Docker. 116``` 117docker build -t lsquic . 118``` 119 120Then you can use the http_client example from the command line. 121``` 122docker run -it --rm lsquic http_client -H www.google.com -s 74.125.22.106:443 -p / 123``` 124 125Platforms 126--------- 127 128The library has been tested on the following platforms: 129- Linux 130 - i386 131 - x86_64 132 - ARM (Raspberry Pi 3) 133- FreeBSD 134 - i386 135- MacOS 136 - x86_64 137- Windows (this needs updating for the server part, now broken) 138 - x86_64 139 140Have fun, 141 142LiteSpeed QUIC Team. 143 144Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc 145