mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-04 12:23:21 +01:00
First of a stack adding hostname-allowlisted network access to agent terminal sandboxing. Adds a new `http_proxy` crate containing only the allowlist policy types. `HostPattern` parses exact hostnames or leading-`*.` subdomain wildcards, normalizes IDNs to punycode, and rejects IP literals and localhost-family names. `Allowlist` holds a set of patterns (or an allow-any escape hatch), and `covers` implements host-pattern subsumption (`*.github.com` covers `api.github.com`) used later to decide when an already-granted permission covers a new request — the network analogue of write-path subtree containment. Pure, self-contained logic with no callers yet. The upstream-proxy config and the proxy server that enforces these policies land in the next two PRs. Release Notes: - N/A
17 lines
252 B
TOML
17 lines
252 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]
|
|
idna.workspace = true
|
|
thiserror.workspace = true
|