1# lws minimal secure streams
2
3The application goes to https://warmcat.com and reads index.html there.
4
5It does it using Secure Streams... the main code in minimal-secure-streams.c
6just sets up the context and opens a secure stream of type "mintest".
7
8The handler for state changes and payloads for "mintest" is in ss-myss.c
9
10The information about how a "mintest" stream should connect and the
11protocol it uses is kept separated in policy-database.c
12
13## build
14
15```
16 $ cmake . && make
17```
18
19## usage
20
21Commandline option|Meaning
22---|---
23-d <loglevel>|Debug verbosity in decimal, eg, -d15
24-f| Force connecting to the wrong endpoint to check backoff retry flow
25-p| Run as proxy server for clients to connect to over unix domain socket
26--force-portal|Force the SS Captive Portal Detection to feel it's behind a portal
27--force-no-internet|Force the SS Captive Portal Detection to feel it can't reach the internet
28
29```
30[2019/08/12 07:16:11:0045] USR: LWS minimal secure streams [-d<verbosity>] [-f]
31[2019/08/12 07:16:12:6102] USR: myss_state: LWSSSCS_CREATING, ord 0x0
32[2019/08/12 07:16:12:6107] USR: myss_state: LWSSSCS_POLL, ord 0x0
33[2019/08/12 07:16:12:6117] N: lws_ss_client_connect: connecting h1get warmcat.com /
34[2019/08/12 07:16:12:6118] USR: myss_state: LWSSSCS_CONNECTING, ord 0x0
35[2019/08/12 07:16:13:4171] USR: myss_state: LWSSSCS_CONNECTED, ord 0x0
36[2019/08/12 07:16:13:4222] USR: myss_rx: len 1024, flags: 1
37[2019/08/12 07:16:13:4243] USR: myss_rx: len 1024, flags: 0
38[2019/08/12 07:16:13:4244] USR: myss_rx: len 1024, flags: 0
39[2019/08/12 07:16:13:4244] USR: myss_rx: len 1024, flags: 0
40[2019/08/12 07:16:13:4245] USR: myss_rx: len 1024, flags: 0
41[2019/08/12 07:16:13:4246] USR: myss_rx: len 1024, flags: 0
42[2019/08/12 07:16:13:4247] USR: myss_rx: len 1024, flags: 0
43[2019/08/12 07:16:13:4252] USR: myss_rx: len 1015, flags: 0
44[2019/08/12 07:16:13:4264] USR: myss_rx: len 1024, flags: 0
45[2019/08/12 07:16:13:4265] USR: myss_rx: len 1024, flags: 0
46[2019/08/12 07:16:13:4266] USR: myss_rx: len 1024, flags: 0
47[2019/08/12 07:16:13:4267] USR: myss_rx: len 1024, flags: 0
48[2019/08/12 07:16:13:4268] USR: myss_rx: len 1024, flags: 0
49[2019/08/12 07:16:13:4268] USR: myss_rx: len 1024, flags: 0
50[2019/08/12 07:16:13:4269] USR: myss_rx: len 1024, flags: 0
51[2019/08/12 07:16:13:4270] USR: myss_rx: len 1015, flags: 0
52[2019/08/12 07:16:13:4278] USR: myss_rx: len 1024, flags: 0
53[2019/08/12 07:16:13:4279] USR: myss_rx: len 1024, flags: 0
54[2019/08/12 07:16:13:4280] USR: myss_rx: len 1024, flags: 0
55[2019/08/12 07:16:13:4281] USR: myss_rx: len 1024, flags: 0
56[2019/08/12 07:16:13:4282] USR: myss_rx: len 1024, flags: 0
57[2019/08/12 07:16:13:4283] USR: myss_rx: len 1024, flags: 0
58[2019/08/12 07:16:13:4283] USR: myss_rx: len 1024, flags: 0
59[2019/08/12 07:16:13:4284] USR: myss_rx: len 1015, flags: 0
60[2019/08/12 07:16:13:4287] USR: myss_rx: len 1024, flags: 0
61[2019/08/12 07:16:13:4288] USR: myss_rx: len 947, flags: 0
62[2019/08/12 07:16:13:4293] USR: myss_rx: len 0, flags: 2
63[2019/08/12 07:16:13:4399] USR: myss_state: LWSSSCS_DISCONNECTED, ord 0x0
64[2019/08/12 07:16:13:4761] USR: myss_state: LWSSSCS_DESTROYING, ord 0x0
65[2019/08/12 07:16:13:4781] USR: Completed: OK
66```
67