Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
402efec
hls: add plugin and example
lws-team Jul 6, 2026
05f8a99
qir: additional tests
lws-team Jul 1, 2026
bc21958
cmake: work with abs paths
lws-team Jul 2, 2026
6ed9286
fixes
lws-team Jul 9, 2026
d9c0a7b
tls: remove 32KB hs buffer
lws-team Jul 9, 2026
185559e
tls: migrate header buf to ah
lws-team Jul 9, 2026
5d9eebd
oauth: grant level display
lws-team Jul 9, 2026
8ef9a25
quic: sai fixes
lws-team Jul 9, 2026
8efc209
oauth: increase grant size
lws-team Jul 9, 2026
49e5848
cov4
lws-team Jul 10, 2026
ce26cf1
sonarqube: fix all blocker maintainability
lws-team Jul 10, 2026
42260e2
oauth: use nwsi for protocol
lws-team Jul 11, 2026
09869c4
quic: avoid looping on migration
lws-team Jul 11, 2026
2b42eee
certs: new monitoring and grace
lws-team Jul 11, 2026
790be24
proxy: deliver public URL for redirects not internal proxy target
lws-team Jul 11, 2026
1f7aef9
web-transport: support for qir
lws-team Jul 12, 2026
ac1aab8
quic-security-audit
lws-team Jul 13, 2026
2cf1128
ddos-harden
lws-team Jul 13, 2026
2a02bc5
quic: add formal quic-initial-cwnd
lws-team Jul 17, 2026
9d07bf0
webtransport: passing qir OK
lws-team Jul 13, 2026
4ae6d24
cleanup
lws-team Jul 14, 2026
ea08335
system: policy: build lws_system_parse_policy() without LEJP
saghul Jul 14, 2026
b5a8aa4
http2/http3: client: send request when reusing an idle mux connection
saghul Jul 14, 2026
da7743e
delta-to-2152b1b9
lws-team Jul 17, 2026
32e71fc
libuv: clear told_event_loop_closed when new poll watcher attached du…
hbock Jul 16, 2026
1c12b9a
ZDI-CAN-31039: enter wrong state
lws-team Jul 17, 2026
699ab7c
http parser: fixes
lws-team Jul 17, 2026
52c539f
wt-shared-world
lws-team Jul 16, 2026
bdedb13
quic: zerortt large send option
lws-team Jul 17, 2026
21e3d6b
webrtc-align-pre-backout
lws-team Jul 17, 2026
ef7103a
qlr1
lws-team Jul 18, 2026
3eea88f
h2: client: mark reused mux streams as mux_substream
saghul Jul 17, 2026
2947009
client: don't re-remove already-failed parallel connect attempts
vikramdattu Jul 17, 2026
66c631a
h2: client: make ws-over-h2 (RFC 8441 extended CONNECT) actually work
thefallentree Jul 18, 2026
57effc6
ws-over-h2: respect the peer's h2 flow-control window on tx
thefallentree Jul 18, 2026
bc03c55
ws-over-h2: give extensions their PACKET_TX_PRESEND look at encapsula…
thefallentree Jul 18, 2026
e4deec9
ws: don't deref a NULL h2 parent in callback_on_writable mid-teardown
thefallentree Jul 18, 2026
faf8046
api-test-ws-h2-txcredit: ws-over-h2 tx flow-control selftest
thefallentree Jul 18, 2026
69eb90a
gnutls: h2 fixes + clean pointer arithmetic
lws-team Jul 18, 2026
347764c
ws-over-h2: don't conflate nwsi buffered output with the stream's par…
thefallentree Jul 18, 2026
774c64a
ws-over-h2: deal with choked nwsi
lws-team Jul 19, 2026
ae2b73a
oauth: cleanup
lws-team Jul 19, 2026
9428500
HE: if no rival grace period is whole timeout
lws-team Jul 19, 2026
d4e6802
ws-over-h2: permessage-deflate fixes: short return, ext tx-drain wedg…
thefallentree Jul 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .sai.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@
"cd build && SAI_CPACK=\"-G DEB\" ${cpack}"
]
},

"linux-debian13/x86_64-amd/gcc": {
"default": false,
"build": [
"${cmake}"
]
},


