You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fafdcc5
Browse filesBrowse the repository at this point in the historyBrowse files
The defining property is that the OpenShell value layers — egress policy, L7
115
-
inspection, inference routing, and the privacy router — live on the host inside
116
-
the gateway process, not inside the sandbox. A native Windows agent therefore
117
-
gets the Linux feature set without an in-sandbox supervisor.
140
+
The gateway-to-sandbox relationship is 1:N for control and lifecycle, but the
141
+
proxy-listener-to-sandbox relationship is 1:1. Each sandbox registry entry owns
142
+
one `HostProxyHandle`, one sandbox-specific policy, and one unique ephemeral
143
+
loopback listener. The listener identifies the sandbox without attributing
144
+
connections arriving on a shared proxy port.
145
+
146
+
The defining property is that OpenShell network enforcement lives on the host
147
+
inside the gateway process, not inside the sandbox. The current host-mode path
148
+
provides L4 policy and plaintext/forward-proxy L7 handling. HTTPS MITM trust
149
+
bootstrap, inference/privacy routing, and gateway event-bus wiring remain
150
+
follow-up work.
118
151
119
152
This still allows the existing supervisor networking code to be reused as a
120
153
host-side proxy component. The boundary is that Windows does not run
@@ -138,7 +171,8 @@ library entry points and configuration structs on both platforms.
138
171
-`openshell-core/build.rs` selects a vendored `protoc` per platform
139
172
(`protoc-bin-vendored` on Windows, `protobuf-src` elsewhere) so proto
140
173
compilation succeeds under MSVC.
141
-
- Windows path defaults resolve SQLite/data under `%APPDATA%`/`%ProgramData%`.
174
+
- Windows path defaults resolve configuration under `%APPDATA%` and state/data
175
+
under `%LOCALAPPDATA%`.
142
176
- Validation runs through a dedicated `mise` lane (`tasks/windows.toml` →
143
177
`tasks/scripts/windows-msvc.ps1`) invoked as `mise run --skip-tools windows:*`,
144
178
separate from the default Linux `ci` task. The wrapper discovers Visual
@@ -167,7 +201,7 @@ trait — there is no separate binary, no surrogate, and no tonic adapter.
167
201
| registry | In-memory `Arc<Mutex<…>>` mapping OpenShell sandbox id/name ⇄ MXC session id + phase state + exec/PTY handles. Source of truth for Get/List/Watch (MXC has no list-sessions API). |
|`policy.rs`| Translates the `SandboxPolicy` proto → MXC config and rejects unenforceable rules. Delegates to the embedded policy mapper (see Part 3). |
170
-
|`proxy.rs`|Hosts the existing OpenShell CONNECT proxy on `127.0.0.1:N`, attributes inbound loopback connections to a sandbox, applies that sandbox's policy. Reuses the Linux proxy/OPA/L7/router code unchanged. |
204
+
|`openshell-supervisor-network::host`|Starts one host CONNECT proxy task per sandbox on a unique `127.0.0.1:<ephemeral-port>` listener, applies that sandbox's trimmed network policy and static agent identity, and retains its `HostProxyHandle` in the driver registry. |
171
205
172
206
#### Workload and software availability
173
207
@@ -242,7 +276,7 @@ ephemeral port. It starts the existing OpenShell host CONNECT proxy with that
242
276
sandbox's trimmed network-only policy, then writes the allocated port to MXC's
243
277
`network.proxy = { localhost: N }` redirect. Loopback inside an AppContainer is
244
278
host loopback, so sandbox egress reaches the proxy running in the in-process MXC
245
-
driver and gateway service.
279
+
driver inside the gateway process.
246
280
247
281
The host-listener-to-sandbox topology is **1:1**, not many-to-one. Multiple
248
282
sandboxes share `127.0.0.1`, but each active sandbox owns a unique ephemeral port
0 commit comments