fix: revert UoT POST back to GET for direct DPI bypass without proxy

This commit is contained in:
ospab 2026-05-21 14:05:43 +03:00
parent 9e2b29723c
commit 960382e93b
2 changed files with 3 additions and 4 deletions

View File

@ -88,10 +88,9 @@ pub async fn connect_xhttp(
let http_host = if sni.is_empty() { target_ip.to_string() } else { sni.to_string() }; let http_host = if sni.is_empty() { target_ip.to_string() } else { sni.to_string() };
let req = format!( let req = format!(
"POST /stream HTTP/1.1\r\n\ "GET /stream HTTP/1.1\r\n\
Host: {}\r\n\ Host: {}\r\n\
Authorization: Bearer {}\r\n\ Authorization: Bearer {}\r\n\
Content-Length: 99999999999\r\n\
Connection: keep-alive\r\n\ Connection: keep-alive\r\n\
\r\n", \r\n",
http_host, auth_token http_host, auth_token

View File

@ -38,7 +38,7 @@ pub async fn handle_tcp_connection(
let headers_str = String::from_utf8_lossy(&buf[..header_len]); let headers_str = String::from_utf8_lossy(&buf[..header_len]);
// Fast-fail scanner bots // Fast-fail scanner bots
if !headers_str.starts_with("POST /stream HTTP/1.1\r\n") { if !headers_str.starts_with("GET /stream HTTP/1.1\r\n") {
send_404(&mut stream).await?; send_404(&mut stream).await?;
anyhow::bail!("invalid request line"); anyhow::bail!("invalid request line");
} }
@ -108,7 +108,7 @@ pub async fn handle_tcp_connection(
} }
// Reply 200 OK // Reply 200 OK
let response = "HTTP/1.1 200 OK\r\nX-Ostp-Server: 1\r\nContent-Length: 99999999999\r\nConnection: keep-alive\r\n\r\n"; let response = "HTTP/1.1 200 OK\r\nX-Ostp-Server: 1\r\nConnection: keep-alive\r\n\r\n";
stream.write_all(response.as_bytes()).await?; stream.write_all(response.as_bytes()).await?;
info!("UoT client authenticated from {}", peer_addr); info!("UoT client authenticated from {}", peer_addr);