Host networking not working on Docker Desktop in WSL2 with mirrored mode

Docker Desktop does not leverage mirrored mode, the “Enable Host Networking” feature will not give you the host ip inside the container. Though it will mirror all received requests from the host to the container, and all outgoing connections from the container to the host. This is implemented on all platforms using vpnkit. From what I remember the mirrored interface exists in the docker desktop distribution, which runs the docker engine in a container, which does not see the mirrored interface.

If you want to use the mirrored interface, for time being your only option is to install and run docker-ce in a WSL2 distribution directly.

You can test it yourself:
This is the system distribution for docker desktop sees:

wsl -d docker-desktop --system ip address

This is what the docker engine inside is able to see:

docker run -it --rm --privileged --pid=host justincormack/nsenter1 /bin/ip address