# "netbsd/aarch64BE-bcm2837-a53/gcc": {
# "default": false,
# "build": [
Expand Down Expand Up @@ -309,6 +318,11 @@
"platforms": "none, coverity/x86_64/gcc",
"cpack": "export STAMP=`git log -1 --pretty=format:%h` && rm -f libwebsockets.tar.xz && tar cJvf libwebsockets.tar.xz cov-int && script -e -q -c \"cat /etc/coverity/secrets.sh | lws-minimal-http-client-post-form --h1 https://scan.coverity.com:443/builds?project=warmcat%2Flibwebsockets --form file=@libwebsockets.tar.xz --form version=${STAMP} --form 'description=lws qa'\" /dev/null",
"branches": "coverity"
},

"qir": {
"cmake": "cd /opt/quic-interop-runner ; source venv/bin/activate ; rm -rf logs_* ; export QIR_LWS_BRANCH=main ; cd /opt/quic-interop-runner/lws ; if [ \"`docker ps -q`\" ] ; then docker kill $(docker ps -q) ; fi ; docker system prune -a --volumes -f && docker build --build-arg QIR_LWS_BRANCH=${QIR_LWS_BRANCH} -t lws-quic-interop . --no-cache && cd .. && python3 run.py -c lws -s lws --delete-successful-logs ; python3 run.py -p webtransport -c lws -s lws --delete-successful-logs -t handshake,transfer-unidirectional-receive,transfer-unidirectional-send,transfer-bidirectional-receive,transfer-bidirectional-send,transfer-datagram-receive,transfer-datagram-send",
"platforms": "none, linux-debian13/x86_64-amd/gcc"
}

# ,
Expand Down
32 changes: 24 additions & 8 deletions CMakeLists-implied-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -185,24 +185,40 @@ endif()

if (LWS_WITH_WEBRTC_MIXER)
set(LWS_WITH_WEBRTC 1)
set(LWS_WITH_ALSA 1 CACHE BOOL "Enable alsa audio example" FORCE)
set(LWS_WITH_OPUS 1 CACHE BOOL "Enable opus audio codec" FORCE)
set(LWS_WITH_GSTREAMER 1 CACHE BOOL "Enable gstreamer" FORCE)
if (NOT DEFINED LWS_WITH_ALSA)
set(LWS_WITH_ALSA 1 CACHE BOOL "Enable alsa audio example" FORCE)
endif()
if (NOT DEFINED LWS_WITH_OPUS)
set(LWS_WITH_OPUS 1 CACHE BOOL "Enable opus audio codec" FORCE)
endif()
if (NOT DEFINED LWS_WITH_GSTREAMER)
set(LWS_WITH_GSTREAMER 1 CACHE BOOL "Enable gstreamer" FORCE)
endif()
endif()

if (LWS_WITH_WEBRTC)
set(LWS_WITH_UDP 1)
set(LWS_WITH_DTLS 1)
set(LWS_WITH_PLUGINS 1 CACHE BOOL "Enable plugins" FORCE)
set(LWS_WITH_V4L2 1)
set(LWS_WITH_LIBV4L2 1)
set(LWS_WITH_DRM 1)
if (NOT DEFINED LWS_WITH_V4L2)
set(LWS_WITH_V4L2 1)
endif()
if (NOT DEFINED LWS_WITH_LIBV4L2)
set(LWS_WITH_LIBV4L2 1)
endif()
if (NOT DEFINED LWS_WITH_DRM)
set(LWS_WITH_DRM 1)
endif()
set(LWS_WITH_GENCRYPTO 1)
set(LWS_WITH_JOSE 1)
set(LWS_WITH_NETWORK 1)
set(LWS_WITH_CLIENT 1)
set(LWS_WITH_ALSA 1)
set(LWS_WITH_OPUS 1)
if (NOT DEFINED LWS_WITH_ALSA)
set(LWS_WITH_ALSA 1)
endif()
if (NOT DEFINED LWS_WITH_OPUS)
set(LWS_WITH_OPUS 1)
endif()
endif()


