diff --git a/docs/sandbox-provider.md b/docs/sandbox-provider.md index d9eeab8fc..afff50e4f 100644 --- a/docs/sandbox-provider.md +++ b/docs/sandbox-provider.md @@ -204,7 +204,7 @@ Core sends the same `Egress` in `Bootstrap` and in every `ResumeRequest`, derive The Provider enforces exactly this on top of the always-allowed connection to Core, and blocks loopback, link-local, cloud-metadata and every private address that `Egress` does not name, except that E2B cannot block the metadata address 169.254.169.254. It resolves the Core host with its host's DNS when it creates and when it resumes. MCP traffic has no entry: it follows `Public`, `PrivateDomains` and `Domains`. -microsandbox applies the rules with first-match order and default deny, on create and restore alike, with strict hostname enforcement and DNS rebind protection off. The sandbox reaches only the host's DNS server: DNS to any other server and every other host port are refused, so only the host's answers bind names to addresses. A name becomes a port-less domain allow for the addresses those answers resolve, private ones included, and a `*.example.com` entry a subdomain allow that never matches `example.com`. E2B declares `Restrict` only: `Public` adds a deny list for loopback, private and link-local ranges, and not `Public` denies all IPv4 and IPv6 traffic except the Core host, `Endpoints` and `Domains`. E2B matches a host name only on ports 80 and 443, so the adapter also allows the global IPv4 addresses of the Core host and of each Endpoint on any other port. An IP literal is allowed only as a global address range of one address, and a private literal gets no rule. +microsandbox applies the rules with first-match order and default deny, on create and restore alike, with strict hostname enforcement and DNS rebind protection off. The sandbox reaches only the host's DNS server: DNS to any other server and every other host port are refused, so only the host's answers bind names to addresses. That server answers every name whatever the policy, so a refused name still resolves and only its connections fail. A name becomes a port-less domain allow for the addresses those answers resolve, private ones included, and a `*.example.com` entry a subdomain allow that never matches `example.com`. E2B declares `Restrict` only: `Public` adds a deny list for loopback, private and link-local ranges, and not `Public` denies all IPv4 and IPv6 traffic except the Core host, `Endpoints` and `Domains`. E2B matches a host name only on ports 80 and 443, so the adapter also allows the global IPv4 addresses of the Core host and of each Endpoint on any other port. An IP literal is allowed only as a global address range of one address, and a private literal gets no rule. ## Checkpoint lifecycle diff --git a/docs/zh/sandbox-provider.md b/docs/zh/sandbox-provider.md index ef7baeafc..1a7872e40 100644 --- a/docs/zh/sandbox-provider.md +++ b/docs/zh/sandbox-provider.md @@ -1,7 +1,7 @@ --- title: "沙箱提供商协议" source: docs/sandbox-provider.md -source_hash: 01003cc3061eefaf705bb376e73f6a66e4e6416821157947bb6445474b74cc61 +source_hash: 6e00a807390c887b3458acf9be3349402c8d34e08c3e7426af2e52510b6eadd0 --- 沙箱提供商协议连接 Core 与为 Core 管理的(`openai_hosted`)Environment 提供计算资源的 adapter,并由该 adapter 运行启动 Runtime daemon 的有界引导流程。本页面向 adapter 作者:说明提供商必须实现什么,以及可以依赖 Core 做什么。microsandbox 和 E2B 实现了该协议。 @@ -206,7 +206,7 @@ Core 在 `Bootstrap` 和每个 `ResumeRequest` 中发送同一个 `Egress`,它 Provider 在始终允许到 Core 的连接之上严格执行这些内容,并阻止回环、链路本地、云元数据以及 `Egress` 未列出的所有私有地址,但 E2B 无法阻止元数据地址 169.254.169.254。它在创建和恢复时用主机 DNS 解析 Core 主机。MCP 流量没有条目:它遵循 `Public`、`PrivateDomains` 和 `Domains`。 -microsandbox 按首条匹配的顺序和默认拒绝来应用规则,创建与恢复相同,并关闭严格主机名校验和 DNS rebind 保护。沙箱只能访问主机的 DNS 服务器:发往其他服务器的 DNS 和主机的其他端口都被拒绝,因此只有主机的应答能把名称绑定到地址。名称成为不带端口的域名放行规则,放行这些应答解析出的地址(包括私有地址);`*.example.com` 条目成为子域名放行规则,永远不匹配 `example.com`。E2B 只声明 `Restrict`:`Public` 时加入回环、私有和链路本地网段的拒绝列表,非 `Public` 时拒绝除 Core 主机、`Endpoints` 和 `Domains` 之外的全部 IPv4 和 IPv6 流量。E2B 只在 80 和 443 端口匹配主机名,因此 adapter 还会为 Core 主机和每个 Endpoint 在其他端口上允许其全球 IPv4 地址。IP 字面量只作为单地址的全球地址范围被允许,私有字面量没有规则。 +microsandbox 按首条匹配的顺序和默认拒绝来应用规则,创建与恢复相同,并关闭严格主机名校验和 DNS rebind 保护。沙箱只能访问主机的 DNS 服务器:发往其他服务器的 DNS 和主机的其他端口都被拒绝,因此只有主机的应答能把名称绑定到地址。该服务器不论策略都会应答任何名称,因此被拒绝的名称仍能解析,只是连接会失败。名称成为不带端口的域名放行规则,放行这些应答解析出的地址(包括私有地址);`*.example.com` 条目成为子域名放行规则,永远不匹配 `example.com`。E2B 只声明 `Restrict`:`Public` 时加入回环、私有和链路本地网段的拒绝列表,非 `Public` 时拒绝除 Core 主机、`Endpoints` 和 `Domains` 之外的全部 IPv4 和 IPv6 流量。E2B 只在 80 和 443 端口匹配主机名,因此 adapter 还会为 Core 主机和每个 Endpoint 在其他端口上允许其全球 IPv4 地址。IP 字面量只作为单地址的全球地址范围被允许,私有字面量没有规则。 ## 检查点生命周期 {#checkpoint-lifecycle}