Hello,
I’m actually trying to add an option in openvpn which will allow the client to connect to the server with the lowest latency in his remote list. For now there are only two options to choose between servers : “ *--remote-random*” which randomize the order of the address list, the default one which will try the hosts in the order of the config file, and I want to add a 3rd one. To start I want to do it for udp and unix servers and clients. I’m a beginner in things like this so I started very simply : I wrote a little program in C to ping a host:port using udp but I can’t get an answer from an openvpn server. The only way I found to get an answer was to make the packet I send look like the start of a TLS transaction, but because of the TLS processing I can only get the first ping right, after it takes way too long to come back to be accurate. So I started digging in the source code to find where my packet is thrown away and why I don’t get any answer (even an error message would be enough). I’ve found how a “normal” packet is sent but what I want is the latency with the server, not in the tunnel. I don’t want to establish a connection to test my link with each server and, how I understand it, if I want use function like *encrypt_sign*() so my packet is recognized I need to have a tunnel set. I can’t replicate how the existing *ping *and *occ *packets are sent. What I would like to know is : - where my packet is processed and rejected ? - why I don't get any answer at all nor an error message on my server ? - is there a major issue making what I want to do impossible ? Kind regards, Paul Garnier