Luca Fulchir
c8ee2995d9
Review conn tracking, data reporting
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-28 18:49:33 +02:00
Luca Fulchir
d8a27bf969
Stream ROB: Reconstruct data TCP-like
...
this was more convoluted than I thought.
maybe someone will simplify this.
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-25 19:22:40 +02:00
Luca Fulchir
d8cc5ca974
Stream enqueue and serialize to the packet
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-22 20:12:50 +02:00
Luca Fulchir
e3ae166ca9
User conn tracking, enqueue data, timers
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-22 12:50:47 +02:00
Luca Fulchir
b49ede334f
Give the user a tracker for conn interactions
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-20 20:56:34 +02:00
Luca Fulchir
e4b50f50d2
Namespace split the dirsync request/response
...
There was no big problem, but it was messy
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-19 21:57:27 +02:00
Luca Fulchir
08025de8f5
Rename lots of stuff to properly use namespaces
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-19 20:25:31 +02:00
Luca Fulchir
e1aa3ef074
Stream stubs, start using namespaces as intended
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-19 18:37:28 +02:00
Luca Fulchir
376e8fb833
Remove some warnings
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-17 14:06:57 +02:00
Luca Fulchir
866edc2d7d
TONS of bugfixing. Add tests. Client now connects
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-17 11:33:47 +02:00
Luca Fulchir
b682068dca
Test and fix shutdowns
...
we have a Quick but partial shutdown, which lets the async "threads"
work in the background and shutdown after a bit more time
and the graceful/full shutdown, which waits for everything.
Unfortunately `Drop` can't manage async and blocks everything,
no way to yeld either, so if we only have a thread
we would deadlock if we tried to stop things gracefully
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-11 22:45:40 +02:00
Luca Fulchir
aff1c313f5
Cleanup & incomplete tests
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-10 14:42:24 +02:00
Luca Fulchir
faaf8762c7
Test (de)serialization of DirSync::Resp
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-09 21:58:33 +02:00
Luca Fulchir
a32dfe098f
Add the git pre-commit hook
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-09 21:02:42 +02:00
Luca Fulchir
e2874451d1
Return error from parsing the encrypted ReqData
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-09 20:05:59 +02:00
Luca Fulchir
4df73b658a
Correctly test for equality the DirSync::Req
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-09 20:01:18 +02:00
Luca Fulchir
a6fda8180d
DNSSEC: move keys before addresses
...
it was kinda stupid to keep the keys *after* the addresses
but have the addresses keep an index to the array of pubkeys anyway
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-09 19:09:41 +02:00
Luca Fulchir
5625bd95a4
Test request serialization
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-09 19:06:58 +02:00
Luca Fulchir
55e10a60c6
Fix Dnssec record serializing/deserializing
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-09 14:55:49 +02:00
Luca Fulchir
787e11e8e4
Fixes for Hati
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-07 11:07:46 +02:00
Luca Fulchir
6da5464c68
Helpers for dnssec
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-06 22:37:34 +02:00
Luca Fulchir
3e09b9cee0
Send initial dirsync packet and handshake timeout
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-05 10:33:25 +02:00
Luca Fulchir
289c6c318e
More work on Dirsync request sending
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-05 09:18:32 +02:00
Luca Fulchir
9634fbba31
Move enc::sym::Secret to enc::Secret
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-01 12:56:52 +02:00
Luca Fulchir
5b338c8758
More on negotiation and dnssec record verification
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-01 12:52:43 +02:00
Luca Fulchir
08d2755656
KeyExchange->KeyExchangeKind for consistency
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-01 11:48:32 +02:00
Luca Fulchir
ac213a6528
More work on key exhcnage negotiation
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-06-01 11:41:10 +02:00
Luca Fulchir
1bae4c9953
DNSSEC: add ciphers/key exchanges/hkdfs
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-30 15:50:48 +02:00
Luca Fulchir
c6a3bf0820
More work on connect(), use our own Random
...
We use :💍 :rand::SystemRandom, but we need to wrap it
for a couple of traits needed by ::x25519_dalek
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-30 10:52:54 +02:00
Luca Fulchir
a3430f1813
Initial connections: share auth.server connection
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-28 18:23:14 +02:00
Luca Fulchir
110a346551
dnssec: use the proper enc::asym types
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-28 15:26:17 +02:00
Luca Fulchir
e581cb064a
Update architecture.md
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-27 11:10:29 +02:00
Luca Fulchir
1259996201
Connect boilerplate, cleanup
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-27 10:57:15 +02:00
Luca Fulchir
e71167224c
Track auth and service connections client side
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-26 15:02:21 +02:00
Luca Fulchir
4287540695
Upgrade flakes to 23.05
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-24 22:32:41 +02:00
Luca Fulchir
810cc16ce6
More thread-pinning work.
...
No more Arc<Connection>, Rc<Connection> is better on the same thread.
Track the thread number so we can generate the correct connection IDs
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-24 17:30:15 +02:00
Luca Fulchir
9b33ed8828
Refactor, more pinned-thread work
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-24 15:45:37 +02:00
Luca Fulchir
c0d6cf1824
Per-thread work loop
...
This will let us have a lot less locking.
We can do better in the future with ebpf and pinning connection to
a specific CPU with multiple listen() points on the same address,
but good enough for now
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-23 18:20:08 +02:00
Luca Fulchir
28cbe2ae20
more refactoring
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-22 15:05:17 +02:00
Luca Fulchir
ace56f32e7
refactor lib.rs in other files
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-17 12:05:13 +02:00
Luca Fulchir
a5f18ac533
DirSync::Resp work
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-17 10:26:39 +02:00
Luca Fulchir
7a129dbe90
Handhsake DirSync RespInner
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-05-11 11:28:30 +02:00
Luca Fulchir
d1e1006143
update flakes, randomize mutex
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-03-01 18:20:03 +01:00
Luca Fulchir
7bddc9bf55
ConnTrack with ciphers
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-02-26 10:44:21 +01:00
Luca Fulchir
f53ef95c73
Track new connection
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-02-25 22:25:52 +01:00
Luca Fulchir
bfe99b4c9c
Strong types for server/receiver and send packet
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-02-25 16:33:48 +01:00
Luca Fulchir
4157c207a3
DirSync response serialization
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-02-25 15:36:14 +01:00
Luca Fulchir
59394959bd
MPMC queue to distribute work on threads
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-02-24 22:00:56 +01:00
Luca Fulchir
0d33033c0b
SocketList: arcswap the list of SocketList
...
faster socket add/remove, so that we can search this list
to find with wich socket we should send
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-02-23 21:57:21 +01:00
Luca Fulchir
c3aff3e8df
Preparation work to write/encrypt response
...
Signed-off-by: Luca Fulchir <luca.fulchir@runesauth.com>
2023-02-22 21:10:00 +01:00