handle unknown header on server

This commit is contained in:
MeexReay 2025-07-28 22:06:22 +03:00
parent d5511e1938
commit 270ef5cf84

View file

@ -102,6 +102,7 @@ async fn handle_request(
stack = match (stack, n) {
(0, b'\r') => 1,
(1, b'\n') => {
if !status {
if key == b"Host" {
remote = String::from_utf8(value.clone())?;
} else if key == b"Authentication" {
@ -111,11 +112,14 @@ async fn handle_request(
}
} else if key == b"UDP" {
udp = value == b"1";
} else {
return Err("unknown header provided!! malware connection".into());
}
is_key = true;
key.clear();
value.clear();
}
2
},
(2, b'\r') => 3,