Open jerry-sands opened 10 months ago
UPDATE:
I use Java's ServerSocket to create a socket that listens to a specific port (without specifying the interface or the IP address). Before the "Local network access" feature was available, when I was listening to a port in all interfaces with the previous "Advanced Networking" mode, I could connect to that port by creating a Socket client that connects to 127.0.0.1 and that port. Unfortunately, now with the "Local network access" feature, the Socket client cannot connect to the server socket.
I used netcat (the nc command) to test the functionality of inner communication in WSA and saw the following:
nc -s 127.0.0.1 -lp 1234
starts a server port in the lo
interface. In this case, we can connect to the port using the command nc 127.0.0.1 1234
.nc -s 0.0.0.0 -lp 1234
starts a server port that should listen to all interfaces. In this case, we can connect to the port using the command nc 127.0.0.1 1234
.nc -s <ip-address-of-eth0> -lp 1234
starts a server port in the eth0
interface. In this case, we cannot connect to the port using the command nc 127.0.0.1 1234
.nc -lp 1234
starts a server port that should listen to all interfaces (should be the same as nc -s 0.0.0.0 -lp 1234
). In this case, we cannot connect to the port using the command nc 127.0.0.1 1234
.
Steps to reproduce
When activating "Local network access", in which Windows and WSA get the same IP address, we can't communicate between two running apps using sockets. We can communicate with a TCP socket we opened in WSA from Windows. When deactivating "Local network access", the apps can communicate over sockets, but we cannot communicate between WSA and Windows.
In both scenarios, we try to connect to localhost and a specific port.
Before the "Local network access" feature was available, the workaround shown in issue #213 did work as expected.
✔️ Expected Behavior
When activating "Local network access" we should be able to communicate both between apps and between WSA and Windows.
❌ Actual Behavior
"Local network access" prevents the localhost communication inside WSA.
Other Software
No response
Please specify the version of Windows Subsystem for Android
2310.40000.2.0