From eb8853b808d065bbc30aa54d2fd11cb83b0ac991 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Thu, 19 Dec 2024 22:12:08 +0100 Subject: [PATCH] WIP socks connect.domain frame --- rust/src/socks/socks.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/rust/src/socks/socks.rs b/rust/src/socks/socks.rs index d8fa3a4e684e..93cb386cc9df 100644 --- a/rust/src/socks/socks.rs +++ b/rust/src/socks/socks.rs @@ -38,6 +38,7 @@ enum SocksEvent { #[derive(AppLayerFrameType)] pub enum SocksFrameType { Pdu, + ConnectDomain, } pub struct SocksTransactionAuthMethods { @@ -276,6 +277,11 @@ impl SocksState { match r { Ok((rem, request)) => { let mut tx = self.new_tx(); + if let Some(domain) = &request.domain { + let start = &rinput[5..]; + let len = domain.len() as i64; + _ = Frame::new(flow, stream_slice, start, len, SocksFrameType::ConnectDomain as u8, None); + } tx.connect = Some(SocksTransactionConnect { domain: request.domain, ipv4: request.ipv4,