1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-30 00:00:16 +01:00
libwebsockets/lib
Andy Green 42dc817d8f ss: proxy: get rx flow control working
This fixes the proxy rx flow by adding an lws_dsh helper to hide the
off-by-one in the "kind" array (kind 0 is reserved for tracking the
unallocated dsh blocks).

For testing, it adds a --blob option on minimal-secure-streams[-client]
which uses a streamtype "bulkproxflow" from here

https://warmcat.com/policy/minimal-proxy-v4.2-v2.json

		"bulkproxflow": {
			"endpoint": "warmcat.com",
			"port": 443,
			"protocol": "h1",
			"http_method": "GET",
			"http_url": "blob.bin",
			"proxy_buflen": 32768,
			"proxy_buflen_rxflow_on_above": 24576,
			"proxy_buflen_rxflow_off_below": 8192,
			"tls": true,
			"retry": "default",
			"tls_trust_store": "le_via_dst"
		}

This downloads a 51MB blob of random data with the SHA256sum

ed5720c16830810e5829dfb9b66c96b2e24efc4f93aa5e38c7ff4150d31cfbbf

The minimal-secure-streams --blob example client delays the download by
50ms every 10KiB it sees to force rx flow usage at the proxy.

It downloads the whole thing and checks the SHA256 is as expected.

Logs about rxflow status are available at LLL_INFO log level.
2021-04-07 15:54:26 +01:00
..
abstract cmakelist: Augean Stables refactor 2020-05-27 08:40:12 +01:00
core windows: work well with vcpkg pthreads 2021-04-05 10:55:04 +01:00
core-net ss: proxy: get rx flow control working 2021-04-07 15:54:26 +01:00
drivers lws_netdev: fix rssi averaging 2020-07-21 08:16:01 +01:00
event-libs uloop 2021-03-17 12:23:34 +00:00
jose jwt: sign via info 2021-03-25 08:40:52 +00:00
misc Fault injection 2021-04-05 10:55:04 +01:00
plat windows: cancel pipe is in pts not context 2021-04-05 10:55:04 +01:00
roles windows: pipe role does not use file handle any more 2021-04-05 10:55:04 +01:00
secure-streams ss: proxy: get rx flow control working 2021-04-07 15:54:26 +01:00
system Fault injection 2021-04-05 10:55:04 +01:00
tls windows: work well with vcpkg pthreads 2021-04-05 10:55:04 +01:00
CMakeLists.txt cmake: check if _GNU_SOURCE is already defined 2021-03-25 10:08:41 +00:00
README.md cleaning 2020-01-05 22:17:58 +00:00

Library sources layout

Code that goes in the libwebsockets library itself lives down ./lib

Path Sources
lib/core Core lws code related to generic fd and wsi servicing and management
lib/core-net Core lws code that applies only if networking enabled
lib/event-libs Code containing optional event-lib specific adaptations
lib/jose JOSE / JWS / JWK / JWE implementations
lib/misc Code for various mostly optional miscellaneous features
lib/plat Platform-specific adaptation code
lib/roles Code for specific optional wsi roles, eg, http/1, h2, ws, raw, etc
lib/system Code for system-level features, eg, dhcpclient
lib/tls Code supporting the various TLS libraries