Repository navigation
Description
Task
| slice | size | difficulty | model | who | estimated lines |
|---|---|---|---|---|---|
| DNS steering through the box-zone resolver | L | needs care | standard | an agent | 700 (320 code, 380 tests) |
On a VM host, a box with
steering = "dns"and no proxy variables opens TLS to github.com, the proxy routes it by its SNI and substitutes the sealed value, and a ClientHello naming another host is refused and auditedoff_module.
Covers:
- BEP-080
Layers:
- crates/bep/src/proxy.rs: a connection whose first bytes are a TLS ClientHello, not a CONNECT or an absolute-form request, takes its authority from the SNI and enters the same termination, substitution and egress re-check a CONNECT to that authority enters; no SNI, or an SNI outside the module host sets and the registered store authorities, is refused
off_module cargo nextest run -p bep direct_tls_on_443_routes_by_snicargo nextest run -p bep direct_tls_without_admitted_sni_is_refused_off_module- listener:
- crates/switch/src/bep_host.rs: the proxy's address takes TCP connections on port 443 beside
PROXY_PORT, delivered to the proxy with the same box attribution, and the pool counts both ports as one lane cargo nextest run -p switch proxy_address_delivers_port_443_with_box_attribution
- crates/switch/src/bep_host.rs: the proxy's address takes TCP connections on port 443 beside
- relay:
- crates/boxes/src/core/egress.rs:
proxy_lane_admitsadmits TCP 443 at the proxy's address for a box that declares a credentialed upstream, beside the listener's port, and nothing else; UDP 443 there stays rejected cargo nextest run -p boxes proxy_lane_admits_tls_443_and_listener_port_only
- crates/boxes/src/core/egress.rs:
- activation:
- crates/boxes/src/core/bep.rs: the interim refusal
DnsWithoutDirectTlsand its test go, sodnsis admitted wherever the host factbox_zone_resolveris true cargo nextest run -p boxes dns_steering_is_admitted_with_the_resolver_and_no_interim_refusal
- crates/boxes/src/core/bep.rs: the interim refusal
Plan block
### T116 — Carry dns-steered TLS to the proxy on port 443
slice: S16
kind: task
covers: BEP-080
size: L
est: 320 code, 380 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: `min box audit <box>` shows a request admitted by its SNI authority on port 443, and a refused one marked `off_module`; the proxy's debug log names the entry form; a `dns`-steered GitHub grant box on a VM host is created, where before it was refused with exit 3 (#2805)
observability: the proxy's `box_connection` span and its debug line carry the entry form, `connect` or `direct_tls`, beside the authority; the per-request audit record keeps the BEP-039 fields
layers:
- proxy:
- crates/bep/src/proxy.rs: a connection whose first bytes are a TLS ClientHello, not a CONNECT or an absolute-form request, takes its authority from the SNI and enters the same termination, substitution and egress re-check a CONNECT to that authority enters; no SNI, or an SNI outside the module host sets and the registered store authorities, is refused `off_module`
test: cargo nextest run -p bep direct_tls_on_443_routes_by_sni
test: cargo nextest run -p bep direct_tls_without_admitted_sni_is_refused_off_module
- listener:
- crates/switch/src/bep_host.rs: the proxy's address takes TCP connections on port 443 beside `PROXY_PORT`, delivered to the proxy with the same box attribution, and the pool counts both ports as one lane
test: cargo nextest run -p switch proxy_address_delivers_port_443_with_box_attribution
- relay:
- crates/boxes/src/core/egress.rs: `proxy_lane_admits` admits TCP 443 at the proxy's address for a box that declares a credentialed upstream, beside the listener's port, and nothing else; UDP 443 there stays rejected
test: cargo nextest run -p boxes proxy_lane_admits_tls_443_and_listener_port_only
- activation:
- crates/boxes/src/core/bep.rs: the interim refusal `DnsWithoutDirectTls` and its test go, so `dns` is admitted wherever the host fact `box_zone_resolver` is true
test: cargo nextest run -p boxes dns_steering_is_admitted_with_the_resolver_and_no_interim_refusal
produces: none
consumes: none
proof: On a VM host, a box with `steering = "dns"` and no proxy variables opens TLS to github.com, the proxy routes it by its SNI and substitutes the sealed value, and a ClientHello naming another host is refused and audited `off_module`.
Background, from the issue as first filed
Under dns steering the box-zone gate answers a credentialed name, such as github.com, with the Box Egress Proxy's address, and HTTPS_PROXY is not set (BEP-012). The client then opens TCP 443 to that address. Today nothing on that path can carry the connection:
- The relay admits only TCP 8118 at the proxy's address (
proxy_lane_admits,crates/boxes/src/core/egress.rs). TCP 443 there is dropped asUncredentialedProxyDestination. - The proxy listens only on 8118 (
crates/switch/src/bep_host.rs,PROXY_PORT). It accepts only CONNECT or absolute-formhttp://requests (crates/bep/src/proxy.rs), and never reads a bare TLS ClientHello.
So dns steering stays refused with exit 3 (BEP-017) even on the VM host. Under the owner's decision of 2026-10-31 on #2797, T113 admits only both there.
To admit dns, the work is:
- A listener at the proxy's address on TCP 443 that takes a TLS connection without CONNECT and routes it by SNI.
- The matching relay opening, scoped to the same (address, port, protocol) triple and the credentialed-lane declaration (NET-134).
- Admitting
dnsinhost_resolves_box_namesonce both are in place. - A live proof: git clones a private repository over
dnssteering with no proxy variables in the box.
Epic #1501. Spec: docs/specs/24-spec-box-egress-proxy/24-spec-box-egress-proxy.md (BEP-016, BEP-017, BEP-062, BEP-078).
Closes #2787 too
When this lands, run ./scripts/session-e2e.sh bep_dns_steering_through_the_box_zone_resolver (added by #2829) on a macOS VM host with the live proxy. The store and fail_closed legs must print PASS, and git must print PASS where a GitHub sign-in and E2E_BEP_PRIVATE_REPO are set. That run closes #2787 (T115). Until then the case records a KNOWN GAP with the admission refusal.
Activity
fix(bep): refuse dns steering for the proxy, keep the resolver a host…
norrietaylor commentedon Oct 31, 2026
This also closes a gap under
bothsteering, raised by the minimal-arch C2 on #2797 at 6ff5f04 (networking design §5.7, lines 208 and 218). A tool that ignoresHTTPS_PROXYgets the proxy's address for a steered name, and the switch drops its TCP connection to port 443 with no reset (SwitchOwnAddresses::drop_reason), so the tool stalls. The direct TLS path on port 443 that this issue adds fixes that case too.docs(bep): say what both steering does until the direct TLS path
test(e2e): count the dns steering refusal as a known gap
T113 — Admit dns and both steering where the host's switch resolves b…
T115 — DNS steering through the box-zone resolver, end to end (gomini…
[-]Carry dns-steered TLS to the Box Egress Proxy on port 443, so dns steering can be admitted[/-][+]T116 — Carry dns-steered TLS to the proxy on port 443[/+]minimal-foundry commentedon Nov 2, 2026
Done. #2860 merged.
branch
agent/2805-carry-dns-steered-tls-to-the-proxy-on-port-443· epic #1501 · PR #2860Updated 2026-11-03T22:05:40.582Z.
build(deps): bump sysinfo to 0.40 (#2866)
docs(spec): specify dns steering and the host_ip lane for spec 24 (go…