[WSLC] Enable portMappings for WSLC (TCP host->container forwarding)#530
Open
SohamDas2021 wants to merge 4 commits into
Open
[WSLC] Enable portMappings for WSLC (TCP host->container forwarding)#530SohamDas2021 wants to merge 4 commits into
SohamDas2021 wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Enable WSLC host→container TCP port forwarding by wiring experimental.wslc.portMappings through the Rust config parser into the WSLC SDK container-settings call, with accompanying schema/docs/test updates.
Changes:
- Add WSLC SDK bindings + runner support for
WslcSetContainerSettingsPortMappingsandWslcContainerPortMapping. - Strengthen port-mapping config parsing/validation (required fields, normalization, duplicate detection; explicit UDP rejection with a clear message).
- Add/update dev schema, docs, and local/SDK tests to cover TCP port-mapping usage and UDP rejection.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/scripts/run_wslc_all_tests.ps1 | Adds two WSLC network test configs to the local WSLC test runner. |
| tests/configs/wslc_port_mapping_tcp.json | New WSLC config exercising a single TCP port-mapping entry. |
| tests/configs/wslc_port_mapping_multiple.json | New WSLC config exercising multiple TCP port-mapping entries. |
| src/core/wxc_common/src/config_parser.rs | Parses/validates WSLC portMappings (required fields, protocol normalization, UDP rejection, duplicate detection) + updates unit tests. |
| src/backends/wslc/common/src/wslc_bindings.rs | Introduces FFI types and function pointer for WslcSetContainerSettingsPortMappings, plus layout test. |
| src/backends/wslc/common/src/wsl_container_runner.rs | Applies port mappings to WSLC container settings before container creation. |
| sdk/tests/integration/wslc-e2e.test.ts | Adds E2E coverage for TCP forwarding and UDP rejection; improves assertions/timeout. |
| sdk/src/types.ts | Expands documentation for portMappings/protocol in SDK types. |
| schemas/dev/mxc-config.schema.0.8.0-dev.json | Updates WSLC portMappings schema to TCP-only + adds default []. |
| docs/wsl/wsl-container-support-plan.md | Documents WSLC portMappings API + notes UDP E_NOTIMPL limitation and parser behavior. |
| docs/schema.md | Adds portMappings example to the main schema doc snippet. |
MGudgin
reviewed
Jun 18, 2026
…as/wslc-port-mapping
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
This change enables port mappings for TCP hosts; we call WSLC SDK API WslcSetContainerSettingsPortMappings and wire the portMappings in the runner.
🔗 References
🔍 Validation
✅ Checklist
📋 Issue Type
GitHub Actions runs the PR validation build automatically. The ADO pipeline
(
MXC-PR-Build) is the official build pipeline that signs the binaries; itruns on merge to
mainand nightly, and Microsoft reviewers can trigger iton a PR with
/azp run. See docs/pull-requests.md.Microsoft Reviewers: Open in CodeFlow