Expand Down
16 changes: 15 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,20 @@ set(LWS_INSTALL_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE PATH "Installati
set(LWS_INSTALL_EXAMPLES_DIR ${CMAKE_INSTALL_BINDIR} CACHE PATH "Installation directory for example files")
set(LWS_INSTALL_PLUGIN_DIR "${CMAKE_INSTALL_PREFIX}/share/libwebsockets-test-server/plugins" CACHE PATH "Installation directory for plugins")

if(IS_ABSOLUTE "${LWS_INSTALL_LIB_DIR}")
set(LWS_ABSOLUTE_INSTALL_LIBDIR "${LWS_INSTALL_LIB_DIR}")
set(PKG_CONFIG_LIBDIR "${LWS_INSTALL_LIB_DIR}")
else()
set(LWS_ABSOLUTE_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${LWS_INSTALL_LIB_DIR}")
set(PKG_CONFIG_LIBDIR "\${exec_prefix}/${LWS_INSTALL_LIB_DIR}")
endif()

if(IS_ABSOLUTE "${LWS_INSTALL_INCLUDE_DIR}")
set(PKG_CONFIG_INCLUDEDIR "${LWS_INSTALL_INCLUDE_DIR}")
else()
set(PKG_CONFIG_INCLUDEDIR "\${prefix}/${LWS_INSTALL_INCLUDE_DIR}")
endif()

# if you gave LWS_WITH_MINIZ, point to MINIZ here if not found
# automatically

Expand Down Expand Up @@ -1483,7 +1497,7 @@ file(RELATIVE_PATH
"${LWS_ABSOLUTE_INSTALL_INCLUDE_DIR}") # Calculate the relative directory from the cmake dir.

if (DEFINED REL_INCLUDE_DIR)
set(LWS__INCLUDE_DIRS "${LWS_CMAKE_DIR}/${REL_INCLUDE_DIR}")
set(LWS__INCLUDE_DIRS "\${LWS_CMAKE_DIR}/${REL_INCLUDE_DIR}")
endif()

set(STRIPPED_LIB_LIST_AT_END "")
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

** NEW features available on main **

- Support for SChannel (windows native TLS, no need for OpenSSL build!), GnuTLS, and BearSSL added
- QUIC + H3 + Webtranspoer implementation, using aws-lc, wolfssl, boringssl, libressl, gnutls, and schannel (OpenSSL is h1/h2 -only, mbedtls can do it via a patch)
- Support for SChannel (windows native TLS, no need for OpenSSL build!), GnuTLS, openHiTLS and BearSSL added
- QUIC + H3 + Webtransport implementation, using aws-lc, wolfssl, boringssl, libressl, gnutls, and schannel (OpenSSL is h1/h2 -only; mbedtls can do it via a patch)

|LWS version|Platform|Protocols|Default TLS|
|---|---|---|---|
Expand Down Expand Up @@ -33,7 +33,7 @@ quic/h3 is enabled for build by default... necessitating GnuTLS instead of OpenS
| **openHiTLS** | **Yes** | **Yes** | **No** | **Yes** | **Yes** | **Yes** | Yes (not SRTP) | **Yes** | **Yes** | **Yes** |


\* *Note: 1) Upstream OpenSSL does not provide the necessary QUIC TLS API (`SSL_set_quic_method`) to act as a cryptographic engine for LWS's QUIC transport. If you need QUIC/HTTP3 support, we recommend using BoringSSL, GnuTLS, WolfSSL, or the `quictls` fork of OpenSSL.*
\* *Note: 1) Upstream OpenSSL does not provide the necessary QUIC TLS API (`SSL_set_quic_method`) to act as a cryptographic engine for LWS's QUIC transport. If you need QUIC/HTTP3 support, we recommend using BoringSSL or GnuTLS.*
\* *Note: 2) openHiTLS does not provide the necessary QUIC TLS API *

- DHT support built-in: `-DLWS_WITH_DHT=1`
Expand Down
12 changes: 11 additions & 1 deletion READMEs/README.lwsws.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,16 @@ to be selected using "raw": "1"

See also "apply-listen-accept" below.

## Care about redirecting the trailing /

In lws the mount applies at the URL folder, so a mount at /myapp actually works starting from /myapp/.

This means you often need to add an additional redirect mount to do the last step for the user who
may have typed .../myapp, to get them to .../myapp/ where the app actually takes over.

"mountpoint": "/git",
"origin": ">https://warmcat.com/git/",

## Lwsws Other vhost options

