mirror of https://github.com/ospab/ostp.git
The previous commit added random padding after Noise handshake payloads but the receiver passed the entire raw buffer (including padding) to snow::read_handshake(), which cannot handle trailing bytes. New wire format: [session_id:4][noise_len:2][noise_payload:N][random_padding:32-128] Changes: - wrap_datagram_handshake: puts noise_len (u16 BE) at bytes [4..6] before the Noise payload, followed by 32-128 random padding bytes - handle_inbound: reads noise_len from [4..6], passes only raw_vec[6..6+noise_len] to snow, ignoring trailing padding - obfuscation: handshake mask extended from 4 to 6 bytes to also cover the noise_len field (prevents DPI from seeing constant u16) - dispatcher: key-trial loop updated to deobfuscate 6-byte header Both client and server now produce/consume the same padded format. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||