sessions and muxer legs

This commit is contained in:
2026-03-27 15:57:04 +07:00
parent fffc3794b9
commit f4c6f2efdd
13 changed files with 974 additions and 540 deletions
+13 -1
View File
@@ -144,6 +144,10 @@ impl TlsBridge {
) -> Result<Bytes, TlsError> {
if let HandshakeMessage::Client { base, extensions } = client_msg {
if base.session_id.len() != 32 {
netrunner_logger::warn!(
"❌ Auth failed: Expected 32 bytes SessionID, got {}. Client IP: ...",
base.session_id.len()
);
return Err(TlsError::new(
ErrorStage::Handshake("Invalid SessionID len"),
ErrorAction::Drop,
@@ -152,7 +156,15 @@ impl TlsBridge {
}
let mut received_tag = [0u8; 16];
received_tag.copy_from_slice(&base.session_id[16..32]);
if base.session_id.len() >= 32 {
received_tag.copy_from_slice(&base.session_id[16..32]);
} else {
return Err(TlsError::new(
ErrorStage::Handshake("Short SessionID"),
ErrorAction::Drop,
Bytes::new(),
));
}
if !keys.verify_auth_tag(&received_tag) {
netrunner_logger::warn!("Unauthorized ClientHello: Auth Tag mismatch");