wsl-host-listen is a utility designed to enable access to Windows Subsystem for Linux (WSL) from
local area networks.
This tool streamlines the installation process of wslhostpatcher.
To use wsl-host-listen, you can execute it via:
npx wsl-host-listen
# or
pnpm exec wsl-host-listen
# or
yarn exec wsl-host-listenNote: This command needs to be re-run for each new WSL instance.
This tool is intended as a quick and easy workaround, but there are more permanent solutions.
If your setup allows for it consider using netsh to add a port proxy:
netsh interface portproxy add v4tov4 listenport=<yourPortToForward> listenaddress=0.0.0.0 connectport=<yourPortToConnectToInWSL> connectaddress=(wsl hostname -I)
For more information, check out the Microsoft documentation. Alternatively you can set up mirrored mode networking.