Skip to content

Fix Windows mirror/steal HTTP forwarding to wildcard-bound servers#4302

Draft
cristeigabriela wants to merge 1 commit into
metalbear-co:mainfrom
cristeigabriela:fix/win-e2e-http-forward-loopback
Draft

Fix Windows mirror/steal HTTP forwarding to wildcard-bound servers#4302
cristeigabriela wants to merge 1 commit into
metalbear-co:mainfrom
cristeigabriela:fix/win-e2e-http-forward-loopback

Conversation

@cristeigabriela
Copy link
Copy Markdown
Contributor

What

The intproxy HTTP gateway connected to the resolved listening_on address directly. #4264 (3817ef2c) dropped the normalize_connection_address call on this path while the raw-TCP path kept it. Connecting to a wildcard address (0.0.0.0) routes to loopback on Linux but fails on Windows, so every mirrored/stolen HTTP request to a wildcard-bound server failed there.

This restores the normalization in the HTTP gateway so it matches the TCP path.

How this was found

windows-e2e last passed at #4213 and was failing on main. Bisecting the 46 commits in between (CI probes at evenly-spaced commits) isolated the regression to #4264 — id 44 passed, id 45 (#4264) failed. The failing tests are all incoming HTTP (http::mirror_http_traffic, traffic::mirror::mirror_with_http_header_filter::*, traffic::steal::steal_tests::*), matching exactly the gateway forwarding path.

Notes

  • Draft + windows-e2e label so only the Windows e2e suite runs.
  • A follow-up could centralize normalization inside ListeningOnExt::resolve_addr so the two paths can't diverge again.

…gateway

Mirrored/stolen HTTP traffic to a server bound to a wildcard address (e.g.
`0.0.0.0`) failed on Windows: the intproxy HTTP gateway connected to the
resolved address directly, and metalbear-co#4264 dropped the `normalize_connection_address`
call on this path while the raw-TCP path kept it. Connecting to `0.0.0.0`
happens to route to loopback on Linux but fails on Windows, so every mirrored
or stolen HTTP request to a wildcard-bound server failed there.

Restore the normalization in the HTTP gateway so it matches the TCP path.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cristeigabriela cristeigabriela added the windows-e2e Triggers E2E tests on Windows Runner label May 23, 2026
@0x00A5 0x00A5 requested a review from iniw May 23, 2026 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

windows-e2e Triggers E2E tests on Windows Runner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant