xref: /aosp_15_r20/external/libwebsockets/changelog (revision 1c60b9aca93fdbc9b5f19b2d2194c91294b22281)
1*1c60b9acSAndroid Build Coastguard WorkerChangelog
2*1c60b9acSAndroid Build Coastguard Worker---------
3*1c60b9acSAndroid Build Coastguard Worker
4*1c60b9acSAndroid Build Coastguard Workerv4.3.0
5*1c60b9acSAndroid Build Coastguard Worker======
6*1c60b9acSAndroid Build Coastguard Worker
7*1c60b9acSAndroid Build Coastguard Worker - Add full CBOR stream parsing and writing support, with huge
8*1c60b9acSAndroid Build Coastguard Worker   amount of test vectors and resumable printf type write apis
9*1c60b9acSAndroid Build Coastguard Worker   See ./READMEs/README.cbor-lecp.md
10*1c60b9acSAndroid Build Coastguard Worker - Add COSE key and signing / validation support with huge amount of
11*1c60b9acSAndroid Build Coastguard Worker   test vectors
12*1c60b9acSAndroid Build Coastguard Worker    cose_sign[1] ES256/384/512, RS256/384/512
13*1c60b9acSAndroid Build Coastguard Worker    cose_mac0    HS256/384/512
14*1c60b9acSAndroid Build Coastguard Worker   See ./READMEs/README.cbor-cose.md
15*1c60b9acSAndroid Build Coastguard Worker - JIT Trust: for constrained devices, provides a way to determine the
16*1c60b9acSAndroid Build Coastguard Worker   trusted CA certs the peer requires, and instantiate just those.
17*1c60b9acSAndroid Build Coastguard Worker   This allows generic client browsing without the overhead of ~130
18*1c60b9acSAndroid Build Coastguard Worker   x.509 CA certs in memory permanently.
19*1c60b9acSAndroid Build Coastguard Worker   See ./READMEs/README.jit-trust.md
20*1c60b9acSAndroid Build Coastguard Worker - Add support for client Netscape cookie jar with caching
21*1c60b9acSAndroid Build Coastguard Worker - Secure Streams: issue LWSSSCS_EVENT_WAIT_CANCELLED state() when
22*1c60b9acSAndroid Build Coastguard Worker   lws_cancel_service() called, so cross-thread events can be handled
23*1c60b9acSAndroid Build Coastguard Worker   in SS
24*1c60b9acSAndroid Build Coastguard Worker - Actively assert() on attempt to destroy SS handles still active in
25*1c60b9acSAndroid Build Coastguard Worker   the call stack, use DESTROY_ME returns instead so caller can choose
26*1c60b9acSAndroid Build Coastguard Worker   how to handle it.
27*1c60b9acSAndroid Build Coastguard Worker - Improved Client Connection Error report strings for tls errors
28*1c60b9acSAndroid Build Coastguard Worker - SMP: Use a private fakewsi for PROTOCOL_INIT so pts cannot try to
29*1c60b9acSAndroid Build Coastguard Worker   use the same one concurrently
30*1c60b9acSAndroid Build Coastguard Worker - MbedTLS v3 support for all release changes, as well as retaining
31*1c60b9acSAndroid Build Coastguard Worker   support for v2.x
32*1c60b9acSAndroid Build Coastguard Worker - MQTT client: support QoS2
33*1c60b9acSAndroid Build Coastguard Worker - Event lib ops can now be set at context creation time directly,
34*1c60b9acSAndroid Build Coastguard Worker   bringing full event lib hooking to custom event loops.  See
35*1c60b9acSAndroid Build Coastguard Worker   minimal-http-server-eventlib-custom
36*1c60b9acSAndroid Build Coastguard Worker - Extra APIs to recover AKID and SKID from x.509 in mbedtls and openssl
37*1c60b9acSAndroid Build Coastguard Worker - Improve http redirect to handle h2-> h2 cleanly
38*1c60b9acSAndroid Build Coastguard Worker - IPv4+6 listen sockets on vhosts are now done with two separate
39*1c60b9acSAndroid Build Coastguard Worker   sockets bound individually to AF_INET and AF_INET6 addresses,
40*1c60b9acSAndroid Build Coastguard Worker   handled by the same vhost listen flow.
41*1c60b9acSAndroid Build Coastguard Worker - Improved tls restriction handling
42*1c60b9acSAndroid Build Coastguard Worker - Log contexts: allow objects to log into local logging contexts, by
43*1c60b9acSAndroid Build Coastguard Worker   lws_context, vhost, wsi and ss handle.  Each context has its own
44*1c60b9acSAndroid Build Coastguard Worker   emit function and log level. See ./READMEs/README.logging.md
45*1c60b9acSAndroid Build Coastguard Worker - Upgrade compiler checking to default to -Werror -Wall -Wextra
46*1c60b9acSAndroid Build Coastguard Worker - Fault injection apis now also support pseudo-random number binding
47*1c60b9acSAndroid Build Coastguard Worker   within a specified range, eg,
48*1c60b9acSAndroid Build Coastguard Worker   --fault-injection "f1(10%),f1_delay(123..456)"
49*1c60b9acSAndroid Build Coastguard Worker - Remove LWS_WITH_DEPRECATED_THINGS, remove master branch
50*1c60b9acSAndroid Build Coastguard Worker - Interface binding now uses ipv6 scoring to select bind address
51*1c60b9acSAndroid Build Coastguard Worker
52*1c60b9acSAndroid Build Coastguard Workerv4.2.0
53*1c60b9acSAndroid Build Coastguard Worker======
54*1c60b9acSAndroid Build Coastguard Worker
55*1c60b9acSAndroid Build Coastguard Worker - Sai coverage upgrades, 495 builds on 27 platforms, including OSX M1,
56*1c60b9acSAndroid Build Coastguard Worker   Xenial, Bionic and Focal Ubuntu, Debian Sid and Buster on both 32 and
57*1c60b9acSAndroid Build Coastguard Worker   64-bit OS, and NetBSD, Solaris, FreeBSD, Windows, ESP32.
58*1c60b9acSAndroid Build Coastguard Worker   Ctest run on more scenarios including all LWS_WITH_DISTRO_RECOMMENDED.
59*1c60b9acSAndroid Build Coastguard Worker   More tests use valgrind if available on platform.
60*1c60b9acSAndroid Build Coastguard Worker - RFC7231 date and time parsing and retry-after wired up to lws_retry
61*1c60b9acSAndroid Build Coastguard Worker - `LWS_WITH_SUL_DEBUGGING` checks that no sul belonging to Secure Streams
62*1c60b9acSAndroid Build Coastguard Worker   and wsi objects are left registered on destruction
63*1c60b9acSAndroid Build Coastguard Worker - Netlink monitoring on Linux dynamically tracks interface address and
64*1c60b9acSAndroid Build Coastguard Worker   routing changes, and immediately closes connections on invalidated
65*1c60b9acSAndroid Build Coastguard Worker   routes.
66*1c60b9acSAndroid Build Coastguard Worker - RFC6724 DNS results sorting over ipv4 + ipv6 results, according to
67*1c60b9acSAndroid Build Coastguard Worker   available dynamic route information
68*1c60b9acSAndroid Build Coastguard Worker - Support new event library, sdevent (systemd native loop), via
69*1c60b9acSAndroid Build Coastguard Worker   `LWS_WITH_SDEVENT`
70*1c60b9acSAndroid Build Coastguard Worker - Reduce .rodata cost of role structs by making them sparse
71*1c60b9acSAndroid Build Coastguard Worker - Additional Secure Streams QA tests and runtime state transition
72*1c60b9acSAndroid Build Coastguard Worker   validation
73*1c60b9acSAndroid Build Coastguard Worker - SMD-over-ss-proxy documentation and helpers to simplify forwarding
74*1c60b9acSAndroid Build Coastguard Worker - SSPC stream buffering at proxy and client set from policy by streamtype
75*1c60b9acSAndroid Build Coastguard Worker - Trigger Captive Portal Detection if DNS resolution fails
76*1c60b9acSAndroid Build Coastguard Worker - Switch all logs related to wsi and Secure Streams to use unique,
77*1c60b9acSAndroid Build Coastguard Worker   descriptive tags instead of pointers (which may be reallocated)
78*1c60b9acSAndroid Build Coastguard Worker - Use NOITCE logging for Secure Streams and wsi lifecycle logging using
79*1c60b9acSAndroid Build Coastguard Worker   tags
80*1c60b9acSAndroid Build Coastguard Worker - Update SSPC serialization to include versioning on initial handshake,
81*1c60b9acSAndroid Build Coastguard Worker   and pass client pid to proxy so related objects are tagged with it
82*1c60b9acSAndroid Build Coastguard Worker - Enable errors on -Wconversion pedantic type-related build issues
83*1c60b9acSAndroid Build Coastguard Worker   throughout the lws sources and upgrade every affected cast.
84*1c60b9acSAndroid Build Coastguard Worker - Windows remove WSA event implementation and replace with WSAPoll, with
85*1c60b9acSAndroid Build Coastguard Worker   a pair of UDP sockets instead of pipe() for `lws_cancel_service()`
86*1c60b9acSAndroid Build Coastguard Worker - `lws_strcmp_wildcard()` helper that understand "x*", "x*y", "x*y*" etc
87*1c60b9acSAndroid Build Coastguard Worker - `LWS_WITH_PLUGINS_BUILTIN` cmake option just builds plugins into the main
88*1c60b9acSAndroid Build Coastguard Worker library image directly
89*1c60b9acSAndroid Build Coastguard Worker - Secure Streams proxy supports policy for flow control between proxy and
90*1c60b9acSAndroid Build Coastguard Worker clients
91*1c60b9acSAndroid Build Coastguard Worker - libressl also supported along with boringssl, wolfssl
92*1c60b9acSAndroid Build Coastguard Worker - prepared for openssl v3 compatibility, for main function and GENCRYPTO
93*1c60b9acSAndroid Build Coastguard Worker - Fault injection apis can confirm operation of 48 error paths and counting
94*1c60b9acSAndroid Build Coastguard Worker - `LWS_WITH_SYS_METRICS` keeps stats and reports them to user-defined
95*1c60b9acSAndroid Build Coastguard Worker function, compatible with openmetrics
96*1c60b9acSAndroid Build Coastguard Worker - windows platform knows how to prepare openssl with system trust store certs
97*1c60b9acSAndroid Build Coastguard Worker - `LWS_WITH_SYS_CONMON` allows selected client connections to make precise
98*1c60b9acSAndroid Build Coastguard Worker measurements of connection performance and DNS results, and report them in a struct
99*1c60b9acSAndroid Build Coastguard Worker - New native support for uloop event loop (OpenWRT loop)
100*1c60b9acSAndroid Build Coastguard Worker - More options around JWT
101*1c60b9acSAndroid Build Coastguard Worker - Support TLS session caching and reuse by default, on both OpenSSL and
102*1c60b9acSAndroid Build Coastguard Worker mbedtls
103*1c60b9acSAndroid Build Coastguard Worker - Many fixes and improvements...
104*1c60b9acSAndroid Build Coastguard Worker
105*1c60b9acSAndroid Build Coastguard Workerv4.1.0
106*1c60b9acSAndroid Build Coastguard Worker======
107*1c60b9acSAndroid Build Coastguard Worker
108*1c60b9acSAndroid Build Coastguard Worker - NEW: travis / appveyor / bintray are replaced by Sai
109*1c60b9acSAndroid Build Coastguard Worker   https://libwebsockets.org/sai/ which for lws currently does 193 builds per
110*1c60b9acSAndroid Build Coastguard Worker   git push on 16 platforms, all self-hosted.  The homebrew bash scripts used
111*1c60b9acSAndroid Build Coastguard Worker   to select Minimal examples are replaced by CTest.  Platforms currently
112*1c60b9acSAndroid Build Coastguard Worker   include Fedora/AMD/GCC, Windows/AMD/mingw32, Windows/AMD/mingw64, Android/
113*1c60b9acSAndroid Build Coastguard Worker   aarch64/LLVM, esp-idf (on WROVER-KIT and HELTEC physical boards), Fedora/
114*1c60b9acSAndroid Build Coastguard Worker   RISCV (on QEMU)/GCC, CentOS8/AMD/GCC, Gentoo/AMD/GCC, Bionic/AMD/GCC,
115*1c60b9acSAndroid Build Coastguard Worker   Linkit 7697, Focal/AMD/GCC, Windows (on QEMU)/AMD/MSVC,
116*1c60b9acSAndroid Build Coastguard Worker   Focal/aarch64-RPI4/GCC, iOS/aarch64/LLVM and OSX/AMD/LLVM.
117*1c60b9acSAndroid Build Coastguard Worker
118*1c60b9acSAndroid Build Coastguard Worker - NEW: The single CMakeLists.txt has been refactored and modernized into smaller
119*1c60b9acSAndroid Build Coastguard Worker CMakeLists.txt in the subdirectory along with the code that is being managed
120*1c60b9acSAndroid Build Coastguard Worker for build by it.  Build options are still listed in the top level as before
121*1c60b9acSAndroid Build Coastguard Worker but the new way is much more maintainable.
122*1c60b9acSAndroid Build Coastguard Worker
123*1c60b9acSAndroid Build Coastguard Worker - NEW: event lib support on Unix is now built into dynamically loaded plugins
124*1c60b9acSAndroid Build Coastguard Worker and brought in at runtime, allowing all of the support to be built in
125*1c60b9acSAndroid Build Coastguard Worker isolation without conflicts, and separately packaged with individual
126*1c60b9acSAndroid Build Coastguard Worker dependencies.  See ./READMEs/event-libs.md for details and how to force
127*1c60b9acSAndroid Build Coastguard Worker the old static build into lws method.
128*1c60b9acSAndroid Build Coastguard Worker
129*1c60b9acSAndroid Build Coastguard Worker - NEW: Captive Portal Detection.  Lws can determine if the active default
130*1c60b9acSAndroid Build Coastguard Worker route is able to connect to the internet, or is in a captive portal type
131*1c60b9acSAndroid Build Coastguard Worker situation, by trying to connect to a remote server that will respond in an
132*1c60b9acSAndroid Build Coastguard Worker unusual way, like provide a 204.
133*1c60b9acSAndroid Build Coastguard Worker
134*1c60b9acSAndroid Build Coastguard Worker - NEW: Secure streams: Support system trust store if it exists
135*1c60b9acSAndroid Build Coastguard Worker                        Build on Windows
136*1c60b9acSAndroid Build Coastguard Worker			Support lws raw socket protocol in SS
137*1c60b9acSAndroid Build Coastguard Worker			Support Unix Domain Socket transport
138*1c60b9acSAndroid Build Coastguard Worker
139*1c60b9acSAndroid Build Coastguard Worker - NEW: Windows: Support Unix Domain Sockets same as other platforms
140*1c60b9acSAndroid Build Coastguard Worker
141*1c60b9acSAndroid Build Coastguard Worker - NEW: Windows: Build using native pthreads, async dns, ipv6 on MSVC
142*1c60b9acSAndroid Build Coastguard Worker
143*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_struct: BLOB support
144*1c60b9acSAndroid Build Coastguard Worker
145*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_sul: Now provides two sorted timer domains, a default one as
146*1c60b9acSAndroid Build Coastguard Worker before, and another whose scheduled events are capable to wake the system from suspend
147*1c60b9acSAndroid Build Coastguard Worker
148*1c60b9acSAndroid Build Coastguard Worker - NEW: System Message Distribution: lws_smd provides a very lightweight way
149*1c60b9acSAndroid Build Coastguard Worker to pass short messages between subsystems both in RTOS type case where the
150*1c60b9acSAndroid Build Coastguard Worker subsystems are all on the lws event loop, and in the case participants are in
151*1c60b9acSAndroid Build Coastguard Worker different processes, using Secure Streams proxying.   Participants register a bitmap
152*1c60b9acSAndroid Build Coastguard Worker of message classes they care about; if no particpant cares about a particular message,
153*1c60b9acSAndroid Build Coastguard Worker it is rejected at allocation time for the sender, making it cheap to provide messages
154*1c60b9acSAndroid Build Coastguard Worker speculatively.  See lib/system/smd/README.md for full details.
155*1c60b9acSAndroid Build Coastguard Worker
156*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_drivers: wrappers for SDK driver abstractions (or actual drivers)
157*1c60b9acSAndroid Build Coastguard Worker		 See lib/drivers/README.md, example implementations
158*1c60b9acSAndroid Build Coastguard Worker		 minimal-examples/embedded/esp32/esp-wrover-kit
159*1c60b9acSAndroid Build Coastguard Worker                     - generic gpio
160*1c60b9acSAndroid Build Coastguard Worker		     - generic LED (by name)    lib/drivers/led/README.md
161*1c60b9acSAndroid Build Coastguard Worker		     - generic PWM, sophisticated interpolated table
162*1c60b9acSAndroid Build Coastguard Worker		                    sequencers with crossfade
163*1c60b9acSAndroid Build Coastguard Worker		     - generic button (by name), with debounce and press classification
164*1c60b9acSAndroid Build Coastguard Worker		                       emitting rich SMD click, long-click, double-click,
165*1c60b9acSAndroid Build Coastguard Worker				       down, repeat, up JSON messages
166*1c60b9acSAndroid Build Coastguard Worker				       lib/drivers/button/README.md
167*1c60b9acSAndroid Build Coastguard Worker		     - bitbang i2c on generic gpio (hw support can use same
168*1c60b9acSAndroid Build Coastguard Worker		                       abstract API)
169*1c60b9acSAndroid Build Coastguard Worker		     - bitbang spi on generic gpio (hw support can use same
170*1c60b9acSAndroid Build Coastguard Worker		                       abstract API)
171*1c60b9acSAndroid Build Coastguard Worker		     - generic display object, can be wired up to controller
172*1c60b9acSAndroid Build Coastguard Worker		                  drivers that hook up by generic i2c or spi,
173*1c60b9acSAndroid Build Coastguard Worker				  generic backlight PWM sequencing and
174*1c60b9acSAndroid Build Coastguard Worker				  blanking timer support
175*1c60b9acSAndroid Build Coastguard Worker		     - generic settings storage: get and set blobs by name
176*1c60b9acSAndroid Build Coastguard Worker		     - generic network device: netdev abstract class with
177*1c60b9acSAndroid Build Coastguard Worker	                                       WIFI / Ethernet implementations
178*1c60b9acSAndroid Build Coastguard Worker					       using underlying SDK APIs;
179*1c60b9acSAndroid Build Coastguard Worker					       generic 80211 Scan managements
180*1c60b9acSAndroid Build Coastguard Worker					       and credentials handling via
181*1c60b9acSAndroid Build Coastguard Worker					       lws_settings
182*1c60b9acSAndroid Build Coastguard Worker		     This is the new way to provide embedded platform
183*1c60b9acSAndroid Build Coastguard Worker		     functionality that was in the past done like
184*1c60b9acSAndroid Build Coastguard Worker		     esp32-factory.  Unlike the old way, the new way has no
185*1c60b9acSAndroid Build Coastguard Worker		     native apis in it and can be built on other SDK / SoCs
186*1c60b9acSAndroid Build Coastguard Worker		     the same.
187*1c60b9acSAndroid Build Coastguard Worker
188*1c60b9acSAndroid Build Coastguard Worker - NEW: Security-aware JWS JWT (JSON Web Tokens) apis are provided on top of the existing
189*1c60b9acSAndroid Build Coastguard Worker JOSE / JWS apis.  All the common algorithms are available along with some
190*1c60b9acSAndroid Build Coastguard Worker high level apis like lws http cookie -> JWT struct -> lws http cookie.
191*1c60b9acSAndroid Build Coastguard Worker
192*1c60b9acSAndroid Build Coastguard Worker - REMOVED: esp32-helper and friends used by esp32-factory now lws_drivers
193*1c60b9acSAndroid Build Coastguard Worker exists
194*1c60b9acSAndroid Build Coastguard Worker
195*1c60b9acSAndroid Build Coastguard Worker - REMOVED: generic sessions and friends now JWT is provided
196*1c60b9acSAndroid Build Coastguard Worker
197*1c60b9acSAndroid Build Coastguard Workerv4.0.0
198*1c60b9acSAndroid Build Coastguard Worker======
199*1c60b9acSAndroid Build Coastguard Worker
200*1c60b9acSAndroid Build Coastguard Worker - NEW: Lws is now under the MIT license, see ./LICENSE for details
201*1c60b9acSAndroid Build Coastguard Worker
202*1c60b9acSAndroid Build Coastguard Worker - NEW: GLIB native event loop support, lws + gtk example
203*1c60b9acSAndroid Build Coastguard Worker
204*1c60b9acSAndroid Build Coastguard Worker - NEW: native lws MQTT client... supports client stream binding like h2 when
205*1c60b9acSAndroid Build Coastguard Worker   multiple logical connections are going to the same endpoint over MQTT, they
206*1c60b9acSAndroid Build Coastguard Worker   transparently and independently share the one connection + tls tunnel
207*1c60b9acSAndroid Build Coastguard Worker
208*1c60b9acSAndroid Build Coastguard Worker - NEW: "Secure Streams"... if you are making a device with client connections
209*1c60b9acSAndroid Build Coastguard Worker   to the internet or cloud, this allows separation of the communications
210*1c60b9acSAndroid Build Coastguard Worker   policy (endpoints, tls cert validation, protocols, etc) from the code, with
211*1c60b9acSAndroid Build Coastguard Worker   the goal you can combine streams, change protocols and cloud provision, and
212*1c60b9acSAndroid Build Coastguard Worker   reflect that in the device's JSON policy document without having to change
213*1c60b9acSAndroid Build Coastguard Worker   any code.
214*1c60b9acSAndroid Build Coastguard Worker
215*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_system: New lightweight and efficient Asynchronous DNS resolver
216*1c60b9acSAndroid Build Coastguard Worker   implementation for both A and AAAA records, supports recursive (without
217*1c60b9acSAndroid Build Coastguard Worker   recursion in code) lookups, caching, and getaddrinfo() compatible results
218*1c60b9acSAndroid Build Coastguard Worker   scheme (from cache directly without per-consumer allocation).  Able to
219*1c60b9acSAndroid Build Coastguard Worker   perform DNS lookups without introducing latency in the event loop.
220*1c60b9acSAndroid Build Coastguard Worker
221*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_system: ntpclient implementation with interface for setting system
222*1c60b9acSAndroid Build Coastguard Worker   time via lws_system ops
223*1c60b9acSAndroid Build Coastguard Worker
224*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_system: dhcpclient implementation
225*1c60b9acSAndroid Build Coastguard Worker
226*1c60b9acSAndroid Build Coastguard Worker - NEW: Connection validity tracking, autoproduce PING/PONG for protocols that
227*1c60b9acSAndroid Build Coastguard Worker   support it if not informed that the connection has passed data in both
228*1c60b9acSAndroid Build Coastguard Worker   directions recently enough
229*1c60b9acSAndroid Build Coastguard Worker
230*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_retry: standardized exponential backoff and retry timing based
231*1c60b9acSAndroid Build Coastguard Worker   around backoff table and lws_sul
232*1c60b9acSAndroid Build Coastguard Worker
233*1c60b9acSAndroid Build Coastguard Worker - NEW: there are official public helpers for unaligned de/serialization of all
234*1c60b9acSAndroid Build Coastguard Worker   common types, see eh, lws_ser_wu16be() in include/libwebsockets/lws-misc.h
235*1c60b9acSAndroid Build Coastguard Worker
236*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_tls_client_vhost_extra_cert_mem() api allows attaching extra certs
237*1c60b9acSAndroid Build Coastguard Worker   to a client vhost from DER in memory
238*1c60b9acSAndroid Build Coastguard Worker
239*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_system: generic blobs support passing auth tokens, per-connection
240*1c60b9acSAndroid Build Coastguard Worker   client certs etc from platform into lws
241*1c60b9acSAndroid Build Coastguard Worker
242*1c60b9acSAndroid Build Coastguard Worker - NEW: public helpers to consume and produce ipv4/6 addresses in a clean way,
243*1c60b9acSAndroid Build Coastguard Worker   along with lws_sockaddr46 type now public.  See eg, lws_sockaddr46-based
244*1c60b9acSAndroid Build Coastguard Worker   lws_sa46_parse_numeric_address(), lws_write_numeric_address()
245*1c60b9acSAndroid Build Coastguard Worker   in include/libwebsockets/lws-network-helper.h
246*1c60b9acSAndroid Build Coastguard Worker
247*1c60b9acSAndroid Build Coastguard Worker - Improved client redirect handling, h2 compatibility
248*1c60b9acSAndroid Build Coastguard Worker
249*1c60b9acSAndroid Build Coastguard Worker - NEW: lwsac: additional features for constant folding support (strings that
250*1c60b9acSAndroid Build Coastguard Worker   already are in the lwsac can be pointed to without copying again), backfill
251*1c60b9acSAndroid Build Coastguard Worker   (look for gaps in previous chunks that could take a new use size), and
252*1c60b9acSAndroid Build Coastguard Worker   lwsac_extend() so last use() can attempt to use more unallocated chunk space
253*1c60b9acSAndroid Build Coastguard Worker
254*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_humanize: apis for reporting scalar quanties like 1234 as "1.234KB"
255*1c60b9acSAndroid Build Coastguard Worker   with the scaled symbol strings passed in by caller
256*1c60b9acSAndroid Build Coastguard Worker
257*1c60b9acSAndroid Build Coastguard Worker - NEW: freertos: support lws_cancel_service() by using UDP pair bound to lo,
258*1c60b9acSAndroid Build Coastguard Worker   since it doesn't have logical pipes
259*1c60b9acSAndroid Build Coastguard Worker
260*1c60b9acSAndroid Build Coastguard Worker - NEW: "esp32" plat, which implemented freertos plat compatibility on esp32, is
261*1c60b9acSAndroid Build Coastguard Worker   renamed to "freertos" plat, targeting esp32 and other freertos platforms
262*1c60b9acSAndroid Build Coastguard Worker
263*1c60b9acSAndroid Build Coastguard Worker - NEW: base64 has an additional api supporting stateful decode, where the input
264*1c60b9acSAndroid Build Coastguard Worker   is not all in the same place at the same time and can be processed
265*1c60b9acSAndroid Build Coastguard Worker   incrementally
266*1c60b9acSAndroid Build Coastguard Worker
267*1c60b9acSAndroid Build Coastguard Worker - NEW: lws ws proxy: support RFC8441
268*1c60b9acSAndroid Build Coastguard Worker
269*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_spawn_piped apis: generic support for vforking a process with child
270*1c60b9acSAndroid Build Coastguard Worker   wsis attached to its stdin, stdout and stderr via pipes.  When processes are
271*1c60b9acSAndroid Build Coastguard Worker   reaped, a specified callback is triggered.  Currently Linux + OSX.
272*1c60b9acSAndroid Build Coastguard Worker
273*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_fsmount apis: Linux-only overlayfs mount and unmount management for
274*1c60b9acSAndroid Build Coastguard Worker   aggregating read-only layers with disposable, changeable upper layer fs
275*1c60b9acSAndroid Build Coastguard Worker
276*1c60b9acSAndroid Build Coastguard Worker - Improvements for RTOS / small build case bring the footprint of lws v4 below
277*1c60b9acSAndroid Build Coastguard Worker   that of v3.1 on ARM
278*1c60b9acSAndroid Build Coastguard Worker
279*1c60b9acSAndroid Build Coastguard Worker - lws_tokenize: flag specifying # should mark rest of line as comment
280*1c60b9acSAndroid Build Coastguard Worker
281*1c60b9acSAndroid Build Coastguard Worker - NEW: minimal example for integrating libasound / alsa via raw file
282*1c60b9acSAndroid Build Coastguard Worker
283*1c60b9acSAndroid Build Coastguard Worker - lws_struct: sqlite and json / lejp translation now usable
284*1c60b9acSAndroid Build Coastguard Worker
285*1c60b9acSAndroid Build Coastguard Worker
286*1c60b9acSAndroid Build Coastguard Workerv3.2.0
287*1c60b9acSAndroid Build Coastguard Worker======
288*1c60b9acSAndroid Build Coastguard Worker
289*1c60b9acSAndroid Build Coastguard Worker - This is the last planned release under LGPLv2+SLE.  It's not planned to be
290*1c60b9acSAndroid Build Coastguard Worker   maintained like previous releases, please switch to master for the latest
291*1c60b9acSAndroid Build Coastguard Worker   stuff or continue to use v3.1-stable until the next release under the
292*1c60b9acSAndroid Build Coastguard Worker   new MIT license.
293*1c60b9acSAndroid Build Coastguard Worker
294*1c60b9acSAndroid Build Coastguard Worker - NEW: completely refactored scheduler with a unified, sorted us-resolution
295*1c60b9acSAndroid Build Coastguard Worker   linked-list implementation.  All polled checks like timeout are migrated
296*1c60b9acSAndroid Build Coastguard Worker   to use the new timers, which also work on the event lib implementations.
297*1c60b9acSAndroid Build Coastguard Worker   Faster operation, us-resolution timeouts and generic scheduled callbacks
298*1c60b9acSAndroid Build Coastguard Worker   from the event loop.
299*1c60b9acSAndroid Build Coastguard Worker
300*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_dsh specialized buffer memory allocator that can borrow space
301*1c60b9acSAndroid Build Coastguard Worker   from other cooperating buffers on the same list.
302*1c60b9acSAndroid Build Coastguard Worker
303*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_sequencer allows managing multi-connection processes and
304*1c60b9acSAndroid Build Coastguard Worker   retries
305*1c60b9acSAndroid Build Coastguard Worker
306*1c60b9acSAndroid Build Coastguard Worker - NEW: memory buffer cert support
307*1c60b9acSAndroid Build Coastguard Worker
308*1c60b9acSAndroid Build Coastguard Worker - NEW: LWS_WITH_NETWORK in CMake... can be configured without any network-
309*1c60b9acSAndroid Build Coastguard Worker   related code at all
310*1c60b9acSAndroid Build Coastguard Worker
311*1c60b9acSAndroid Build Coastguard Worker - NEW: builds on QNX 6.5 and SmartOS
312*1c60b9acSAndroid Build Coastguard Worker
313*1c60b9acSAndroid Build Coastguard Worker - NEW: JOSE / JWK / JWS / JWE support, for all common ciphers and algs,
314*1c60b9acSAndroid Build Coastguard Worker   works on OpenSSL and mbedtls backends
315*1c60b9acSAndroid Build Coastguard Worker
316*1c60b9acSAndroid Build Coastguard Worker - NEW: gencrypto now has genaes and genec in addition to genrsa, works
317*1c60b9acSAndroid Build Coastguard Worker   on OpenSSL and mbedtls backends
318*1c60b9acSAndroid Build Coastguard Worker
319*1c60b9acSAndroid Build Coastguard Worker - NEW: raw_proxy role
320*1c60b9acSAndroid Build Coastguard Worker
321*1c60b9acSAndroid Build Coastguard Worker - NEW: Basic Auth works on ws connections
322*1c60b9acSAndroid Build Coastguard Worker
323*1c60b9acSAndroid Build Coastguard Worker - CHANGE: REMOVED: LWS_WITH_GENRSA, LWS_WITH_GENHASH, LWS_WITH_GENEC,
324*1c60b9acSAndroid Build Coastguard Worker LWS_WITH_GENAES have all been removed and combined into LWS_WITH_GENCRYPTO
325*1c60b9acSAndroid Build Coastguard Worker
326*1c60b9acSAndroid Build Coastguard Worker - CHANGE: REMOVED: LWS_WITH_JWS, LWS_WITH_JWE have been removed and combined
327*1c60b9acSAndroid Build Coastguard Worker into LWS_WITH_JOSE
328*1c60b9acSAndroid Build Coastguard Worker
329*1c60b9acSAndroid Build Coastguard Workerv3.1.0
330*1c60b9acSAndroid Build Coastguard Worker======
331*1c60b9acSAndroid Build Coastguard Worker
332*1c60b9acSAndroid Build Coastguard Worker - CHANGE: REMOVED: lws_client_connect() and lws_client_connect_extended()
333*1c60b9acSAndroid Build Coastguard Worker   compatibility apis for lws_client_connect_via_info() have been marked as
334*1c60b9acSAndroid Build Coastguard Worker   deprecated for several versions and are now removed.  Use
335*1c60b9acSAndroid Build Coastguard Worker   lws_client_connect_via_info() directly instead.
336*1c60b9acSAndroid Build Coastguard Worker
337*1c60b9acSAndroid Build Coastguard Worker - CHANGE: CMAKE:
338*1c60b9acSAndroid Build Coastguard Worker     - LWS_WITH_HTTP2:         now defaults ON
339*1c60b9acSAndroid Build Coastguard Worker
340*1c60b9acSAndroid Build Coastguard Worker - CHANGE: Minimal examples updated to use Content Security Policy best
341*1c60b9acSAndroid Build Coastguard Worker   practices, using
342*1c60b9acSAndroid Build Coastguard Worker   `LWS_SERVER_OPTION_HTTP_HEADERS_SECURITY_BEST_PRACTICES_ENFORCE` vhost
343*1c60b9acSAndroid Build Coastguard Worker   option flag and disabling of inline style and scripts.  A side-effect of
344*1c60b9acSAndroid Build Coastguard Worker   this is that buffers used to marshal headers have to be prepared to take
345*1c60b9acSAndroid Build Coastguard Worker   more content than previously... LWS_RECOMMENDED_MIN_HEADER_SPACE (2048
346*1c60b9acSAndroid Build Coastguard Worker   currently) is available for user (and internal) use to logically tie the
347*1c60b9acSAndroid Build Coastguard Worker   buffer size to this usecase (and follow future increases).
348*1c60b9acSAndroid Build Coastguard Worker
349*1c60b9acSAndroid Build Coastguard Worker - NEW: CMAKE
350*1c60b9acSAndroid Build Coastguard Worker     - LWS_FOR_GITOHASHI: sets various cmake options suitable for gitohashi
351*1c60b9acSAndroid Build Coastguard Worker     - LWS_WITH_ASAN: for Linux, enable build with ASAN
352*1c60b9acSAndroid Build Coastguard Worker
353*1c60b9acSAndroid Build Coastguard Worker     Don't forget LWS_WITH_DISTRO_RECOMMENDED, which enables a wide range of lws
354*1c60b9acSAndroid Build Coastguard Worker     options suitable for a distro build of the library.
355*1c60b9acSAndroid Build Coastguard Worker
356*1c60b9acSAndroid Build Coastguard Worker - NEW: lws threadpool - lightweight pool of pthreads integrated to lws wsi, with
357*1c60b9acSAndroid Build Coastguard Worker   all synchronization to event loop handled internally, queue for excess tasks
358*1c60b9acSAndroid Build Coastguard Worker   [threadpool docs](https://libwebsockets.org/git/libwebsockets/tree/lib/misc/threadpool)
359*1c60b9acSAndroid Build Coastguard Worker   [threadpool minimal example](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/ws-server/minimal-ws-server-threadpool)
360*1c60b9acSAndroid Build Coastguard Worker   Cmake config: `-DLWS_WITH_THREADPOOL=1`
361*1c60b9acSAndroid Build Coastguard Worker
362*1c60b9acSAndroid Build Coastguard Worker - NEW: libdbus support integrated on lws event loop
363*1c60b9acSAndroid Build Coastguard Worker   [lws dbus docs](https://libwebsockets.org/git/libwebsockets/tree/lib/roles/dbus)
364*1c60b9acSAndroid Build Coastguard Worker   [lws dbus client minimal examples](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/dbus-client)
365*1c60b9acSAndroid Build Coastguard Worker   [lws dbus server minimal examples](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/dbus-server)
366*1c60b9acSAndroid Build Coastguard Worker   Cmake config: `-DLWS_ROLE_DBUS=1`
367*1c60b9acSAndroid Build Coastguard Worker
368*1c60b9acSAndroid Build Coastguard Worker - NEW: lws allocated chunks (lwsac) - helpers for optimized mass allocation of small
369*1c60b9acSAndroid Build Coastguard Worker   objects inside a few larger malloc chunks... if you need to allocate a lot of
370*1c60b9acSAndroid Build Coastguard Worker   inter-related structs for a limited time, this removes per-struct allocation
371*1c60b9acSAndroid Build Coastguard Worker   library overhead completely and removes the need for any destruction handling
372*1c60b9acSAndroid Build Coastguard Worker   [lwsac docs](https://libwebsockets.org/git/libwebsockets/tree/lib/misc/lwsac)
373*1c60b9acSAndroid Build Coastguard Worker   [lwsac minimal example](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/api-tests/api-test-lwsac)
374*1c60b9acSAndroid Build Coastguard Worker   Cmake Config: `-DLWS_WITH_LWSAC=1`
375*1c60b9acSAndroid Build Coastguard Worker
376*1c60b9acSAndroid Build Coastguard Worker - NEW: lws tokenizer - helper api for robustly tokenizing your own strings without
377*1c60b9acSAndroid Build Coastguard Worker   allocating or adding complexity.  Configurable by flags for common delimiter
378*1c60b9acSAndroid Build Coastguard Worker   sets and comma-separated-lists in the tokenizer.  Detects and reports syntax
379*1c60b9acSAndroid Build Coastguard Worker   errors.
380*1c60b9acSAndroid Build Coastguard Worker   [lws_tokenize docs](https://libwebsockets.org/git/libwebsockets/tree/include/libwebsockets/lws-tokenize.h)
381*1c60b9acSAndroid Build Coastguard Worker   [lws_tokenize minimal example / api test](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/api-tests/api-test-lws_tokenize)
382*1c60b9acSAndroid Build Coastguard Worker
383*1c60b9acSAndroid Build Coastguard Worker - NEW: lws full-text search - optimized trie generation, serialization,
384*1c60b9acSAndroid Build Coastguard Worker   autocomplete suggestion generation and instant global search support extensible
385*1c60b9acSAndroid Build Coastguard Worker   to huge corpuses of UTF-8 text while remaining super lightweight on resources.
386*1c60b9acSAndroid Build Coastguard Worker   [full-text search docs](https://libwebsockets.org/git/libwebsockets/tree/lib/misc/fts)
387*1c60b9acSAndroid Build Coastguard Worker   [full-text search minimal example / api test](https://libwebsockets.org/git/libwebsockets/tree/minimal-examples/api-tests/api-test-fts)
388*1c60b9acSAndroid Build Coastguard Worker   [demo](https://libwebsockets.org/ftsdemo/)
389*1c60b9acSAndroid Build Coastguard Worker   [demo sources](https://libwebsockets.org/git/libwebsockets/tree/plugins/protocol_fulltext_demo.c)
390*1c60b9acSAndroid Build Coastguard Worker   Cmake config: `-DLWS_WITH_FTS=1 -DLWS_WITH_LWSAC=1`
391*1c60b9acSAndroid Build Coastguard Worker
392*1c60b9acSAndroid Build Coastguard Worker - NEW: gzip + brotli http server-side compression - h1 and h2 automatic advertising
393*1c60b9acSAndroid Build Coastguard Worker   of server compression and application to files with mimetypes "text/*",
394*1c60b9acSAndroid Build Coastguard Worker   "application/javascript" and "image/svg.xml".
395*1c60b9acSAndroid Build Coastguard Worker   Cmake config: `-DLWS_WITH_HTTP_STREAM_COMPRESSION=1`, `-DLWS_WITH_HTTP_BROTLI=1`
396*1c60b9acSAndroid Build Coastguard Worker
397*1c60b9acSAndroid Build Coastguard Worker - NEW: managed disk cache - API for managing a directory containing cached files
398*1c60b9acSAndroid Build Coastguard Worker   with hashed names, and automatic deletion of LRU files once the cache is
399*1c60b9acSAndroid Build Coastguard Worker   above a given limit.
400*1c60b9acSAndroid Build Coastguard Worker   [lws diskcache docs](https://libwebsockets.org/git/libwebsockets/tree/include/libwebsockets/lws-diskcache.h)
401*1c60b9acSAndroid Build Coastguard Worker   Cmake config: `-DLWS_WITH_DISKCACHE=1`
402*1c60b9acSAndroid Build Coastguard Worker
403*1c60b9acSAndroid Build Coastguard Worker - NEW: http reverse proxy - lws mounts support proxying h1 or h2 requests to
404*1c60b9acSAndroid Build Coastguard Worker   a local or remote IP, or unix domain socket over h1.  This allows microservice
405*1c60b9acSAndroid Build Coastguard Worker   type architectures where parts of the common URL space are actually handled
406*1c60b9acSAndroid Build Coastguard Worker   by external processes which may be remote or on the same machine.
407*1c60b9acSAndroid Build Coastguard Worker   [lws gitohashi serving](https://libwebsockets.org/git/) is handled this way.
408*1c60b9acSAndroid Build Coastguard Worker   CMake config: `-DLWS_WITH_HTTP_PROXY=1`
409*1c60b9acSAndroid Build Coastguard Worker
410*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_buflist - internally several types of ad-hoc malloc'd buffer have
411*1c60b9acSAndroid Build Coastguard Worker   been replaced by a new, exported api `struct lws_buflist`.  This allows
412*1c60b9acSAndroid Build Coastguard Worker   multiple buffers to be chained and drawn down in strict FIFO order.
413*1c60b9acSAndroid Build Coastguard Worker
414*1c60b9acSAndroid Build Coastguard Worker - NEW: In the case of h1 upgrade, the connection header is checked to contain
415*1c60b9acSAndroid Build Coastguard Worker   "upgrade".   The vhost flag LWS_SERVER_OPTION_VHOST_UPG_STRICT_HOST_CHECK
416*1c60b9acSAndroid Build Coastguard Worker   also causes the Host: header to be confirmed to match the vhost name and
417*1c60b9acSAndroid Build Coastguard Worker   listen port.
418*1c60b9acSAndroid Build Coastguard Worker
419*1c60b9acSAndroid Build Coastguard Worker - NEW: If no 404 redirect for `lws_return_http_status()` is specified for the vhost,
420*1c60b9acSAndroid Build Coastguard Worker   the status page produced will try to bring in a stylesheet `/error.css`.  This allows
421*1c60b9acSAndroid Build Coastguard Worker   you to produce styled 404 or other error pages with logos, graphics etc.  See
422*1c60b9acSAndroid Build Coastguard Worker   https://libwebsockets.org/git/badrepo for an example of what you can do with it.
423*1c60b9acSAndroid Build Coastguard Worker
424*1c60b9acSAndroid Build Coastguard Workerv3.0.0
425*1c60b9acSAndroid Build Coastguard Worker======
426*1c60b9acSAndroid Build Coastguard Worker
427*1c60b9acSAndroid Build Coastguard Worker - CHANGE: Clients used to call LWS_CALLBACK_CLOSED same as servers...
428*1c60b9acSAndroid Build Coastguard Worker   LWS_CALLBACK_CLIENT_CLOSED has been introduced and is called for clients
429*1c60b9acSAndroid Build Coastguard Worker   now.
430*1c60b9acSAndroid Build Coastguard Worker
431*1c60b9acSAndroid Build Coastguard Worker - CHANGE: LWS_CALLBACK_CLIENT_CONNECTION_ERROR used to only be directed at
432*1c60b9acSAndroid Build Coastguard Worker   protocols[0].  However in many cases, the protocol to bind to was provided
433*1c60b9acSAndroid Build Coastguard Worker   at client connection info time and the wsi bound accordingly.  In those
434*1c60b9acSAndroid Build Coastguard Worker   cases, CONNECTION_ERROR is directed at the bound protocol, not protcols[0]
435*1c60b9acSAndroid Build Coastguard Worker   any more.
436*1c60b9acSAndroid Build Coastguard Worker
437*1c60b9acSAndroid Build Coastguard Worker - CHANGE: CMAKE: the following cmake defaults have changed with this version:
438*1c60b9acSAndroid Build Coastguard Worker
439*1c60b9acSAndroid Build Coastguard Worker     - LWS_WITH_ZIP_FOPS:      now defaults OFF
440*1c60b9acSAndroid Build Coastguard Worker     - LWS_WITH_RANGES:        now defaults OFF
441*1c60b9acSAndroid Build Coastguard Worker     - LWS_WITH_ZLIB:          now defaults OFF
442*1c60b9acSAndroid Build Coastguard Worker     - LWS_WITHOUT_EXTENSIONS: now defaults ON
443*1c60b9acSAndroid Build Coastguard Worker
444*1c60b9acSAndroid Build Coastguard Worker - CHANGE: REMOVED: lws_alloc_vfs_file() (read a file to malloc buffer)
445*1c60b9acSAndroid Build Coastguard Worker
446*1c60b9acSAndroid Build Coastguard Worker - CHANGE: REMOVED: lws_read() (no longer useful outside of lws internals)
447*1c60b9acSAndroid Build Coastguard Worker
448*1c60b9acSAndroid Build Coastguard Worker - CHANGE: REMOVED: ESP8266... ESP32 is now within the same price range and much
449*1c60b9acSAndroid Build Coastguard Worker   more performant
450*1c60b9acSAndroid Build Coastguard Worker
451*1c60b9acSAndroid Build Coastguard Worker - CHANGE: soname bump... don't forget to `ldconfig`
452*1c60b9acSAndroid Build Coastguard Worker
453*1c60b9acSAndroid Build Coastguard Worker - NEW: all event libraries support "foreign" loop integration where lws itself
454*1c60b9acSAndroid Build Coastguard Worker   if just a temporary user of the loop unrelated to the actual loop lifecycle.
455*1c60b9acSAndroid Build Coastguard Worker
456*1c60b9acSAndroid Build Coastguard Worker   See `minimal-http-server-eventlib-foreign` for example code demonstrating
457*1c60b9acSAndroid Build Coastguard Worker   this for all the event libraries.
458*1c60b9acSAndroid Build Coastguard Worker
459*1c60b9acSAndroid Build Coastguard Worker   Internal loop in lws is also supported and demonstrated by
460*1c60b9acSAndroid Build Coastguard Worker   `minimal-http-server-eventlib`.
461*1c60b9acSAndroid Build Coastguard Worker
462*1c60b9acSAndroid Build Coastguard Worker - NEW: ws-over-h2 support.  This is a new RFC-on-the-way supported by Chrome
463*1c60b9acSAndroid Build Coastguard Worker   and shortly firefox that allows ws connections to be multiplexed back to the
464*1c60b9acSAndroid Build Coastguard Worker   server on the same tcp + tls wrapper h2 connection that the html and scripts
465*1c60b9acSAndroid Build Coastguard Worker   came in on.  This is hugely faster that discrete connections.
466*1c60b9acSAndroid Build Coastguard Worker
467*1c60b9acSAndroid Build Coastguard Worker - NEW: UDP socket adoption and related event callbacks
468*1c60b9acSAndroid Build Coastguard Worker
469*1c60b9acSAndroid Build Coastguard Worker - NEW: Multi-client connection binding, queuing and pipelining support.
470*1c60b9acSAndroid Build Coastguard Worker
471*1c60b9acSAndroid Build Coastguard Worker   Lws detects multiple client connections to the same server and port, and
472*1c60b9acSAndroid Build Coastguard Worker   optimizes how it handles them according to the server type and provided
473*1c60b9acSAndroid Build Coastguard Worker   flags.  For http/1.0, all occur with individual parallel connections.  For
474*1c60b9acSAndroid Build Coastguard Worker   http/1.1, you can enable keepalive pipelining, so the connections occur
475*1c60b9acSAndroid Build Coastguard Worker   sequentially on a single network connection.  For http/2, they all occur
476*1c60b9acSAndroid Build Coastguard Worker   as parallel streams within a single h2 network connection.
477*1c60b9acSAndroid Build Coastguard Worker
478*1c60b9acSAndroid Build Coastguard Worker   See minimal-http-client-multi for example code.
479*1c60b9acSAndroid Build Coastguard Worker
480*1c60b9acSAndroid Build Coastguard Worker - NEW: High resolution timer API for wsi, get a callback on your wsi with
481*1c60b9acSAndroid Build Coastguard Worker   LWS_CALLBACK_TIMER, set and reset the timer with lws_set_timer_usecs(wsi, us)
482*1c60b9acSAndroid Build Coastguard Worker   Actual resolution depends on event backend.  Works with all backends, poll,
483*1c60b9acSAndroid Build Coastguard Worker   libuv, libevent, and libev.
484*1c60b9acSAndroid Build Coastguard Worker
485*1c60b9acSAndroid Build Coastguard Worker - NEW: Protocols can arrange vhost-protocol instance specific callbacks with
486*1c60b9acSAndroid Build Coastguard Worker   second resolution using `lws_timed_callback_vh_protocol()`
487*1c60b9acSAndroid Build Coastguard Worker
488*1c60b9acSAndroid Build Coastguard Worker - NEW: ACME client plugin for self-service TLS certificates
489*1c60b9acSAndroid Build Coastguard Worker
490*1c60b9acSAndroid Build Coastguard Worker - NEW: RFC7517 JSON Web Keys RFC7638 JWK thumbprint, and RFC7515 JSON Web
491*1c60b9acSAndroid Build Coastguard Worker    signatures support
492*1c60b9acSAndroid Build Coastguard Worker
493*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_cancel_service() now provides a generic way to synchronize events
494*1c60b9acSAndroid Build Coastguard Worker   from other threads, which appear as a LWS_CALLBACK_EVENT_WAIT_CANCELLED
495*1c60b9acSAndroid Build Coastguard Worker   callback on all protocols.  This is compatible with all the event libraries.
496*1c60b9acSAndroid Build Coastguard Worker
497*1c60b9acSAndroid Build Coastguard Worker - NEW: support BSD poll() where changes to the poll wait while waiting are
498*1c60b9acSAndroid Build Coastguard Worker   undone.
499*1c60b9acSAndroid Build Coastguard Worker
500*1c60b9acSAndroid Build Coastguard Worker - NEW: Introduce generic hash, hmac and RSA apis that operate the same
501*1c60b9acSAndroid Build Coastguard Worker   regardless of OpenSSL or mbedTLS tls backend
502*1c60b9acSAndroid Build Coastguard Worker
503*1c60b9acSAndroid Build Coastguard Worker - NEW: Introduce X509 element query api that works the same regardless of
504*1c60b9acSAndroid Build Coastguard Worker   OpenSSL or mbedTLS tls backend
505*1c60b9acSAndroid Build Coastguard Worker
506*1c60b9acSAndroid Build Coastguard Worker - NEW: Introduce over 30 "minimal examples" in ./minimal-examples... these
507*1c60b9acSAndroid Build Coastguard Worker   replace most of the old test servers
508*1c60b9acSAndroid Build Coastguard Worker
509*1c60b9acSAndroid Build Coastguard Worker    - test-echo -> minimal-ws-server-echo and minimal-ws-client-echo
510*1c60b9acSAndroid Build Coastguard Worker
511*1c60b9acSAndroid Build Coastguard Worker    - test-server-libuv / -libevent / -libev ->
512*1c60b9acSAndroid Build Coastguard Worker         minimal-https-server-eventlib / -eventlib-foreign / -eventlib-demos
513*1c60b9acSAndroid Build Coastguard Worker
514*1c60b9acSAndroid Build Coastguard Worker    - test-server-v2.0 -> folded into all the minimal servers
515*1c60b9acSAndroid Build Coastguard Worker
516*1c60b9acSAndroid Build Coastguard Worker    - test-server direct http serving -> minimal-http-server-dynamic
517*1c60b9acSAndroid Build Coastguard Worker
518*1c60b9acSAndroid Build Coastguard Worker   The minimal examples allow individual standalone build using their own
519*1c60b9acSAndroid Build Coastguard Worker   small CMakeLists.txt.
520*1c60b9acSAndroid Build Coastguard Worker
521*1c60b9acSAndroid Build Coastguard Worker - NEW: lws now detects any back-to-back writes that did not go through the
522*1c60b9acSAndroid Build Coastguard Worker   event loop inbetween and reports them.  This will flag any possibility of
523*1c60b9acSAndroid Build Coastguard Worker   failure rather than wait until the problem happens.
524*1c60b9acSAndroid Build Coastguard Worker
525*1c60b9acSAndroid Build Coastguard Worker - NEW: CMake has LWS_WITH_DISTRO_RECOMMENDED to select features that are
526*1c60b9acSAndroid Build Coastguard Worker   appropriate for distros
527*1c60b9acSAndroid Build Coastguard Worker
528*1c60b9acSAndroid Build Coastguard Worker - NEW: Optional vhost URL `error_document_404` if given causes a redirect there
529*1c60b9acSAndroid Build Coastguard Worker   instead of serve the default 404 page.
530*1c60b9acSAndroid Build Coastguard Worker
531*1c60b9acSAndroid Build Coastguard Worker - NEW: lws_strncpy() wrapper guarantees NUL in copied string even if it was
532*1c60b9acSAndroid Build Coastguard Worker   truncated to fit.
533*1c60b9acSAndroid Build Coastguard Worker
534*1c60b9acSAndroid Build Coastguard Worker - NEW: for client connections, local protocol binding name can be separated
535*1c60b9acSAndroid Build Coastguard Worker   from the ws subprotocol name if needed, using .local_protocol_name
536*1c60b9acSAndroid Build Coastguard Worker
537*1c60b9acSAndroid Build Coastguard Worker - NEW: Automatic detection of time discontiguities
538*1c60b9acSAndroid Build Coastguard Worker
539*1c60b9acSAndroid Build Coastguard Worker - NEW: Applies TCP_USER_TIMEOUT for Linux tcp keepalive where available
540*1c60b9acSAndroid Build Coastguard Worker
541*1c60b9acSAndroid Build Coastguard Worker - QA: 1600 tests run on each commit in Travis CI, including almost all
542*1c60b9acSAndroid Build Coastguard Worker   Autobahn in client and server mode, various h2load tests, h2spec, attack.sh
543*1c60b9acSAndroid Build Coastguard Worker   the minimal example selftests and others.
544*1c60b9acSAndroid Build Coastguard Worker
545*1c60b9acSAndroid Build Coastguard Worker - QA: fix small warnings introduced on gcc8.x (eg, Fedora 28)
546*1c60b9acSAndroid Build Coastguard Worker
547*1c60b9acSAndroid Build Coastguard Worker - QA: Add most of -Wextra on gcc (-Wsign-compare, -Wignored-qualifiers,
548*1c60b9acSAndroid Build Coastguard Worker   -Wtype-limits, -Wuninitialized)
549*1c60b9acSAndroid Build Coastguard Worker
550*1c60b9acSAndroid Build Coastguard Worker - QA: clean out warnings on windows
551*1c60b9acSAndroid Build Coastguard Worker
552*1c60b9acSAndroid Build Coastguard Worker - QA: pass all 146 h2spec tests now on strict
553*1c60b9acSAndroid Build Coastguard Worker
554*1c60b9acSAndroid Build Coastguard Worker - QA: introduce 35 selftests that operate different minimal examples against
555*1c60b9acSAndroid Build Coastguard Worker   each other and confirm the results.
556*1c60b9acSAndroid Build Coastguard Worker
557*1c60b9acSAndroid Build Coastguard Worker - QA: LWS_WITH_MINIMAL_EXAMPLES allows mass build of all relevant minimal-
558*1c60b9acSAndroid Build Coastguard Worker   examples with the LWS build, for CI and to make all the example binaries
559*1c60b9acSAndroid Build Coastguard Worker   available from the lws build dir ./bin
560*1c60b9acSAndroid Build Coastguard Worker
561*1c60b9acSAndroid Build Coastguard Worker - REFACTOR: the lws source directory layout in ./lib has been radically
562*1c60b9acSAndroid Build Coastguard Worker   improved, and there are now README.md files in selected subdirs with extra
563*1c60b9acSAndroid Build Coastguard Worker   documentation of interest to people working on lws itself.
564*1c60b9acSAndroid Build Coastguard Worker
565*1c60b9acSAndroid Build Coastguard Worker - REFACTOR: pipelined transactions return to the event loop before starting the
566*1c60b9acSAndroid Build Coastguard Worker   next part.
567*1c60b9acSAndroid Build Coastguard Worker
568*1c60b9acSAndroid Build Coastguard Worker - REFACTOR: TLS: replace all TLS library constants with generic LWS ones and
569*1c60b9acSAndroid Build Coastguard Worker   adapt all the TLS library code to translate to these common ones.
570*1c60b9acSAndroid Build Coastguard Worker
571*1c60b9acSAndroid Build Coastguard Worker   Isolated all the tls-related private stuff in `./lib/tls/private.h`, and all
572*1c60b9acSAndroid Build Coastguard Worker   the mbedTLS stuff in `./lib/tls/mbedtls` + openSSL stuff in
573*1c60b9acSAndroid Build Coastguard Worker   `./lib/tls/openssl`
574*1c60b9acSAndroid Build Coastguard Worker
575*1c60b9acSAndroid Build Coastguard Worker - REFACTOR: the various kinds of wsi possible with lws have been extracted
576*1c60b9acSAndroid Build Coastguard Worker   from the main code and isolated into "roles" in `./lib/roles` which
577*1c60b9acSAndroid Build Coastguard Worker   communicate with the core code via an ops struct.  Everything related to
578*1c60b9acSAndroid Build Coastguard Worker   ah is migrated to the http role.
579*1c60b9acSAndroid Build Coastguard Worker
580*1c60b9acSAndroid Build Coastguard Worker   wsi modes are eliminated and replaced by the ops pointer for the role the
581*1c60b9acSAndroid Build Coastguard Worker   wsi is performing.  Generic states for wsi are available to control the
582*1c60b9acSAndroid Build Coastguard Worker   lifecycle using core code.
583*1c60b9acSAndroid Build Coastguard Worker
584*1c60b9acSAndroid Build Coastguard Worker   Adding new "roles" is now much easier with the changes and ops struct to
585*1c60b9acSAndroid Build Coastguard Worker   plug into.
586*1c60b9acSAndroid Build Coastguard Worker
587*1c60b9acSAndroid Build Coastguard Worker - REFACTOR: reduce four different kinds of buffer management in lws into a
588*1c60b9acSAndroid Build Coastguard Worker   generic scatter-gather struct lws_buflist.
589*1c60b9acSAndroid Build Coastguard Worker
590*1c60b9acSAndroid Build Coastguard Worker - REFACTOR: close notifications go through event loop
591*1c60b9acSAndroid Build Coastguard Worker
592*1c60b9acSAndroid Build Coastguard Worker
593*1c60b9acSAndroid Build Coastguard Workerv2.4.0
594*1c60b9acSAndroid Build Coastguard Worker======
595*1c60b9acSAndroid Build Coastguard Worker
596*1c60b9acSAndroid Build Coastguard Worker - HTTP/2 server support is now mature and usable!  LWS_WITH_HTTP2=1 enables it.
597*1c60b9acSAndroid Build Coastguard Worker   Uses ALPN to serve HTTP/2, HTTP/1 and ws[s] connections all from the same
598*1c60b9acSAndroid Build Coastguard Worker   listen port seamlessly.  (Requires ALPN-capable OpenSSL 1.1 or mbedTLS).
599*1c60b9acSAndroid Build Coastguard Worker
600*1c60b9acSAndroid Build Coastguard Worker - LWS_WITH_MBEDTLS=1 at CMake now builds and works against mbedTLS instead of
601*1c60b9acSAndroid Build Coastguard Worker   OpenSSL.  Most things work identically, although on common targets where
602*1c60b9acSAndroid Build Coastguard Worker   OpenSSL has acceleration, mbedTLS is many times slower in operation.  However
603*1c60b9acSAndroid Build Coastguard Worker   it is a lot smaller codewise.
604*1c60b9acSAndroid Build Coastguard Worker
605*1c60b9acSAndroid Build Coastguard Worker - Generic hash apis introduced that work the same on mbedTLS or OpenSSL backend
606*1c60b9acSAndroid Build Coastguard Worker
607*1c60b9acSAndroid Build Coastguard Worker - LWS_WITH_PEER_LIMITS tracks IPs across all vhosts and allows restrictions on
608*1c60b9acSAndroid Build Coastguard Worker   both the number of simultaneous connections and wsi in use for any single IP
609*1c60b9acSAndroid Build Coastguard Worker
610*1c60b9acSAndroid Build Coastguard Worker - lws_ring apis provide a generic single- or multi-tail ringbuffer... mirror
611*1c60b9acSAndroid Build Coastguard Worker   protocol now uses this.  Features include ring elements may be sized to fit
612*1c60b9acSAndroid Build Coastguard Worker   structs in the ringbuffer, callback when no tail any longer needs an element
613*1c60b9acSAndroid Build Coastguard Worker   and it can be deleted, and zerocopy options to write new members directly
614*1c60b9acSAndroid Build Coastguard Worker   into the ringbuffer, and use the ringbuffer element by address too.
615*1c60b9acSAndroid Build Coastguard Worker
616*1c60b9acSAndroid Build Coastguard Worker - abstract ssh 2 server plugin included, with both plugin and standalone
617*1c60b9acSAndroid Build Coastguard Worker   demos provided.  You can bind the plugin to a vhost and also serve full-
618*1c60b9acSAndroid Build Coastguard Worker   strength ssh from the vhost.  IO from the ssh server is controlled by an
619*1c60b9acSAndroid Build Coastguard Worker   "ops" struct of callbacks for tx, rx, auth etc.
620*1c60b9acSAndroid Build Coastguard Worker
621*1c60b9acSAndroid Build Coastguard Worker - Many fixes, cleanups, source refactors and other improvements.
622*1c60b9acSAndroid Build Coastguard Worker
623*1c60b9acSAndroid Build Coastguard Worker
624*1c60b9acSAndroid Build Coastguard Workerv2.3.0
625*1c60b9acSAndroid Build Coastguard Worker======
626*1c60b9acSAndroid Build Coastguard Worker
627*1c60b9acSAndroid Build Coastguard Worker - ESP32 OpenSSL support for client and server
628*1c60b9acSAndroid Build Coastguard Worker
629*1c60b9acSAndroid Build Coastguard Worker - ESP32 4 x WLAN credential slots may be configured
630*1c60b9acSAndroid Build Coastguard Worker
631*1c60b9acSAndroid Build Coastguard Worker - Libevent event loop support
632*1c60b9acSAndroid Build Coastguard Worker
633*1c60b9acSAndroid Build Coastguard Worker - SOCKS5 proxy support
634*1c60b9acSAndroid Build Coastguard Worker
635*1c60b9acSAndroid Build Coastguard Worker - lws_meta protocol for websocket connection multiplexing
636*1c60b9acSAndroid Build Coastguard Worker
637*1c60b9acSAndroid Build Coastguard Worker - lws_vhost_destroy() added... allows dynamic removal of listening
638*1c60b9acSAndroid Build Coastguard Worker   vhosts.  Vhosts with shared listen sockets adopt the listen socket
639*1c60b9acSAndroid Build Coastguard Worker   automatically if the owner is destroyed.
640*1c60b9acSAndroid Build Coastguard Worker
641*1c60b9acSAndroid Build Coastguard Worker - IPv6 on Windows
642*1c60b9acSAndroid Build Coastguard Worker
643*1c60b9acSAndroid Build Coastguard Worker - Improved CGI handling suitable for general CGI scripting, eg, PHP
644*1c60b9acSAndroid Build Coastguard Worker
645*1c60b9acSAndroid Build Coastguard Worker - Convert even the "old style" test servers to use statically included
646*1c60b9acSAndroid Build Coastguard Worker   plugin sources
647*1c60b9acSAndroid Build Coastguard Worker
648*1c60b9acSAndroid Build Coastguard Worker - LWS_WITH_STATS cmake option dumps resource usage and timing information
649*1c60b9acSAndroid Build Coastguard Worker   every few seconds to debug log, including latency information about
650*1c60b9acSAndroid Build Coastguard Worker   delay from asking for writeable callback to getting it
651*1c60b9acSAndroid Build Coastguard Worker
652*1c60b9acSAndroid Build Coastguard Worker - Large (> 2GB) files may be served
653*1c60b9acSAndroid Build Coastguard Worker
654*1c60b9acSAndroid Build Coastguard Worker - LWS_WITH_HTTP_PROXY Cmake option adds proxying mounts
655*1c60b9acSAndroid Build Coastguard Worker
656*1c60b9acSAndroid Build Coastguard Worker - Workaround for libev build by disabling -Werror on the test app
657*1c60b9acSAndroid Build Coastguard Worker
658*1c60b9acSAndroid Build Coastguard Worker - HTTP2 support disabled since no way to serve websockets on it
659*1c60b9acSAndroid Build Coastguard Worker
660*1c60b9acSAndroid Build Coastguard Worker
661*1c60b9acSAndroid Build Coastguard Workerv2.2.0
662*1c60b9acSAndroid Build Coastguard Worker======
663*1c60b9acSAndroid Build Coastguard Worker
664*1c60b9acSAndroid Build Coastguard WorkerMajor new features
665*1c60b9acSAndroid Build Coastguard Worker
666*1c60b9acSAndroid Build Coastguard Worker - A mount can be protected by Basic Auth... in lwsws it looks like this
667*1c60b9acSAndroid Build Coastguard Worker
668*1c60b9acSAndroid Build Coastguard Worker ```
669*1c60b9acSAndroid Build Coastguard Worker{
670*1c60b9acSAndroid Build Coastguard Worker        "mountpoint": "/basic-auth",
671*1c60b9acSAndroid Build Coastguard Worker        "origin": "file://_lws_ddir_/libwebsockets-test-server/private",
672*1c60b9acSAndroid Build Coastguard Worker        "basic-auth": "/var/www/balogins-private"
673*1c60b9acSAndroid Build Coastguard Worker}
674*1c60b9acSAndroid Build Coastguard Worker```
675*1c60b9acSAndroid Build Coastguard Worker
676*1c60b9acSAndroid Build Coastguard WorkerThe text file named in `basic-auth` contains user:password information
677*1c60b9acSAndroid Build Coastguard Workerone per line.
678*1c60b9acSAndroid Build Coastguard Worker
679*1c60b9acSAndroid Build Coastguard WorkerSee README.lwsws.md for more information.
680*1c60b9acSAndroid Build Coastguard Worker
681*1c60b9acSAndroid Build Coastguard Worker - RFC7233 RANGES support in lws server... both single and multipart.
682*1c60b9acSAndroid Build Coastguard Worker This allows seeking for multimedia file serving and download resume.
683*1c60b9acSAndroid Build Coastguard Worker It's enabled by default but can be disabled by CMake option.
684*1c60b9acSAndroid Build Coastguard Worker
685*1c60b9acSAndroid Build Coastguard Worker - On Linux, lwsws can reload configuration without dropping ongoing
686*1c60b9acSAndroid Build Coastguard Worker connections, when sent a SIGHUP.  The old configuration drops its
687*1c60b9acSAndroid Build Coastguard Worker listen sockets so the new configuration can listen on them.
688*1c60b9acSAndroid Build Coastguard Worker New connections connect to the server instance with the new
689*1c60b9acSAndroid Build Coastguard Worker configuration.  When all old connections eventually close, the old
690*1c60b9acSAndroid Build Coastguard Worker instance automatically exits.  This is equivalent to
691*1c60b9acSAndroid Build Coastguard Worker `systemctl reload apache`
692*1c60b9acSAndroid Build Coastguard Worker
693*1c60b9acSAndroid Build Coastguard Worker - New `adopt` api allow adoption including SSL negotiation and
694*1c60b9acSAndroid Build Coastguard Worker for raw sockets and file descriptors.
695*1c60b9acSAndroid Build Coastguard Worker
696*1c60b9acSAndroid Build Coastguard Worker - Chunked transfer encoding supported for client and server
697*1c60b9acSAndroid Build Coastguard Worker
698*1c60b9acSAndroid Build Coastguard Worker - Adaptations to allow operations inside OPTEE Secure World
699*1c60b9acSAndroid Build Coastguard Worker
700*1c60b9acSAndroid Build Coastguard Worker - ESP32 initial port - able to do all test server functions. See
701*1c60b9acSAndroid Build Coastguard Worker README.build.md
702*1c60b9acSAndroid Build Coastguard Worker
703*1c60b9acSAndroid Build Coastguard Worker - Serving gzipped files from inside a ZIP file is supported... this
704*1c60b9acSAndroid Build Coastguard Worker includes directly serving the gzipped content if the client
705*1c60b9acSAndroid Build Coastguard Worker indicated it could accept it (ie, almost all browsers) saving
706*1c60b9acSAndroid Build Coastguard Worker bandwidth and time.  For clients that can't accept it, lws
707*1c60b9acSAndroid Build Coastguard Worker automatically decompresses and serves the content in memory-
708*1c60b9acSAndroid Build Coastguard Worker efficient chunks. Only a few hundred bytes of heap are needed
709*1c60b9acSAndroid Build Coastguard Worker to serve any size file from inside the zip.  See README.coding.md
710*1c60b9acSAndroid Build Coastguard Worker
711*1c60b9acSAndroid Build Coastguard Worker - RAW file descriptors may now be adopted into the lws event loop,
712*1c60b9acSAndroid Build Coastguard Worker independent of event backend (including poll service).
713*1c60b9acSAndroid Build Coastguard Worker See README.coding.md
714*1c60b9acSAndroid Build Coastguard Worker
715*1c60b9acSAndroid Build Coastguard Worker - RAW server socket descriptors may now be enabled on the vhost if
716*1c60b9acSAndroid Build Coastguard Worker the first thing sent on the connection is not a valid http method.
717*1c60b9acSAndroid Build Coastguard Worker The user code can associate these with a specific protocol per
718*1c60b9acSAndroid Build Coastguard Worker vhost, and RAW-specific callbacks appear there for creation, rx,
719*1c60b9acSAndroid Build Coastguard Worker writable and close.  See libwebsockets-test-server-v2.0 for an example.
720*1c60b9acSAndroid Build Coastguard Worker See README.coding.md
721*1c60b9acSAndroid Build Coastguard Worker
722*1c60b9acSAndroid Build Coastguard Worker - RAW client connections are now possible using the method "RAW".
723*1c60b9acSAndroid Build Coastguard Worker After connection, the socket is associated to the protocol
724*1c60b9acSAndroid Build Coastguard Worker named in the client connection info and RAW-specific callbacks
725*1c60b9acSAndroid Build Coastguard Worker appear there for creation, rx, writable and close.
726*1c60b9acSAndroid Build Coastguard Worker See libwebsockets-test-client (with raw://) for an example.
727*1c60b9acSAndroid Build Coastguard Worker See README.coding.md
728*1c60b9acSAndroid Build Coastguard Worker
729*1c60b9acSAndroid Build Coastguard Worker
730*1c60b9acSAndroid Build Coastguard Worker(for earlier changelogs, see the tagged releases)
731