Commit Graph

9300 Commits

Author SHA1 Message Date
Maximilian Hils
8938aec2c0 [sans-io] adjust tls tests 2020-12-12 21:24:17 +01:00
Maximilian Hils
25373672c5 [sans-io] move top-layer determination to next layer addon 2020-12-12 21:24:17 +01:00
Maximilian Hils
467dc81d19 [sans-io] adapt to asyncio changes in core 2020-12-12 21:24:17 +01:00
Maximilian Hils
8f3db90def [sans-io] split tls layer into client and server layers
this drastically reduces the complexity of the TLS code and
makes it easier to implement the remaining bits.
2020-12-12 21:24:17 +01:00
Maximilian Hils
34274744a1 [sans-io] improve layer debugging 2020-12-12 21:24:17 +01:00
Maximilian Hils
005a5afe47 [sans-io] add initial work on HTTP proxying 2020-12-12 21:24:17 +01:00
Maximilian Hils
a4c357a1a2 [sans-io] minor fixes, make dev server usable again 2020-12-12 21:24:17 +01:00
Maximilian Hils
c8f1b3d7f9 [sans-io] make context.server non-optional
this makes for a nicer API, we just check for a missing address now.
2020-12-12 21:24:17 +01:00
Maximilian Hils
edaf3219fc [sans-io] improve logging 2020-12-12 21:24:17 +01:00
Maximilian Hils
b5a3343d03 [sans-io] add ALPN support to TLS layer, tests++ 2020-12-12 21:24:17 +01:00
Maximilian Hils
3f7b850268 [sans-io] test server tls 2020-12-12 21:24:17 +01:00
Maximilian Hils
4cd83ee0af [sans-io] minor test improvements 2020-12-12 21:24:17 +01:00
Maximilian Hils
a402bfed24 [sans-io] simplify tls layer 2020-12-12 21:24:17 +01:00
Maximilian Hils
c6262f9e9c [sans-io] remove hook reply
This is not desired as hooks modify the passed object itself
instead of returning a custom reply.
2020-12-12 21:24:17 +01:00
Maximilian Hils
1fa2e59734 [sans-io] add initial tls tests 2020-12-12 21:24:17 +01:00
Maximilian Hils
eaa8b32dd7 [sans-io] less verbose read/send logging 2020-12-12 21:24:17 +01:00
Maximilian Hils
9ea0259bb7 [sans-io] improve ClientHello parsing, add tests 2020-12-12 21:24:17 +01:00
Ujjwal Verma
0cb06b428e Moved tests 2020-12-12 21:24:17 +01:00
Ujjwal Verma
1ad7b794d7 Lint 2020-12-12 21:24:16 +01:00
Ujjwal Verma
41c79bf837 Parse Client hello from buffer 2020-12-12 21:24:16 +01:00
Maximilian Hils
3efcba777f add connection_strategy option 2020-12-12 21:24:16 +01:00
Maximilian Hils
8a66217daa [sans-io] add new tls layer (wip)
this implementation is considerably more complex that the previous one,
but supports different client and server states.
2020-12-12 21:24:16 +01:00
Maximilian Hils
47e83d73cb [sans-io] improve logging 2020-12-12 21:24:16 +01:00
Maximilian Hils
967d48bdfa [sans-io] remove hook replies
Hooks should not have immediate replies. Instead, they should modify
the object passed over the hook.
2020-12-12 21:24:16 +01:00
Maximilian Hils
4a9cd7f36f [sans-io] move tls layer proof-of-concept 2020-12-12 21:24:16 +01:00
Maximilian Hils
753d0ade7e [sans-io] implement layer selection as an addon 2020-12-12 21:24:16 +01:00
Maximilian Hils
eddef85f5f [sans-io] add options to context 2020-12-12 21:24:16 +01:00
Maximilian Hils
e7b67e96a2 [sans-io] merge ClientServerContext and Context 2020-12-12 21:24:16 +01:00
Maximilian Hils
446472d38e [sans-io] improve folder structure 2020-12-12 21:24:16 +01:00
Ujjwal Verma
4c2fb7f250 add sans-io websocket layer 2020-12-12 21:24:16 +01:00
Maximilian Hils
6d59d213e3 protocols: docs++, minor test improvements 2020-12-12 21:24:16 +01:00
Maximilian Hils
2679387849 protocols: add playbook.fork() 2020-12-12 21:24:16 +01:00
Maximilian Hils
41597272f9 protocols: make playbooks immutable 2020-12-12 21:24:16 +01:00
Maximilian Hils
2e3704faf1 add websocket stub 2020-12-12 21:24:16 +01:00
Maximilian Hils
9757403008 complete proxyserver addon
this is still a lot of glue code, but generally functional.
2020-12-12 21:24:16 +01:00
Maximilian Hils
a309cdb56c simplify async server 2020-12-12 21:24:16 +01:00
Maximilian Hils
d8621553b1 suppress typing complaints in tests 2020-12-12 21:24:16 +01:00
Maximilian Hils
2a68029b21 improve command repr 2020-12-12 21:24:16 +01:00
Maximilian Hils
c4824f941d tcp layer: handle connection error 2020-12-12 21:24:16 +01:00
Maximilian Hils
4bca88608b add proxy server addon (wip) 2020-12-12 21:24:16 +01:00
Maximilian Hils
f28e7e5f0f minor fixes 2020-12-12 21:24:16 +01:00
Maximilian Hils
35475f6719 async server: implement close command 2020-12-12 21:24:16 +01:00
Maximilian Hils
b14b487cbe test syntax experimentations 2020-12-12 21:24:16 +01:00
Maximilian Hils
b61d638192 minor changes to connection closing 2020-12-12 21:24:16 +01:00
Maximilian Hils
fef17c0706 add test playbook placeholders, complete tcp layer 2020-12-12 21:24:16 +01:00
Maximilian Hils
adfe181423 use a single DataReceived event
this makes sure that we avoid any inconsistencies
2020-12-12 21:24:16 +01:00
Maximilian Hils
14a4254285 OpenConnection: add err attr, remove ok attr 2020-12-12 21:24:16 +01:00
Maximilian Hils
a415edbb7c add exemplary tcp layer tests 2020-12-12 21:24:16 +01:00
Maximilian Hils
8898af188e add http1 layer based on h11 2020-12-12 21:24:16 +01:00
Maximilian Hils
3b355d783f events are past tense 2020-12-12 21:24:16 +01:00