README.md revision 7a8b2ece
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 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 Q039, Q043, Q046, Q050, ID-23, and ID-24. 19Support for 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 49de1fc2910524c888866c7e2b0db1ba8af2a530 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 74Building LSQUIC Library 75----------------------- 76 77LSQUIC's `http_client`, `http_server`, and the tests link BoringSSL 78libraries statically. Following previous section, you can build LSQUIC 79as follows: 80 811. Get the source code 82 83``` 84git clone https://github.com/litespeedtech/lsquic.git 85cd lsquic 86git submodule init 87git submodule update 88``` 89 902. Compile the library 91 92 93``` 94# $BORINGSSL is the top-level BoringSSL directory from the previous step 95cmake -DBORINGSSL_DIR=$BORINGSSL . 96make 97``` 98 993. Run tests 100 101``` 102make test 103``` 104 105Building with Docker 106--------- 107The library and the example client and server can be built with Docker. 108 109Initialize Git submodules: 110``` 111cd lsquic 112git submodule init 113git submodule update 114``` 115 116Build the Docker image: 117``` 118docker build -t lsquic . 119``` 120 121Then you can use the examples from the command line. For example: 122``` 123sudo docker run -it --rm lsquic http_client -s www.google.com -p / -o version=Q046 124sudo 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 125``` 126 127Platforms 128--------- 129 130The library has been tested on the following platforms: 131- Linux 132 - i386 133 - x86_64 134 - ARM (Raspberry Pi 3) 135- FreeBSD 136 - i386 137- MacOS 138 - x86_64 139- Windows (this needs updating for the server part, now broken) 140 - x86_64 141 142Have fun, 143 144LiteSpeed QUIC Team. 145 146Copyright (c) 2017 - 2019 LiteSpeed Technologies Inc 147