- If the three options `host-ssl-cert`, `host-ssl-ca` and `host-ssl-key` are given, then the vhost supports SSL.
Expand Down Expand Up @@ -479,7 +489,7 @@ Auth before the ws upgrade, this is also possible. In this case, the

The mounts in lws allow you to stack up other plugins that run "before" the main mountpoint.
There are two "interceptor plugins" provided which can be useful for this,
`lws_login` and `lws_captcha_ratelimit`
`lws_login` and `lws_captcha_ratelimit`, you can create your own based on these.

To indicate you want to use an interceptor plugin for a mount, you add an
"interceptor-path" entry to the original mount definition, pointing to the
Expand Down
2 changes: 1 addition & 1 deletion cmake/lws_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#endif

#define LWS_INSTALL_DATADIR "${CMAKE_INSTALL_PREFIX}/share"
#define LWS_INSTALL_LIBDIR "${CMAKE_INSTALL_PREFIX}/${LWS_INSTALL_LIB_DIR}"
#define LWS_INSTALL_LIBDIR "${LWS_ABSOLUTE_INSTALL_LIBDIR}"
#define LWS_PLUGIN_DIR "${LWS_INSTALL_PLUGIN_DIR}"
#define LWS_LIBRARY_VERSION_MAJOR ${LWS_LIBRARY_VERSION_MAJOR}
#define LWS_LIBRARY_VERSION_MINOR ${LWS_LIBRARY_VERSION_MINOR}
Expand Down
1 change: 1 addition & 0 deletions include/libwebsockets.h
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ lws_fx_string(const lws_fx_t *a, char *buf, size_t size);
#include <libwebsockets/lws-http.h>
#if defined(LWS_ROLE_H3)
#include <libwebsockets/lws-qpack.h>
#include <libwebsockets/lws-webtransport.h>
#endif
#include <libwebsockets/lws-spa.h>
#include <libwebsockets/lws-async-ipc.h>
Expand Down
4 changes: 4 additions & 0 deletions include/libwebsockets/lws-client.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@ struct lws_client_connect_info {
* to the client connection.
*/

struct lws *quic_migrate_from_wsi;
/**< If set, this connection acts as a Make-Before-Break migration probe for
* the existing QUIC network connection in quic_migrate_from_wsi. */

uint8_t priority;
/**< 0 means normal priority... otherwise sets the IP priority on
* packets coming from this connection, from 1 - 7. Setting 7
Expand Down
22 changes: 22 additions & 0 deletions include/libwebsockets/lws-context-vhost.h
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,10 @@
#define LWS_SERVER_OPTION_GLIB (1ll << 33)
/**< (CTX) Use glib event loop */

#define LWS_SERVER_OPTION_QUIC_FORCE_RETRY (1ll << 52)
/**< (VH) For QUIC, force the server to always send a Retry packet.
* Normally used only for testing. */

#define LWS_SERVER_OPTION_H2_PRIOR_KNOWLEDGE (1ll << 34)
/**< (VH) Tell the vhost to treat plain text http connections as
* H2 with prior knowledge (no upgrade request involved)
Expand Down Expand Up @@ -284,6 +288,12 @@
#define LWS_SERVER_OPTION_QUIC_PAD_CRYPTO (1ll << 49)
/**< (VH) Pad the QUIC handshake crypto data to artificially hit anti-amplification limits */

#define LWS_SERVER_OPTION_QUIC_EARLY_KEY_UPDATE (1ll << 51)
/**< CONTEXT: For testing. Trigger a QUIC early key update */

#define LWS_SERVER_OPTION_QUIC_LATEST_VERSION (1ll << 50)
/**< (CTX) Force client to initiate QUIC connections using the latest supported version (e.g. v2) */

/****** add new things just above ---^ ******/


Expand Down Expand Up @@ -1102,7 +1112,19 @@ struct lws_context_creation_info {
const struct lws_cc_ops *quic_cc_ops;
/**< CONTEXT: QUIC congestion control algorithm ops to use. If NULL, defaults to &lws_cc_ops_newreno. */

const char *quic_preferred_addresses;
/**< VHOST: Comma-separated list of IPv4 and/or IPv6 preferred addresses (e.g., "1.2.3.4:443,[2001:db8::1]:443")
* to send to the client during the handshake to facilitate Connection Migration. */

uint32_t quic_initial_cwnd;
/**< CONTEXT: 0 for default (10 * MTU), or the desired initial congestion window in bytes */

uint32_t quic_0rtt_max_size;
/**< CONTEXT: 0 for default (4096), or the desired max 0-RTT early data size */

#if !defined(__STRICT_ANSI__)
void *_unused[1]; /**< dummy */
#endif
};

/**
Expand Down
1 change: 1 addition & 0 deletions include/libwebsockets/lws-lecp.h
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ struct lecp_ctx {
uint8_t pst_sp; /* parsing stack head */
uint8_t outer_array;
uint8_t cbor_pos;
uint8_t cbor_len;
uint8_t literal_cbor_report;
char present; /* temp for cb reason to use */

Expand Down
9 changes: 9 additions & 0 deletions include/libwebsockets/lws-misc.h
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,15 @@ lws_get_library_version(void);
LWS_VISIBLE LWS_EXTERN void *
lws_wsi_user(struct lws *wsi);

/**
* lws_ensure_user_space() - allocate user space for wsi if not already allocated
* \param wsi: lws connection
*
* returns 0 if user space exists or was allocated, else non-zero.
*/
LWS_VISIBLE LWS_EXTERN int
lws_ensure_user_space(struct lws *wsi);

/**
* lws_wsi_tsi() - get the service thread index the wsi is bound to
* \param wsi: lws connection
Expand Down
1 change: 1 addition & 0 deletions include/libwebsockets/lws-quic.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ struct lws_cc_ops {
void (*on_sent)(struct lws *nwsi, size_t bytes);
void (*on_ack)(struct lws *nwsi, size_t bytes_acked, lws_usec_t rtt);
void (*on_loss)(struct lws *nwsi, size_t bytes_lost);
void (*on_discard)(struct lws *nwsi, size_t bytes_discarded);
int (*can_send)(struct lws *nwsi, size_t bytes);
lws_usec_t (*get_pacing_delay)(struct lws *nwsi, size_t bytes_to_send);
};
Expand Down
9 changes: 9 additions & 0 deletions include/libwebsockets/lws-webtransport.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,14 @@ lws_wt_create_stream(struct lws *wsi_session, int unidi);
LWS_VISIBLE LWS_EXTERN int
lws_wt_is_session(struct lws *wsi);

LWS_VISIBLE LWS_EXTERN int
lws_wt_is_unidi(struct lws *wsi);

LWS_VISIBLE LWS_EXTERN struct lws *
lws_wt_create_stream_from_child(struct lws *child_wsi, int unidi);

LWS_VISIBLE LWS_EXTERN struct lws *
lws_wt_get_session_wsi(struct lws *wsi);

#endif /* LWS_ROLE_WT */
#endif /* _LWS_WEBTRANSPORT_H */
14 changes: 14 additions & 0 deletions include/libwebsockets/lws-x509.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,20 @@ LWS_VISIBLE LWS_EXTERN int
lws_x509_info(struct lws_x509_cert *x509, enum lws_tls_cert_info type,
union lws_tls_cert_info_results *buf, size_t len);

/**
* lws_x509_cert_fingerprint() - Calculate the fingerprint of a certificate
*
* \param x509: the certificate to fingerprint
* \param type: the hash type (e.g., LWS_GENHASH_TYPE_SHA256)
* \param buf: buffer to receive the binary hash
* \param len: max length of the buffer
*
* Returns the hash length on success, or -1 on failure.
*/
LWS_VISIBLE LWS_EXTERN int
lws_x509_cert_fingerprint(struct lws_x509_cert *x509, int type,
uint8_t *buf, size_t len);

/**
* lws_tls_peer_cert_info() - get information from the peer's TLS cert
*
Expand Down
8 changes: 4 additions & 4 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ endif()
file(WRITE "${PROJECT_BINARY_DIR}/libwebsockets.pc"
"prefix=\"${CMAKE_INSTALL_PREFIX}\"
exec_prefix=\${prefix}
libdir=\${exec_prefix}/${LWS_INSTALL_LIB_DIR}
includedir=\${prefix}/${LWS_INSTALL_INCLUDE_DIR}
libdir=${PKG_CONFIG_LIBDIR}
includedir=${PKG_CONFIG_INCLUDEDIR}

Name: libwebsockets
Description: Websockets server and client library
Expand All @@ -451,8 +451,8 @@ endif()
file(WRITE "${PROJECT_BINARY_DIR}/libwebsockets_static.pc"
"prefix=\"${CMAKE_INSTALL_PREFIX}\"
exec_prefix=\${prefix}
libdir=\${exec_prefix}/${LWS_INSTALL_LIB_DIR}
includedir=\${prefix}/${LWS_INSTALL_INCLUDE_DIR}
libdir=${PKG_CONFIG_LIBDIR}
includedir=${PKG_CONFIG_INCLUDEDIR}

Name: libwebsockets_static
Description: Websockets server and client static library
Expand Down
20 changes: 20 additions & 0 deletions lib/core-net/adopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,6 +805,16 @@ lws_create_adopt_udp2(struct lws *wsi, const char *ads,
if (sock.sockfd == LWS_SOCK_INVALID)
goto resume;

{
int opt = 4 * 1024 * 1024;
if (setsockopt(sock.sockfd, SOL_SOCKET, SO_RCVBUF, (const char *)&opt, sizeof(opt)) < 0) {
lwsl_wsi_warn(wsi, "Failed to set SO_RCVBUF");
}
if (setsockopt(sock.sockfd, SOL_SOCKET, SO_SNDBUF, (const char *)&opt, sizeof(opt)) < 0) {
lwsl_wsi_warn(wsi, "Failed to set SO_SNDBUF");
}
}

if (lws_plat_apply_FD_CLOEXEC((int)sock.sockfd) ||
lws_plat_set_nonblocking(sock.sockfd)) {
compatible_close(sock.sockfd);
Expand Down Expand Up @@ -974,6 +984,16 @@ lws_create_adopt_udp2(struct lws *wsi, const char *ads,
if (sock.sockfd == LWS_SOCK_INVALID)
goto bail;

{
int opt = 4 * 1024 * 1024;
if (setsockopt(sock.sockfd, SOL_SOCKET, SO_RCVBUF, (const char *)&opt, sizeof(opt)) < 0) {
lwsl_wsi_warn(wsi, "Failed to set SO_RCVBUF");
}
if (setsockopt(sock.sockfd, SOL_SOCKET, SO_SNDBUF, (const char *)&opt, sizeof(opt)) < 0) {
lwsl_wsi_warn(wsi, "Failed to set SO_SNDBUF");
}
}

if (lws_plat_apply_FD_CLOEXEC((int)sock.sockfd) ||
lws_plat_set_nonblocking(sock.sockfd)) {
compatible_close(sock.sockfd);
Expand Down
8 changes: 7 additions & 1 deletion lib/core-net/client/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ lws_client_connect_via_info(const struct lws_client_connect_info *i)
wsi->client_proxy_onward = !!(i->ssl_connection & LCCSCF_SECSTREAM_PROXY_ONWARD);
#endif

#if defined(LWS_ROLE_QUIC)
wsi->quic.migrate_from_wsi = i->quic_migrate_from_wsi;
#endif

#if defined(LWS_WITH_SYS_FAULT_INJECTION)
wsi->fic.name = "wsi";
if (i->fic.fi_owner.count)
Expand Down Expand Up @@ -250,6 +254,8 @@ lws_client_connect_via_info(const struct lws_client_connect_info *i)
wsi->keep_warm_secs = 5;

wsi->flags = i->ssl_connection;
if (i->context->options & LWS_SERVER_OPTION_ALLOW_EARLY_DATA)
wsi->flags |= LCCSCF_ALLOW_EARLY_DATA;

wsi->c_pri = i->priority;

Expand Down Expand Up @@ -347,7 +353,7 @@ lws_client_connect_via_info(const struct lws_client_connect_info *i)
}

#if defined(LWS_WITH_TLS)
wsi->tls.use_ssl = (unsigned int)i->ssl_connection;
wsi->tls.use_ssl = (unsigned int)wsi->flags;
#else
if (i->ssl_connection & LCCSCF_USE_SSL) {
lwsl_wsi_err(wsi, "lws not configured for tls");
Expand Down
Loading
Loading