Plugging and unplugging the network cable can increase the success rate of hole punching.
Testing environment:
iroh-net version: v0.27.0 server (Linux, Windows), client (Windows).
client is a laptop that supports both Wi-Fi and Ethernet connections.
Result
-
When the client program starts, it's only connected to Wi-Fi. At this point, it can only use relay. I plug in the Ethernet cable, and after a while, it switches to direct connection. I then unplug the cable, and after a while, it switches back to relay.
The network change is
Wi-Fi → Wi-Fi + Ethernet → Wi-Fi, The connection state changes fromrelay → direct → relay. -
When the client program starts, it's connected to both Wi-Fi and Ethernet. At this point, it can only use relay. I unplug the cable, and after a while, it switches to direct connection. I then plug in the cable again, and after a while, it switches back to relay.
The network change is
Wi-Fi + Ethernet → Wi-Fi → Wi-Fi + Ethernet, The connection state changes fromrelay → direct → relay.
For detailed steps, please refer to the attached log.
Anything to do with multiple network interfaces may be related to #2632
Would be great to know if this is still the case, we had some changes that should help with this already land
Would be great to know if this is still the case, we had some changes that should help with this already land
It seems that the issue cannot be reproduced now. I tested it today while updating to version 0.93.0. I don't quite remember from which version this issue no longer occurs, as I haven't encountered it recently. Perhaps we can close this issue.
thanks for testing, will close for now. let us know if you encounter the issue again