@@ -41,9 +41,9 @@ mediates every supported TCP and DNS operation, attributes it to the calling
4141binary, and sends the request across the private channel. The supervisor
4242authorizes the request before it opens an upstream connection. Docker's absent
4343workload network is the mandatory outer fence if mediation fails or is
44- bypassed. The trusted supervisor companion uses Docker host networking, where
45- it reaches the gateway's primary loopback listener and originates approved
46- egress .
44+ bypassed. The trusted supervisor companion originates approved egress. Its
45+ operator-owned ` supervisor_network_mode ` defaults to ` host ` . Set ` bridge ` to
46+ run the supervisor on Docker's bridge network; ` auto ` also selects host .
4747
4848The driver copies trusted runtime bytes from the configured supervisor image
4949through the Docker archive API. No workload launch depends on a host bind
@@ -158,7 +158,7 @@ openshell sandbox create \
158158` /openshell-sandbox ` binary. The driver extracts that binary as bytes and
159159stages it into the stopped workload. ` supervisor_image ` contains the
160160dynamically linked glibc ` /openshell-supervisor ` binary that runs in the
161- host-networked supervisor container. Release and gateway image builds bake
161+ supervisor companion container. Release and gateway image builds bake
162162matching image tags into the binary.
163163
164164## Gateway session and TLS
@@ -172,7 +172,7 @@ When no endpoint is configured, the supervisor connects to
172172Docker daemon host. A configured HTTPS server certificate must include the
173173endpoint host in its subject alternative names.
174174
175- The driver publishes host loopback as the backend address for
175+ In host mode, the driver publishes host loopback as the backend address for
176176` host.openshell.internal ` . Policy DNS resolves that reserved name through the
177177mediated path, so policies can reach host services without a Docker bridge,
178178container DNS alias, or another gateway listener.
@@ -181,9 +181,33 @@ For HTTPS endpoints, the supervisor receives only the gateway CA and
181181uses its sandbox-scoped bearer token to authenticate RPCs. User client
182182certificates and private keys are not delivered to either container.
183183
184- Docker Engine on Linux supports host networking directly. Docker Desktop
185- requires host networking to be enabled in Settings and does not support it
186- when Enhanced Container Isolation is enabled.
184+ Host mode on Docker Desktop requires host networking enabled in Settings.
185+ For bridge mode or a gateway endpoint using ` host.docker.internal ` , the driver
186+ resolves Docker's ` host-gateway ` once during initialization and caches it.
187+ A temporary container runs ` --help ` from the immutable supervisor image with
188+ no network, no capabilities, no privilege escalation, and a read-only root
189+ filesystem. The driver downloads Docker's generated ` /etc/hosts ` through the
190+ archive API, preferring a unique IPv4 address and otherwise a unique IPv6
191+ address. Resolution has a 30-second timeout; forced cleanup has a separate
192+ 10-second timeout and runs after success or failure.
193+
194+ The driver uses the selected address for both host aliases and the runtime
195+ descriptor's trust pin; workload DNS and hosts files cannot select it. Host
196+ mode with other gateway endpoints retains its gateway-address pin. An explicit
197+ operator-owned ` host_gateway_ip ` overrides discovery and skips the temporary
198+ container. No supervisor changes or per-sandbox discovery are required.
199+
200+ When ` grpc_endpoint ` is omitted, bridge mode uses ` host.docker.internal ` on
201+ Desktop or for a wildcard gateway listener, and the concrete bind address for
202+ other non-loopback Linux listeners. The port is the gateway bind port; remapped
203+ container publications require an explicit endpoint. Native Linux loopback-only
204+ listeners cannot serve a bridge supervisor and produce an actionable error.
205+ Explicit endpoints retain TLS verification and are never rewritten; bridge
206+ rejects loopback/unspecified endpoint addresses. Host services bound only to
207+ loopback are also unreachable from a native Linux bridge supervisor.
208+
209+ The selected network mode does not change the sandbox's mandatory Landlock
210+ and seccomp qualification.
187211
188212The supervisor owns these security-critical variables:
189213
0 commit comments