Skip to content

Commit

Permalink
adjust tls parse header length to 0x800
Browse files Browse the repository at this point in the history
Signed-off-by: yuguorui <[email protected]>
  • Loading branch information
yuguorui committed Dec 30, 2024
1 parent fb54dfb commit 6530862
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/redirect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ async fn handle_tcp(inbound: &mut tokio::net::TcpStream) -> Result<()> {
use crate::rules::{InboundProtocol, RouteContext, TargetAddr};
use crate::utils::{is_valid_domain, transfer_tcp};

let mut buffer = [0u8; 0x400];
let mut buffer = [0u8; 0x800];
inbound.peek(&mut buffer).await?;

let domain = crate::sniffer::parse_host(&buffer).filter(|s| is_valid_domain(s.as_str()));
Expand Down
2 changes: 1 addition & 1 deletion src/tproxy/tproxy_linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async fn handle_tcp(inbound: &mut tokio::net::TcpStream) -> Result<()> {
use crate::rules::{InboundProtocol, RouteContext, TargetAddr};
use crate::utils::{is_valid_domain, transfer_tcp};

let mut buffer = [0u8; 0x400];
let mut buffer = [0u8; 0x800];
inbound.peek(&mut buffer).await?;

let domain = crate::sniffer::parse_host(&buffer).filter(|s| is_valid_domain(s.as_str()));
Expand Down

0 comments on commit 6530862

Please sign in to comment.