By default, UWP apps cannot access network resources on the same machine. This restriction can be lifted per app using the
CheckNetIsolation.exe utility. This is described in many places around the web:
The Loopback Exemption can be granted to UWP apps individually. In my use case, I would like to use a system-wide proxy server running on localhost (Internet Options -> Connections -> Local Area Network (LAN) Settings -> Proxy server). This means I have to grant Loopback Exemption to every single one of my UWP apps, otherwise they will not be able to access the Internet at all.
Is there a way to circumvent this network isolation by doing something to the server side, instead of granting Loopback Exemption to every UWP app?
For example, (I have not yet tried this,) I imagine running a virtual machine on my computer and running my proxy server in the virtual machine will allow UWP apps to connect to the proxy server, since the proxy server is not listening on a loopback interface. Are there any other method / hack that will work similarly?
Things I have tried that don't work:
There actually is a way, without granting the exemption to every app or running the server on a separate (real or virtual) machine: Use networking trickery to make a localhost server look like it's running on another system.
I have implemented a solution using the WinDivert framework. In short, it "reflects" network packets destined for a specified "reflect address" back towards localhost, so a server running on localhost can be reached at the reflect address. This way UWP apps can access the server freely.
It should be possible to implement similar solutions using other technologies capable of filtering and injecting network packets.