Skip to content

http_proxy: Add the allowlisting proxy server#59223

Draft
rtfeldman wants to merge 1 commit into
http-proxy-upstreamfrom
http-proxy-server
Draft

http_proxy: Add the allowlisting proxy server#59223
rtfeldman wants to merge 1 commit into
http-proxy-upstreamfrom
http-proxy-server

Conversation

@rtfeldman

Copy link
Copy Markdown
Contributor

Third of the http_proxy stack. Stacked on #59217 and the upstream-config PR — review/merge those first.

Adds the in-process HTTP/HTTPS proxy server that enforces an Allowlist. It speaks HTTP CONNECT for HTTPS tunnels and forward proxying for plain HTTP, vets resolved addresses against loopback/private/link-local ranges to prevent DNS-rebinding past the sandbox, pins each connection to the destination approved for its first request (so later keep-alive requests can't escape the policy decision), optionally chains through the upstream proxy, and bounds header sizes, connection counts, and connect/handshake waits since its sole client is untrusted model-driven code running inside the editor process. Includes end-to-end tests covering allowed/denied CONNECT and HTTP forward, IP-literal handling, DNS-rebinding denial, and upstream chaining.

Still has no callers; wired into the agent terminal sandbox in the remaining PRs of the stack.

Release Notes:

  • N/A

@rtfeldman rtfeldman self-assigned this Jun 12, 2026
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 12, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jun 12, 2026
Final piece of the crate: the in-process HTTP/HTTPS proxy server that
enforces an `Allowlist`. It speaks HTTP CONNECT for HTTPS tunnels and
forward proxying for plain HTTP, vets resolved addresses against
loopback/private/link-local ranges to prevent DNS-rebinding past the
sandbox, pins each connection to the destination approved for its first
request (so later keep-alive requests can't escape the policy decision),
optionally chains through the `UpstreamProxy`, and bounds header sizes,
connection counts, and connect/handshake waits since its sole client is
untrusted model-driven code running inside the editor process. Includes
end-to-end tests covering allowed/denied CONNECT and HTTP forward,
IP-literal handling, DNS-rebinding denial, and upstream chaining.

Still has no callers; wired into the agent terminal sandbox in later PRs.

Release Notes:

- N/A
@rtfeldman rtfeldman force-pushed the http-proxy-upstream branch from bf56eeb to ab50118 Compare June 13, 2026 02:22
@rtfeldman rtfeldman force-pushed the http-proxy-server branch from 1b41511 to 605e8ef Compare June 13, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant