OpenVPN 3 Core Library
Loading...
Searching...
No Matches
serverprober.hpp File Reference
#include <map>
#include <memory>
#include <utility>
#include <vector>
#include <openvpn/io/io.hpp>
#include <openvpn/addr/ip.hpp>
#include <openvpn/buffer/buffer.hpp>
#include <openvpn/log/sessionstats.hpp>
#include <openvpn/time/time.hpp>
#include <openvpn/time/asiotimer.hpp>
#include <openvpn/client/remotelist.hpp>
#include <openvpn/transport/socket_protect.hpp>
#include <openvpn/ssl/proto.hpp>
#include <openvpn/ssl/oob_probe.hpp>
Include dependency graph for serverprober.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openvpn::ServerProber
 
struct  openvpn::ServerProber::Result
 One responding server, with its measured latency and advertised parameters. More...
 
struct  openvpn::ServerProber::NotifyCallback
 
struct  openvpn::ServerProber::Target
 
struct  openvpn::ServerProber::Pending
 
struct  openvpn::ServerProber::RecvCtx
 

Namespaces

namespace  openvpn
 

Detailed Description

Out-of-band server latency probing for best-server selection.

Before the client connects, ServerProber sends a SERVER_PROBE (wrapped with the configured control-channel protection) to every already-resolved remote endpoint, waits a short asynchronous window for the PROBE_REPLYs, and reports each responding server together with its measured round-trip time. A caller (the connect loop) then reorders the remote list by latency/priority.

Socket model: one native UDP socket per address family, each socket_protect'd, with the source port bound implicitly by the first send. The sockets are held for the prober's lifetime and can be released (release_socket) so the winning remote's socket is adopted as the connection socket for the handshake shortcut, with no rebind (that adoption is a later task).

Definition in file serverprober.hpp.