1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
Commit graph

438 commits

Author SHA1 Message Date
Vladimir
8ab44ae28b client: win32: sul for client connection status polling
https://github.com/warmcat/libwebsockets/pull/2715
https://github.com/warmcat/libwebsockets/pull/2722
2022-09-18 06:16:14 +01:00
Dmitry Potapov
162e11e530 vhost: remove from defer binding on destroy
If a vhost is removed, it should remove references to it from the
defer binding list to avoid dangling pointers, which can crash the
application.
2022-08-17 08:57:37 +01:00
Jaume
2445793d15 windows: client connect: use sockaddr size 2022-06-14 07:40:58 +01:00
Andy Green
2760c9b0be tls shudown: avoid spin 2022-06-14 07:36:44 +01:00
Andy Green
4a443c3e2e lhp: add DLO layout support
Add a dlo-based layout callback for use with lhp.

If lhp_dl_render() is used as the Lws Html/CSS parser callback, it
produces a display_list representation of the Html as DLOs, referencing the
appropriate CSS to drive the layout as best it can.

The display list can be rasterized on to an lws_display using the display's
state object

  lds->disp->blit(lds, (uint8_t *)&dl, &box);
2022-05-04 08:43:26 +01:00
Andrii Sevastianov
e86490fc45 validity: fix bad pointer access
We cannot access wsi after __lws_close_free_wsi.
2022-05-04 08:43:26 +01:00
Andy Green
06229deb8c async_dns: protocols init: make sure we add vhost once 2022-04-13 20:13:47 +01:00
Andy Green
615a08b216 threadpool: improve relationship with LWS_HAVE_PTHREAD_H
Make it clear in more places that threadpool is only built if pthreads
available.

https://github.com/warmcat/libwebsockets/issues/2607
2022-04-11 06:53:47 +01:00
wayneonway
61880e15ff netlink: route handling checks for SRC when it means DST
https://github.com/warmcat/libwebsockets/issues/2603
2022-04-10 06:56:12 +01:00
Felipe Gasper
76a5a9e2f2 client: connect report actual socket error to user callback rather than EINPROGRESS
https://github.com/warmcat/libwebsockets/pull/2452
2022-04-10 06:56:12 +01:00
apcui
730c954b42 windows: avoid NULL addr on connect check
https://github.com/warmcat/libwebsockets/issues/2596
2022-04-10 06:56:12 +01:00
Andy Green
fcbc0dafa4 lws_ota 2022-03-25 08:18:30 +00:00
Andy Green
7847377750 sul: add clear advice for zombie suls 2022-03-25 08:18:30 +00:00
Andy Green
497e25df83 ss: http: facilitate back-to-back transactions
We need to insert a CONNECTING state if we're going again.
2022-03-25 08:18:29 +00:00
wayneonway
73b61f6a2e route: extend lws_route_uidx_t from 1 byte to 2 bytes 2022-03-15 10:28:09 +00:00
Andy Green
9011f913d5 netlink: always delete route if it exists
https://github.com/warmcat/libwebsockets/issues/2567
2022-03-15 10:28:09 +00:00
Andy Green
445651b2c6 cgi: gracefully handle missing wsi->http.cgi 2022-03-15 10:28:09 +00:00
Andy Green
5985f817da lgtm.yml 2022-03-15 10:28:09 +00:00
Sylvain Saunier
84956d280a route: fix nl groups and local ipv6 ads 2022-03-15 10:28:09 +00:00
Andy Green
0ca97586d6 mbedtls: improve api detection
mbedtls cmake api detection was not able to work on esp-idf well.

Improve diagnostics and reaction if we ever see that again.
2022-02-01 11:09:48 +00:00
Andy Green
6352fee219 sort-dns: fix scope comparison
https://github.com/warmcat/libwebsockets/issues/2537
2022-01-16 10:48:16 +00:00
Sylvian Saunier
38a39a3710 client: support socket source port setting 2022-01-16 10:48:16 +00:00
Andy Green
7e841130e0 coverity fixes 2022-01-16 10:48:11 +00:00
Andy Green
236512687e dsh: msvc refuses void pointer arithmetic 2021-12-23 06:22:54 +00:00
Andy Green
bea294dd26 http: redirect: keep ssl options at redirect 2021-12-23 06:22:48 +00:00
Paul Lee
05c67c1879 service: make sure to sleep if nothing to do
https://github.com/warmcat/libwebsockets/issues/2524
2021-12-14 06:58:11 +00:00
Andy Green
f7aff789ca cancel pipe: mark close when wsi is close 2021-12-13 19:02:56 +00:00
Joerg Wendel
fe8170dcdc http: server: added no-cache handling to mounts 2021-12-13 19:02:56 +00:00
Daniel
59abab0e79 extpoll: make sure DEL_POLL_FD only coming once
https://github.com/warmcat/libwebsockets/issues/2500
2021-11-22 15:44:53 +00:00
Andy Green
ba89af373b async dns: allow multiple servers and public add remove apis 2021-11-17 14:50:08 +00:00
Yichen Gu
87dd9283e1 wsimux: immortal: only process immortality once per stream
We can call mark immortal multiple times for a child stream, make sure it
is only processed (and increments the nwsi refcount) the once.
2021-11-09 07:45:58 +00:00
Andy Green
f8d74d058e adopt: coverity: add pointless vh NULL check
The wsi is always created on a valid vhost.  Add a needless NULL check on
it to satisfy coverity.
2021-11-09 07:45:48 +00:00
Andy Green
d3783f0c71 client: connect: confirm we have a protocol
Coverity gets antsy that we were checking wsi->a.protocol for NULL earlier
then start using it... explicitly bail if it's NULL before we start using
it.
2021-11-08 13:44:45 +00:00
Andy Green
7c9f1ca0a6 plugins: iterate builtin plugins as if loaded
For plugins that handle PROTOCOL_INIT, we have to iterate any PLUGINS_BUILTIN
plugins as if we had just discovered and loaded them from plugin files, so
they bind to vhosts appropriately.

