check inner packet srcIP against server-verified srcIP, Windows support

This commit is contained in:
2026-07-24 23:49:42 +02:00
parent 48811df6ed
commit 2b1de6460a
8 changed files with 219 additions and 51 deletions

View File

@@ -12,7 +12,7 @@ const PROTO_VERSION uint16 = 1
// multicastKey - key shared between everyone for encrypting multicast packets
// authSecret - secret assigned to a client for authenticating subsequent requests
// SYM = XChaCha20Poly1305 with nonce prepended
// SYM = XChaCha20-Poly1305 with nonce prepended
// HMAC = HMAC-SHA-256
// hpke = HPKE(MLKEM768X25519, ChaCha20Poly1305, HKDF-SHA-256)
// ds = ML-DSA
@@ -49,7 +49,7 @@ const (
// [ HMAC(authSecret, rest) - 32 bytes ] [ destIP - 16 bytes ] [ srcIP - 16 bytes ] [ SYM(sessionKey, pkt) ]
UNICAST_PKT
// (client -> server -> *) broadcasts an encrypted packet
// [ HMAC(authSecret, rest) - 32 bytes ] [ SYM(multicastKey, pkt) ]
// [ HMAC(authSecret, rest) - 32 bytes ] [ srcIP - 16 bytes ] [ SYM(multicastKey, pkt) ]
BROADCAST_PKT
)