Skip to content

fix(mitm): forward passthrough traffic to the real requested host (#10479) - #10762

Merged
diegosouzapw merged 1 commit into
release/v3.8.50from
fix/10479-mitm-passthrough-unknown-hosts
Aug 19, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.50from
fix/10479-mitm-passthrough-unknown-hosts

Conversation

@diegosouzapw

Copy link
Copy Markdown
Collaborator

Closes #10479

Root cause: AgentBridge's standalone MITM proxy (src/mitm/server.cjs) misrouted passthrough traffic for any host outside TARGET_HOSTS. getTargetHost()'s fallback branch hardcoded "daily-cloudcode-pa.sandbox.googleapis.com" instead of the real requested Host header — dead code in the original Antigravity DNS-spoof flow (where the Host header is guaranteed to be a TARGET_HOSTS member), but the new transparent-redirect/HTTP-proxy passthrough() call path lets clients reach arbitrary internet hosts through the same function, so any host NOT in TARGET_HOSTS was silently forwarded to Google's Cloud Code API instead of the actual requested destination.

Fix: getTargetHost() now always returns the real requested Host header.

Regression test: tests/unit/mitm-passthrough-real-host-10479.test.ts. Verified no regression against 36 existing tests in mitm-server-connect.test.ts, mitm-manager-bypass-json.test.ts, agentbridge-antigravity-cert-hosts-6494.test.ts.

@diegosouzapw
diegosouzapw merged commit 6b83075 into release/v3.8.50 Aug 19, 2026
11 checks passed
@diegosouzapw
diegosouzapw deleted the fix/10479-mitm-passthrough-unknown-hosts branch August 19, 2026 15:49
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] TrafficInspector not showing a curl request

2 participants