README.md revision 1b3a1797
1[![Build Status](https://travis-ci.org/litespeedtech/lsquic-client.svg?branch=master)](https://travis-ci.org/litespeedtech/lsquic-client) 2 3LiteSpeed QUIC (LSQUIC) Client Library README 4============================================= 5 6Description 7----------- 8 9LiteSpeed QUIC (LSQUIC) Client Library is an open-source implementation 10of QUIC functionality for clients. It is released in the hope to speed 11the adoption of QUIC. Most of the code in this distribution is used in 12our own products: LiteSpeed Web Server and ADC. We think it is free of 13major problems. Nevertheless, do not hesitate to report bugs back to us. 14Even better, send us fixes and improvements! 15 16Currently supported QUIC versions are Q035, Q039, Q043, and Q044. Support 17for newer versions will be added soon after they are released. The 18version(s) specified by IETF QUIC WG are being developed on 19[one or more branches](https://github.com/litespeedtech/lsquic-client/branches). 20When deemed stable, the IETF QUIC support will be added to the master branch. 21 22Documentation 23------------- 24 25The documentation for this module is admittedly sparse. The API is 26documented in include/lsquic.h. If you have doxygen, you can run 27`doxygen dox.cfg` or `make docs`. The example program is 28test/http_client.c: a bare-bones, but working, QUIC client. Have a look 29in EXAMPLES.txt to see how it can be used. 30 31Requirements 32------------ 33 34To build LSQUIC, you need CMake, zlib, and BoringSSL. The example program 35uses libevent to provide the event loop. 36 37Building BoringSSL 38------------------ 39 40BoringSSL is not packaged; you have to build it yourself. The process is 41straightforward. You will need `go` installed. 42 431. Clone BoringSSL by issuing the following command: 44 45``` 46git clone https://boringssl.googlesource.com/boringssl 47cd boringssl 48``` 49 502. Check out stable branch: 51 52``` 53git checkout chromium-stable 54``` 55 563. Compile the library 57 58``` 59cmake . && make 60``` 61 62If you want to turn on optimizations, do 63 64``` 65cmake -DCMAKE_BUILD_TYPE=Release . && make 66``` 67 684. Install the library 69 70This is the manual step. You will need to copy library files manually. 71LSQUIC client library needs two: `ssl/libssl.a` and `crypto/libcrypto.a`. 72To install these in `/usr/local/lib`, you should do the following: 73 74``` 75BORINGSSL_SOURCE=$PWD 76cd /usr/local/lib 77sudo cp $BORINGSSL_SOURCE/ssl/libssl.a . 78sudo cp $BORINGSSL_SOURCE/crypto/libcrypto.a . 79``` 80 81If you do not want to install the library (or do not have root), you 82can do this instead: 83 84``` 85BORINGSSL_SOURCE=$PWD 86mkdir -p $HOME/tmp/boringssl-libs 87cd $HOME/tmp/boringssl-libs 88ln -s $BORINGSSL_SOURCE/ssl/libssl.a 89ln -s $BORINGSSL_SOURCE/crypto/libcrypto.a 90``` 91 92Building LSQUIC Client Library 93------------------------------ 94 95LSQUIC's `http_client` and the tests link BoringSSL libraries statically. 96Following previous section, you can build LSQUIC as follows: 97 981. Get the source code 99 100``` 101git clone https://github.com/litespeedtech/lsquic-client.git 102cd lsquic-client 103``` 104 1052. Compile the library 106 107 108``` 109cmake -DBORINGSSL_INCLUDE=$BORINGSSL_SOURCE/include \ 110 -DBORINGSSL_LIB=$HOME/tmp/boringssl-libs . 111make 112``` 113 1143. Run tests 115 116``` 117make test 118``` 119 120Building with Docker 121--------- 122The library and http_client example can be built with Docker. 123``` 124docker build -t lsquic-client . 125``` 126 127Then you can use the http_client example from the command line. 128``` 129docker run -it --rm lsquic-client http_client -H www.google.com -s 74.125.22.106:443 -p / 130``` 131 132Platforms 133--------- 134 135The client library has been tested on the following platforms: 136- Linux 137 - i386 138 - x86_64 139 - ARM (Raspberry Pi 3) 140- FreeBSD 141 - i386 142- Windows 143 - x86_64 144- MacOS 145 - x86_64 146 147Have fun, 148 149LiteSpeed QUIC Team. 150 151Copyright (c) 2017 - 2018 LiteSpeed Technologies Inc 152