Skip to content

Commit

Permalink
WIP socks connect.domain frame
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien committed Dec 19, 2024
1 parent 35e073d commit eb8853b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rust/src/socks/socks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ enum SocksEvent {
#[derive(AppLayerFrameType)]
pub enum SocksFrameType {
Pdu,
ConnectDomain,
}

pub struct SocksTransactionAuthMethods {
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit eb8853b

Please sign in to comment.