8000 T116 — Carry dns-steered TLS to the proxy on port 443 · Issue #2805 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T116 — Carry dns-steered TLS to the proxy on port 443 #2805

Closed

Description

@norrietaylor

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 audited off_module.

Covers:

  • BEP-080

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
    • cargo nextest run -p bep direct_tls_on_443_routes_by_sni
    • 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
    • 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
    • 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
    • cargo nextest run -p boxes dns_steering_is_admitted_with_the_resolver_and_no_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 as UncredentialedProxyDestination.
  • The proxy listens only on 8118 (crates/switch/src/bep_host.rs, PROXY_PORT). It accepts only CONNECT or absolute-form http:// 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:

  1. A listener at the proxy's address on TCP 443 that takes a TLS connection without CONNECT and routes it by SNI.
  2. The matching relay opening, scoped to the same (address, port, protocol) triple and the credentialed-lane declaration (NET-134).
  3. Admitting dns in host_resolves_box_names once both are in place.
  4. A live proof: git clones a private repository over dns steering 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

  1. norrietaylor commented on Oct 31, 2026

    @norrietaylor
    MemberAuthor

    This also closes a gap under both steering, raised by the minimal-arch C2 on #2797 at 6ff5f04 (networking design §5.7, lines 208 and 218). A tool that ignores HTTPS_PROXY gets 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.

  2. added
    kind:taskA task the plan skill rendered; the body carries ## Task
    on Nov 2, 2026
  3. changed the title [-]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[/+] on Nov 2, 2026
  4. added
    size:L500 to 900 net lines; one PR, and the ceiling
    model:standardA standard model: work that needs care, or routine work that is large
    on Nov 2, 2026
  5. minimal-foundry commented on Nov 2, 2026

    @minimal-foundry
    Contributor

    Done. #2860 merged.

    branch agent/2805-carry-dns-steered-tls-to-the-proxy-on-port-443 · epic #1501 · PR #2860

    Updated 2026-11-03T22:05:40.582Z.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind:taskA task the plan skill rendered; the body carries ## Taskmodel:standardA standard model: work that needs care, or routine work that is largesize:L500 to 900 net lines; one PR, and the ceiling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0