I am connecting a Windows PC and a Android Phone via USB tethering.
However, every so often the Network settings the phone selects will change (I can only guess it is a timeout or based on restart). And since that means there is now a “new” Network, my somewhat too agressive Firewall will get in the way.
While I can fix that, it is annoying I have to. Given you already had perfectly working network settings before.
Any chance you could save the previously used Network settings in the PC client, for the Phone to retreive? Make it a list, so multiple Phones have settings to use in paralell.
I haven’t looked at your code, but I think it does something like:
claim to be a USB network adapter with connected cable
Answer DHCP calls with cached or randomized IP address and network settings
Make a network connection between server and client
While step 2 usually gives the same value from the cache, every so often it gives something new. Which windows and my software firewall consider a different network. And every time it encounters a new one, I have to mark it as trustworthy before server and client can connect.
I think my laptop has encountered 2-3 actual, physical networks and 12+ fake Audio Relay networks by now.
I see. When you enable USB tethering on the phone, the networking aspect is negotiated between the Android OS and Windows. (The USB tethering screen comes from Android, Audiorelay is just redirecting you there).
So the app has no control over Windows creating a lot of networks.
What AudioRelay could do is to use ADB instead of pointing you to USB tethering. You can follow/vote for this feature request here: