feat(web): add bounded public-network proxy primitive

Draft
TH
2h ago
+718-0

Summary

Add a bounded loopback forward proxy primitive for remote web confinement in #5258. It admits only public destinations from the complete DNS answer set and connects to the selected numeric IP. Absolute HTTP and CONNECT share admission; malformed framing, private destinations, and excess work fail closed. This phase is stacked on #5268.

Before / after

No observable tenant web change: #5243 still refuses remote web commands. The primitive is not wired into browser launch. Within the primitive, an ordinary Connection: keep-alive request forwards with Connection: close; timed-out DNS lookups release their per-proxy admission slot.

Validation

Head: 107e165a42e3cfbe67ddcbdbb0c73ca111d83197. Focused proxy tests passed 8/8 across three files; git diff --check passed. CI lint, typecheck, package, coverage, and integration jobs passed. Repo Guards & Compatibility failed: the production-exports gate finds startPublicNetworkProxy and its two types unused outside tests. This draft remains blocked.

Next phase: make the managed browser launch and session lifecycle own this proxy, prove that every browser connection uses it and cannot bypass it, and bind teardown to the session. Review the new trust boundary and only then remove remote web refusals. The browser pin in #5273 does not supply that consumer.