Repository navigation
[WSLC] Proxy Pt. 4: Apply the provision proxy to every exec - #1719
Draft
Elliot (theelliotm) wants to merge 1 commit into
Draft
Elliot (theelliotm) wants to merge 1 commit into
Elliot (theelliotm) wants to merge 1 commit into
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The daemon IPC and proxy-lifetime changes need Windows/WSL validation and maintainer confirmation, with x64 untested, Windows CI blocked, and the linked design/API proposal still unmerged.
No open issues 🎉
What changed in this PR
This fourth PR in the WSLC proxy stack enables a proxy configured during 1.1.0-alpha provisioning to apply to every exec in that container.
Changes:
- Moves proxy environment injection to the daemon and advances its protocol to version 10.
- Rejects conflicting exec proxy URLs and credential-bearing proxies with replacement environments.
- Adds lifecycle and unit coverage, updates existing test inputs, and documents provision-time proxy behavior.
| File | Description |
|---|---|
tests/scripts/run_wslc_state_aware_tests.ps1 |
Adds lifecycle checks for proxy inheritance and mismatch rejection. |
src/mxc-sdk/tests/wslc_daemon_ipc.rs |
Updates IPC test inputs with optional proxy fields. |
src/mxc-sdk/src/bin/wslc_daemon/session_manager.rs |
Stores the provisioned proxy and validates and applies it before exec. |
src/mxc-sdk/src/bin/wslc_daemon/control_server.rs |
Updates control-server test inputs for the protocol changes. |
src/mxc-sdk/src/backends/wslc/common/state_aware.rs |
Forwards proxy URLs and unmodified exec environment entries to the daemon. |
src/mxc-sdk/src/backends/wslc/common/policy.rs |
Allows provision-time proxies and implements exec matching and credential checks. |
src/mxc-sdk/src/backends/wslc/common/daemon_protocol.rs |
Adds optional proxy fields and increments the protocol version. |
docs/backends/wslc/wslc-state-aware.md |
Documents proxy inheritance, matching rules, and protocol version 10. |
docs/backends/wslc/wsl-container-getting-started.md |
Explains where to configure proxies for execution and lifecycle operations. |
Review effort: Balanced
The daemon stores runtimeConfig.networkProxy from a 1.1.0-alpha provision and injects it into every exec. An exec may omit the proxy or name the same URL; a different URL is rejected. The daemon now applies the proxy environment, so the client sends the raw exec environment and the protocol version is bumped to 10. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: c3f64c2c-9005-43eb-a803-a91fb7265c5b
Elliot (theelliotm)
force-pushed
the
user/emichlin/wslc-proxy-4-provision-proxy-inject
branch
from
November 10, 2026 22:17
54b1d29 to
8b3bba0
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📖 Description
Fourth PR in the WSLC built-in proxy stack (#1625). The daemon stores
runtimeConfig.networkProxyfrom a1.1.0-alphaprovisionrequest and applies it to everyexecin that container. Applies to bridged containers; isolated containers still reject a proxy.ProvisionConfigandExecConfiggainnetwork_proxy.PROTOCOL_VERSIONgoes from 9 to 10.execmay omit the proxy or name the same URL. A different URL is rejected withpolicy_validation. Error messages never include the URL.execwithReplaceenv scope is rejected if the proxy it would use carries credentials, including one set at provision.exec.🔗 References
Refs #1462
Spec: #1625
Stacked on #1717
🔍 Validation
On ARM64 with WSL 3.0.5:
cargo fmt --all -- --check: passedcargo clippy -p mxc-sdk --features wslc --all-targets -- -D warnings: passedcargo test -p mxc-sdk --features wslc --lib wslc: passed (438)cargo test -p mxc-sdk --features wslc --bin wxc-wslc-daemon: passed (173)cargo test -p mxc-sdk --features wslc --test mxc_contract_v1_1_0_alpha --test wslc_daemon_ipc: passed (382; 1 passed, 3 ignored)tests\scripts\run_wslc_state_aware_tests.ps1 -WxcExecPath src\target\release\wxc-exec.exe: passed (147/147)New state-aware scenario "CR" provisions with a proxy, checks an exec without
runtimeConfiggets it (replacing caller-supplied proxy variables), and checks an exec naming a different proxy is rejected. Unit tests cover the omit/match/mismatch rule and the credential check on the provisioned URL.Not run: x64. CI WSLC builds fail on this stack until 3.0.5 is on NuGet.
✅ Checklist
feature-acceptedCargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow