README.md revision 08927b28
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 Q043, Q046, Q050, ID-27, and ID-28.
19Support for newer versions will be added soon after they are released.
20
21Documentation
22-------------
23
24Documentation is available at https://lsquic.readthedocs.io/en/latest/.
25
26In addition, see example programs for API usage and EXAMPLES.txt for
27some compilation and run-time options.
28
29Requirements
30------------
31
32To build LSQUIC, you need CMake, zlib, and BoringSSL.  The example program
33uses libevent to provide the event loop.
34
35Building BoringSSL
36------------------
37
38BoringSSL is not packaged; you have to build it yourself.  The process is
39straightforward.  You will need `go` installed.
40
411. Clone BoringSSL by issuing the following command:
42
43```
44git clone https://boringssl.googlesource.com/boringssl
45cd boringssl
46```
47
48You may need to install pre-requisites like zlib and libevent.
49
502. Use specific BoringSSL version
51
52```
53git checkout bfe527fa35735e8e045cbfb42b012e13ca68f9cf
54```
55
563. Compile the library
57
58```
59cmake . &&  make
60```
61
62Remember where BoringSSL sources are:
63```
64BORINGSSL=$PWD
65```
66
67If you want to turn on optimizations, do
68
69```
70cmake -DCMAKE_BUILD_TYPE=Release . && make
71```
72
73Building LSQUIC Library
74-----------------------
75
76LSQUIC's `http_client`, `http_server`, and the tests link BoringSSL
77libraries statically.  Following previous section, you can build LSQUIC
78as follows:
79
801. Get the source code
81
82```
83git clone https://github.com/litespeedtech/lsquic.git
84cd lsquic
85git submodule init
86git submodule update
87```
88
892. Compile the library
90
91
92```
93# $BORINGSSL is the top-level BoringSSL directory from the previous step
94cmake -DBORINGSSL_DIR=$BORINGSSL .
95make
96```
97
983. Run tests
99
100```
101make test
102```
103
104Building with Docker
105---------
106The library and the example client and server can be built with Docker.
107
108Initialize Git submodules:
109```
110cd lsquic
111git submodule init
112git submodule update
113```
114
115Build the Docker image:
116```
117docker build -t lsquic .
118```
119
120Then you can use the examples from the command line.  For example:
121```
122sudo docker run -it --rm lsquic http_client -s www.google.com  -p / -o version=Q046
123sudo 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
124```
125
126Platforms
127---------
128
129The library has been tested on the following platforms:
130- Linux
131  - i386
132  - x86_64
133  - ARM (Raspberry Pi 3)
134- FreeBSD
135  - i386
136- MacOS
137  - x86_64
138- Android
139  - ARM
140- Windows (this needs updating for the server part, now broken)
141  - x86_64
142
143Have fun,
144
145LiteSpeed QUIC Team.
146
147Copyright (c) 2017 - 2020 LiteSpeed Technologies Inc
148