mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-04 11:53:21 +01:00
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 --------- Co-authored-by: MartinYe1234 <52641447+MartinYe1234@users.noreply.github.com>
25 lines
454 B
TOML
25 lines
454 B
TOML
[package]
|
|
name = "http_proxy"
|
|
version = "0.1.0"
|
|
edition.workspace = true
|
|
publish.workspace = true
|
|
license = "GPL-3.0-or-later"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[lib]
|
|
path = "src/http_proxy.rs"
|
|
|
|
[dependencies]
|
|
anyhow.workspace = true
|
|
base64.workspace = true
|
|
futures.workspace = true
|
|
httparse.workspace = true
|
|
idna.workspace = true
|
|
log.workspace = true
|
|
percent-encoding.workspace = true
|
|
proxyvars.workspace = true
|
|
thiserror.workspace = true
|
|
url.workspace = true
|