Add some private helpers to keep the guts from duplication in plat.
2021-11-07 07:04:09 +00:00
Andy Green
a81c7cccd0 retry: handle empty retry table 2021-11-06 09:09:35 +00:00
Andy Green
3f4800b88f log: cherrypick common errno to be strings
Pick some common errno constants for the platform and provide strings for
them.  Replace numeric errno logging with the new api for client.

Replace any usage of strerror() in network code with the new api.  For
constrained devices, this should give a small saving on .rodata.

Leave some usages in daemonize.c and unix plat where the size isn't going
to matter.
2021-10-29 20:10:52 +01:00
Andy Green
c2ac541f43 client: connect3: show what we are trying to connect to
Make it visible what we are currently attempting to connect to as a numeric
ipv4/ipv6 address.
2021-10-29 15:41:52 +01:00
Andy Green
0993543ac8 adopt: improve wsi tags for listen
async-dns has to keep a listener on udp:53, but its tag doesn't really give
a clue what it is

[1534033|wsisrv|0|adopted]

this patch improves it and moves the decision about putting the server wsi
in SERVER or MUX group to the caller instead of guessing from the desc
name.

[1549684|wsisrv|0|system|asyncdns]
2021-10-29 15:41:52 +01:00
Andy Green
2761badd0f minimal: ss: embedded: RT595S ACM transport
Adds an example for NXP RT595S eval board, using serialized SS over CDC /
ACM USB composite device, one ttyACM for logs and the other for the SSS
link.
2021-10-24 16:50:39 +01:00
Jin Wang
312bb56385 ss: policy: adaptations for dynamic policy 2021-10-21 14:51:21 +01:00
Andy Green
9127bcde7f client: connect_check fail just log once 2021-10-19 06:32:19 +01:00
Andy Green
a3592cbe4f adns: api-test: add synthetic result parsing
Add some exports so the api test can inject results into the parser for
live queries, suppressing asking the server but otherwise following the
flow.

Provide two new suspect responses for injection and parsing in ctest.

Add a --cos option to minimal-http-client to force a close after the
connection has started the async dns.
2021-10-18 09:58:16 +01:00
Andy Green
cb7dd8c765 bind: use vhost log ctx since wsi optional 2021-10-16 08:23:18 +01:00
Felipe Gasper
80b0c59ad6 client: fix nxdomain CCE 2021-10-15 14:11:41 +01:00
Andy Green
f5edf9d75a remove: lws_sequencer
lws_sequencer and lws_abstract were both false starts trying to do the
functionality of secure streams.

Since Secure Streams does a better job for both and there are no known
out-of-tree users of them, let's remove them and focus on Secure Streams.
2021-10-12 07:33:15 +01:00
Andy Green
8fd1ea6180 examples: move existing to m-e-lowlevel and start repoulating m-e with SS 2021-10-08 09:49:05 +01:00
Andy Green
2cfa260e62 sspc: refactor to allow different transports
This is a NOP for existing usecases.

At the moment the only implemented transport for serialized SS is wsi, it's
typically used with Unix Domain Sockets, but it also works over tcp the
same.

It generalizes the interface between serialized chunks and the
transport, separately for client and proxy.  The wsi transport is migrated
to use the new transport ops structs.

It will then be possible to "bring your own transport", so long as it is
reliable, and in-order, both for proxy and client / sspc.

We also adapt minimal-secure-streams-binance to build the -client variant
via SS proxy as well.

LWS_ONLY_SSPC is added so libwebsockets can be produced with just sspc
client support even for tiny targets.

A new embedded minimal example for rpi pico is also provided that
demonstrates using Serialized SS over a UART to an SS proxy, to implement
the SS Binance example on the pico, even though it has no networking itself.
2021-10-08 09:48:41 +01:00
Andy Green
65f16d737e dsh-empty 2021-10-08 09:48:41 +01:00
Andy Green
43bb8aead0 dsh: coalesce 2021-10-08 09:48:41 +01:00
Andy Green
d447f8f1db client: connect: prefer default vh if none given
Giving NULL vh for the client connection is basically "don't care"....
prefer the "default" vh in that case
2021-10-05 07:40:17 +01:00