fix: standalone MITM — remove HTTPS_PROXY with iptables, fix is_agent detection
- Only set HTTPS_PROXY/HTTP_PROXY when iptables UID isolation is NOT
available. With iptables, double-proxying caused profile picture
fetches to fail with 'lookup http' DNS errors.
- Fix is_agent detection: handle JSON with spaces after colons
("requestType": "agent" vs "requestType":"agent")
- Suppress wrapper-not-installed warning in standalone mode
- Show 'iptables (standalone)' in banner instead of 'not installed'
This commit is contained in:
@@ -551,9 +551,9 @@ async fn handle_http_over_tls(
|
||||
let raw_body = super::modify::dechunk(body_slice);
|
||||
|
||||
// Only modify "agent" requests, not "checkpoint" (LS internal)
|
||||
let is_agent = raw_body
|
||||
.windows(20)
|
||||
.any(|w| w == b"\"requestType\":\"agent" || w == b"requestType\":\"agent\"");
|
||||
let body_str = String::from_utf8_lossy(&raw_body);
|
||||
let is_agent = body_str.contains("\"requestType\":\"agent\"")
|
||||
|| body_str.contains("\"requestType\": \"agent\"");
|
||||
|
||||
if is_agent {
|
||||
if let Some(modified_body) = super::modify::modify_request(&raw_body) {
|
||||
|
||||
Reference in New Issue
Block a user