With the release of the Windows 10 Insider build 18945, the Windows Subsystem for Linux version 2 now supports the ability for Windows 10 applications to connect to WSL2 apps via localhost. Users can now connect to a running Linux distribution using the localhost address. WSL program manager Craig Loewen has stated that in order for the feature to work, a server needs to be accessible to all IP addresses and thus bound to 0.0.0. This is because the HOSTS file maps localhost to the specific.0.1 loopback address and thus the feature didn’t work.
Source: https://www.bleepingcomputer.com/news/security/wsl2-now-supports-localhost-connections-from-windows-10-apps/

