[client] local UDP listener for openvpn proxy is never closed and re-created
when we encounter an error in readTCPWriteUDP
a new udp listener is created, here: https://0xacab.org/leap/obfsvpn/-/blob/main/client/client.go?ref_type=heads#L458-463, which leads to the port being always blocked even after we call client.Stop
since the readTCPWriteUDP
go routine is still active and it hits an error after client.Stop
calls c.openvpnConn.Close()
in the desktop app this leads to not being able to use the bridges after a disconnect.
2024/10/15 15:25:36 Write err from 127.0.0.1:8080 to <nil>: write udp 127.0.0.1:8080->127.0.0.1:41590: use of closed network connection
maybe if a re-creation of the listener is necessary we should be more granular with the error, and only create a new listener when the error is not a use of closed network connection
error, i.e ! errors.Is(err, net.ErrClosed)