Amebis / eduVPN

Windows eduVPN Client
GNU General Public License v3.0
39 stars 17 forks source link

automatic failover to TCP doesn't work #213

Closed efef closed 1 year ago

efef commented 1 year ago

Tested with 3.3.0.1 and noticed when blocking outbound UDP traffic in windows the client doesn't failover to TCP. Also installed openVPN 2.5.7 (same version used in 3.3.0.1) to validate this versions works fine regarding auto failover. Tested with server nl.eduvpn.org

efef commented 1 year ago

When testing with client version 3.0 I notice the same problem, not connecting when blocking udp traffic.

rozmansi commented 1 year ago

I reproduced and analyzed this issue.

With 7f15f47c57929bbcf3cfc5aceec4f49e8f19716a the eduVPN.Client.exe <-> openvpn.exe communication was redesigned. We need the openvpn.exe to terminate when eduVPN.Client.exe dies, but the --management-signal is hard-coded to rise SIGUSR1, which is not enough. So, the --remap-usr1 SIGTERM was added too.

Unfortunately, blocked UDP remote also rises SIGUSR1 (server_poll) to try next remote. With the --remap-usr1 SIGTERM this causes openvpn.exe to exit, allowing eduVPN.Client.exe to make a fresh connection attempt. Again trying the first remote, creating a loop.