README.md revision 9626cfc2
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 will be added once the IETF version 19of the protocol settles down a little. 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 492. Check out stable branch: 50 51``` 52git checkout chromium-stable 53``` 54 553. Compile the library 56 57``` 58cmake . && make 59``` 60 61If you want to turn on optimizations, do 62 63``` 64cmake -DCMAKE_BUILD_TYPE=Release . && make 65``` 66 674. Install the library 68 69This is the manual step. You will need to copy library files manually. 70LSQUIC client library needs two: `ssl/libssl.a` and `crypto/libcrypto.a`. 71To install these in `/usr/local/lib`, you should do the following: 72 73``` 74BORINGSSL_SOURCE=$PWD 75cd /usr/local/lib 76sudo cp $BORINGSSL_SOURCE/ssl/libssl.a . 77sudo cp $BORINGSSL_SOURCE/crypto/libcrypto.a . 78``` 79 80If you do not want to install the library (or do not have root), you 81can do this instead: 82 83``` 84BORINGSSL_SOURCE=$PWD 85mkdir -p $HOME/tmp/boringssl-libs 86cd $HOME/tmp/boringssl-libs 87ln -s $BORINGSSL_SOURCE/ssl/libssl.a 88ln -s $BORINGSSL_SOURCE/crypto/libcrypto.a 89``` 90 91Building LSQUIC Client Library 92------------------------------ 93 94LSQUIC's `http_client` and the tests link BoringSSL libraries statically. 95Following previous section, you can build LSQUIC as follows: 96 971. Get the source code 98 99``` 100git clone https://github.com/litespeedtech/lsquic-client.git 101cd lsquic-client 102``` 103 1042. Compile the library 105 106 107``` 108cmake -DBORINGSSL_INCLUDE=$BORINGSSL_SOURCE/include \ 109 -DBORINGSSL_LIB=$HOME/tmp/boringssl-libs . 110make 111``` 112 1133. Run tests 114 115``` 116make test 117``` 118 119Building with Docker 120--------- 121The library and http_client example can be built with Docker. 122``` 123docker build -t lsquic-client . 124``` 125 126Then you can use the http_client example from the command line. 127``` 128docker run -it --rm lsquic-client http_client -H www.google.com -s 74.125.22.106:443 -p / 129``` 130 131Platforms 132--------- 133 134The client library has been tested on the following platforms: 135- Linux 136 - i386 137 - x86_64 138 - ARM (Raspberry Pi 3) 139- FreeBSD 140 - i386 141- Windows 142 - x86_64 143- MacOS 144 - x86_64 145 146Have fun, 147 148LiteSpeed QUIC Team. 149 150Copyright (c) 2017 - 2018 LiteSpeed Technologies Inc 151