1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-23 00:00:06 +01:00
libwebsockets/minimal-examples/secure-streams
Andy Green d291c02a23 ss: sspc: add conmon performance telemetry
This provides a way to get ahold of LWS_WITH_CONMON telemetry from Secure
Streams, it works the same with direct onward connections or via the proxy.

You can mark streamtypes with a "perf": true policy attribute... this
causes the onward connections on those streamtypes to collect information
about the connection performance, and the unsorted DNS results.

Streams with that policy attribute receive extra data in their rx callback,
with the LWSSS_FLAG_PERF_JSON flag set on it, containing JSON describing the
performance of the onward connection taken from CONMON data, in a JSON
representation.  Streams without the "perf" attribute set never receive
this extra rx.

The received JSON is based on the CONMON struct info and looks like

{"peer":"46.105.127.147","dns_us":596,"sockconn_us":31382,"tls_us":28180,"txn_resp_us:23015,"dns":["2001:41d0:2:ee93::1","46.105.127.147"]}

A new minimal example minimal-secure-streams-perf is added that collects
this data on an HTTP GET from warmcat.com, and is built with a -client
version as well if LWS_WITH_SECURE_STREAMS_PROXY_API is set, that operates
via the ss proxy and produces the same result at the client.
2021-04-05 10:55:04 +01:00
..
minimal-secure-streams Fault injection 2021-04-05 10:55:04 +01:00
minimal-secure-streams-alexa lws_metrics 2021-03-08 21:47:28 +00:00
minimal-secure-streams-avs logs: prioritize WITH_NO_LOGS even in release 2021-03-15 12:56:15 +00:00
minimal-secure-streams-client-tx minimal-ss-client-tx: add -c flag for count of rx to get 2021-02-26 08:23:12 +00:00
minimal-secure-streams-cpp wip: ss c++ classes 2020-12-02 10:15:50 +00:00
minimal-secure-streams-hugeurl ss: force check all set_metadata returns 2021-03-14 08:58:26 +00:00
minimal-secure-streams-metadata ss: force check all set_metadata returns 2021-03-14 08:58:26 +00:00
minimal-secure-streams-metrics-proxy lws_metrics 2021-03-08 21:47:28 +00:00
minimal-secure-streams-perf ss: sspc: add conmon performance telemetry 2021-04-05 10:55:04 +01:00
minimal-secure-streams-policy2c ip tos support 2021-02-04 10:28:02 +00:00
minimal-secure-streams-post ss: force check all set_metadata returns 2021-03-14 08:58:26 +00:00
minimal-secure-streams-proxy ss: sspc: add conmon performance telemetry 2021-04-05 10:55:04 +01:00
minimal-secure-streams-seq LE-root-cert-update 2021-01-13 04:32:13 +00:00
minimal-secure-streams-server ss: force check all set_metadata returns 2021-03-14 08:58:26 +00:00
minimal-secure-streams-server-raw type comparisons: fixes 2021-01-05 10:56:38 +00:00
minimal-secure-streams-sigv4 use gmtime_r instead of gmtime if possible 2021-03-25 10:08:40 +00:00
minimal-secure-streams-smd lws_metrics 2021-03-08 21:47:28 +00:00
minimal-secure-streams-staticpolicy lws_metrics 2021-03-08 21:47:28 +00:00
minimal-secure-streams-testsfail ss: force check all set_metadata returns 2021-03-14 08:58:26 +00:00
README.md client: secure streams 2020-03-04 12:17:49 +00:00

Secure Streams

Secure Streams is a client API that strictly decouples the policy for connections from the payloads. The user code only deals with the stream type name and payloads, a policy database set at lws_context creation time decides all policy about the connection, including the endpoint, tls CA, and even the wire protocol.

name demonstrates
minimal-secure-streams Minimal secure streams client / proxy example
minimal-secure-streams-tx Proxy used for client-tx test below
minimal-secure-streams-client-tx Secure streams client showing tx and rx