Challenge
If you ever were in the situation, that you needed to access a PLC or similar Ethernet device that is plugged in locally to your laptop from your CloudPC, you quickly noticed, that this can be a challenge in Windows 365 or AVD for that matter, as this article confirms RemoteFX USB redirection is probably not the right way to go as:
- The following peripheral classes are blocked from redirection:
- USB network adapters.
- USB displays.
Peripheral and resource redirection over the Remote Desktop Protocol
While there is a way to bypass this restriction by forcing the network class to be redirected as described here: Some USB devices aren’t available
It’s probably not the best idea, to redirect the whole USB communication of a USB Ethernet adapter if we just need a working IP connection…
Solution
I have a possible solution for you. We can leverage the RDP Virtual Channel feature to redirect our network traffic to our CloudPC: Remote Desktop Services virtual channels

Using this channel as a basis, we will create a socks5 proxy over which we then open a VPN tunnel using socks2tun. The project is based on that project: nccgroup/SocksOverRDP which gave me the basis to establish the communication through the channel, I just needed to reverse the connection and add a VPN solution like xjasonlyu/tun2socks: tun2socks to route our traffic through that proxy.

Link to GitHub: mmeierm/Windows-365-Ethernet-Redirection
How to use
The Visual Studio 2026 project contains multiple parts, an RDP Client Plugin, an RDP Server component, both written in C++ and a Server GUI that simplifies the usage and takes care of the VPN tunnel, written in C# .Net 8 LTS.

Client
After you loaded and compiled the project in Visual Studio 2026, you will find the RDP Client dll in the Release Folder depending on your architecture (I built if for my Snapdragon Copilot+ Tablet as well as for my old Intel based Laptop):

All you need on the client is the SocksOverRDP-Plugin.dll

Copy that to a folder of your choice and register it using regsvr32 and you are good to go.

Server
To get the server part working, we need two things from that project, we need the SocksOverRDP-Server.exe that will open the virtual tunnel and establish the Socks5 Proxy:

Next, we need the Files for the GUI, which you will find in the Windows 365 Ethernet Redirection Subfolder under bin x64 Release net8.0-windows folder:

Next we need some external components, we need the tun2socks.exe from this project: xjasonlyu/tun2socks: tun2socks saved in a Subfolder called “SocksToVPN” as well as the wintun.dll from here: Wintun – Layer 3 TUN Driver for Windows
Make sure they match the processor architecture of your RDP Server (usually amd64), not of your client. In the end it should look something like this:


When you start the “Windows 365 Ethernet Redirection.exe” on your Windows 365 CloudPC, you will see a few options in the App:

By default “Auto-start VPN Tunnel” is enabled, which you can disable if you only need a Socks5 Proxy and do not care about routing non proxy aware traffic. If you go with the VPN Tunnel enabled, make sure to specify the Subnet that should be routed through the tunnel. The default 0.0.0.0/0 is not a good idea, as it also contains the 127.0.0.1:1080 address of the proxy itself, which causes a routing loop. In my example I went with 192.168.1.0/24 to only route my home network:

With that in place, I can access my Smart Home, or my NAS or SSH into my Linux box from my CloudPC:



Conclusion
Having a solution like that can be really helpful when you have to work with devices which can’t be easily published or network integrated like standalone PLCs or similar devices and therefore a traditional VPN through e.g. an Azure Network Connection is not an option.
While the project is for sure not perfect yet, it showcases what can be possible by leveraging the RDP Virtual Channels.
Leave a Reply