Skip to content

Conversation

@benhillis
Copy link
Member

This change implements the VirtioProxy networking mode for WSLA. This required moving the VirtioProxy and GnsChannel classes into the common library (with NatNetworking). I also included the cleanup change to VirtioNetworking that was just merged to main in this PR.

DNS tunneling is currently not supported with this networking mode, so an error is returned. With this change I have updated the default networking move of wsl.exe --wsla to also use VirtioProxy networking mode.

@benhillis benhillis requested a review from a team as a code owner November 22, 2025 00:59
@benhillis benhillis requested a review from Copilot November 22, 2025 02:22
Copilot finished reviewing on behalf of benhillis November 22, 2025 02:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements VirtioProxy networking mode for WSLA (Windows Subsystem for Linux Anywhere), enabling a more efficient networking approach compared to the existing NAT mode. The implementation involved refactoring VirtioNetworking and GnsPortTrackerChannel classes from the service executable into the common library to enable code sharing between WSL and WSLA.

Key Changes:

  • Added WSLANetworkingModeVirtioProxy enum value to the IDL interface
  • Moved VirtioNetworking and GnsPortTrackerChannel from service/exe to common library for code reuse
  • Refactored VirtioNetworking constructor to use callback injection instead of builder pattern
  • Changed default networking mode for wsl.exe --wsla from NAT to VirtioProxy

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/windows/wslaservice/inc/wslaservice.idl Added VirtioProxy enum value to networking mode definition
src/windows/wslaservice/exe/WSLAVirtualMachine.h Added handler function declarations and DeviceHostProxy member for VirtioProxy support
src/windows/wslaservice/exe/WSLAVirtualMachine.cpp Implemented VirtioProxy networking configuration, device management, and port handling
src/windows/service/exe/WslCoreVm.h Added handler function declarations for VirtioProxy callbacks
src/windows/service/exe/WslCoreVm.cpp Refactored VirtioNetworking initialization to use callback injection pattern and extracted handlers
src/windows/service/exe/CMakeLists.txt Removed VirtioNetworking and GnsPortTrackerChannel from service build (moved to common)
src/windows/common/WslClient.cpp Changed default WSLA networking mode from NAT to VirtioProxy
src/windows/common/VirtioNetworking.h Refactored constructor to accept callbacks directly; removed builder pattern methods
src/windows/common/VirtioNetworking.cpp Updated constructor implementation and callback usage to match new pattern
src/windows/common/GnsPortTrackerChannel.h Added header file to common library (moved from service/exe)
src/windows/common/GnsPortTrackerChannel.cpp Added implementation file to common library (moved from service/exe)
src/windows/common/CMakeLists.txt Added VirtioNetworking and GnsPortTrackerChannel to common library build
test/windows/WSLATests.cpp Added test case to verify VirtioProxy networking functionality

@benhillis benhillis force-pushed the user/benhill/wsla_virtio_proxy branch from 6549d46 to 003a4bb Compare November 24, 2025 20:46
@benhillis benhillis force-pushed the user/benhill/wsla_virtio_proxy branch 2 times, most recently from 9c4061b to c7082e7 Compare November 26, 2025 03:14
@benhillis benhillis requested review from OneBlue and Copilot November 26, 2025 03:36
Copilot finished reviewing on behalf of benhillis November 26, 2025 03:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 13 changed files in this pull request and generated 3 comments.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@ptrivedi ptrivedi changed the title WSLA: Implement viritoproxy networking mode WSLA: Implement virtioproxy networking mode Dec 1, 2025
Ben Hillis added 2 commits December 1, 2025 12:58
This change implements the VirtioProxy networking mode for WSLA.
This required moving the VirtioProxy and GnsChannel classes into the common library (with NatNetworking).

DNS tunneling is currently not supported with this networking mode, so an error is returned.
With this change I have updated the default networking move of 'wsl.exe --wsla' to also use
VirtioProxy networking mode.
@benhillis benhillis force-pushed the user/benhill/wsla_virtio_proxy branch from c7082e7 to 60a91b1 Compare December 1, 2025 21:19
@benhillis benhillis requested a review from Copilot December 1, 2025 22:24
Copilot finished reviewing on behalf of benhillis December 1, 2025 22:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@benhillis benhillis merged commit 2ab516e into feature/wsl-for-apps Dec 2, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants