OpenVPN 3 Core Library
Loading...
Searching...
No Matches
OvpnDcoWinClient Class Reference

#include <ovpndcowincli.hpp>

Inheritance diagram for OvpnDcoWinClient:
[legend]
Collaboration diagram for OvpnDcoWinClient:
[legend]

Public Member Functions

void transport_start () override
 
bool transport_send_const (const Buffer &buf) override
 
bool transport_send (BufferAllocated &buf) override
 
void setup_tun (const OptionList &opt, TransportClient &transcli, bool is_tun_start=true)
 
void apply_push_update (const OptionList &opt, TransportClient &transcli) override
 
void tun_start (const OptionList &opt, TransportClient &transcli, CryptoDCSettings &dc_settings) override
 
std::string tun_name () const override
 
std::uint32_t vpn_interface_index () const override
 
void set_service_fail_handler ()
 
void adjust_mss (int mss) override
 
IP::Addr server_endpoint_addr () const override
 
Protocol transport_protocol () const override
 
void rekey (const CryptoDCInstance::RekeyType rktype, const KoRekey::Info &rkinfo) override
 
- Public Member Functions inherited from Client
 Client (String config_text, String username, String password) throws ConfigError, CredsUnspecifiedError
 
void connect ()
 
void stop ()
 
void show_stats ()
 
void event (ClientAPI_Event event)
 
void external_pki_cert_request (ClientAPI_ExternalPKICertRequest req)
 
void external_pki_sign_request (ClientAPI_ExternalPKISignRequest req)
 
void log (ClientAPI_LogInfo loginfo)
 
void done (ClientAPI_Status status)
 
boolean socket_protect (int socket)
 
boolean pause_on_connection_timeout ()
 
OpenVPNClientThread.TunBuilder tun_builder_new ()
 
 Client (OMI *omi)
 
bool is_dynamic_challenge () const
 
std::string dynamic_challenge_cookie ()
 
void set_clock_tick_action (const ClockTickAction action)
 
void print_stats ()
 
void set_write_url_fn (const std::string &fn)
 
- Public Member Functions inherited from openvpn::ClientAPI::OpenVPNClient
 OpenVPNClient ()
 
virtual ~OpenVPNClient ()
 
EvalConfig eval_config (const Config &)
 
Status provide_creds (const ProvideCreds &)
 
Status connect ()
 
ConnectionInfo connection_info ()
 
bool session_token (SessionToken &tok)
 
void stop ()
 
void pause (const std::string &reason)
 
void resume ()
 
void reconnect (int seconds)
 
long long stats_value (int index) const
 
std::vector< long long > stats_bundle () const
 
InterfaceStats tun_stats () const
 
TransportStats transport_stats () const
 
void post_cc_msg (const std::string &msg)
 
void send_app_control_channel_msg (const std::string &protocol, const std::string &msg)
 
void start_cert_check (const std::string &client_cert, const std::string &clientkey, const std::optional< const std::string > &ca=std::nullopt)
 Start up the cert check handshake using the given certs and key.
 
void start_cert_check_epki (const std::string &alias, const std::optional< const std::string > &ca)
 Start up the cert check handshake using the given epki_alias string.
 
virtual bool remote_override_enabled ()
 
virtual void remote_override (RemoteOverride &)
 
- Public Member Functions inherited from openvpn::TunBuilderBase
virtual bool tun_builder_set_layer (int layer)
 Optional callback that indicates OSI layer to be used.
 
virtual bool tun_builder_set_remote_address (const std::string &address, bool ipv6)
 Callback to set the address of the remote server.
 
virtual bool tun_builder_add_address (const std::string &address, int prefix_length, const std::string &gateway, bool ipv6, bool net30)
 Callback to add a network address to the VPN interface.
 
virtual bool tun_builder_set_route_metric_default (int metric)
 Optional callback to set default value for route metric.
 
virtual bool tun_builder_reroute_gw (bool ipv4, bool ipv6, unsigned int flags)
 Callback to reroute the default gateway to the VPN interface.
 
virtual bool tun_builder_add_route (const std::string &address, int prefix_length, int metric, bool ipv6)
 Callback to add a route to the VPN interface.
 
virtual bool tun_builder_exclude_route (const std::string &address, int prefix_length, int metric, bool ipv6)
 Callback to exclude route from VPN interface.
 
virtual bool tun_builder_set_dns_options (const DnsOptions &dns)
 Callback to set DNS related options to VPN interface.
 
virtual bool tun_builder_set_mtu (int mtu)
 Callback to set the MTU of the VPN interface.
 
virtual bool tun_builder_set_session_name (const std::string &name)
 Sets the session name for the TunBuilder.
 
virtual bool tun_builder_add_proxy_bypass (const std::string &bypass_host)
 Callback to add a host which should bypass the proxy.
 
virtual bool tun_builder_set_proxy_auto_config_url (const std::string &url)
 Callback to set the proxy "Auto Config URL".
 
virtual bool tun_builder_set_proxy_http (const std::string &host, int port)
 Callback to set the HTTP proxy.
 
virtual bool tun_builder_set_proxy_https (const std::string &host, int port)
 Set the HTTPS proxy for the TunBuilder session.
 
virtual bool tun_builder_add_wins_server (const std::string &address)
 Callback to add a Windows WINS server to the VPN interface.
 
virtual bool tun_builder_set_allow_family (int af, bool allow)
 Indicates whether traffic of a certain address family (AF_INET or AF_INET6) should be blocked or allowed.
 
virtual bool tun_builder_set_allow_local_dns (bool allow)
 Optional callback that indicates whether local DNS traffic should be blocked or allowed to prevent DNS queries from leaking while the tunnel is connected.
 
virtual int tun_builder_establish ()
 Callback to establish the VPN tunnel.
 
virtual bool tun_builder_persist ()
 Determines if the TUN interface can be persisted.
 
virtual std::vector< std::string > tun_builder_get_local_networks (bool ipv6)
 Retrieves a list of local networks to exclude from the VPN network.
 
virtual void tun_builder_establish_lite ()
 Indicates a reconnection with persisted TUN state.
 
virtual void tun_builder_teardown (bool disconnect)
 Indicates that tunnel is being torn down.
 
virtual ~TunBuilderBase ()=default
 Virtual destructor for the TunBuilderBase class.
 
- Public Member Functions inherited from openvpn::ClientAPI::LogReceiver
virtual ~LogReceiver ()=default
 
- Public Member Functions inherited from ClientBase
bool socket_protect (openvpn_io::detail::socket_type socket, std::string remote, bool ipv6) override
 

Static Public Member Functions

static bool available ()
 
- Static Public Member Functions inherited from openvpn::ClientAPI::OpenVPNClient
static int stats_n ()
 
static std::string stats_name (int index)
 

Protected Member Functions

 OvpnDcoWinClient (openvpn_io::io_context &io_context, ClientConfig *config, TransportClientParent *parent)
 
void resolve_callback (const openvpn_io::error_code &error, results_type results) override
 
void start_impl_ ()
 
void queue_read_ ()
 
bool send_ (const Buffer &buf)
 
void stop_ () override
 
template<typename CB >
void add_peer_ (CB complete)
 
void set_keepalive_ ()
 
void add_crypto_ (const CryptoDCInstance::RekeyType type, const KoRekey::KeyConfig *kc)
 
void swap_keys_ ()
 
void get_stats_ ()
 
DWORD dco_ioctl_ (DWORD code, LPVOID in_buf=NULL, DWORD in_buf_size=0, LPVOID out_buf=NULL, DWORD out_buf_size=0, openvpn_io::windows::overlapped_ptr *ov=nullptr)
 
TunWin::TAPStream * get_handle ()
 
virtual SessionStats::DCOTransportSource::Data dco_transport_stats_delta () override
 
- Protected Member Functions inherited from openvpn::ClientAPI::OpenVPNClient
Status do_connect ()
 
virtual void connect_attach ()
 
virtual void connect_pre_run ()
 
virtual void connect_run ()
 
virtual void connect_session_stop ()
 
virtual Stopget_async_stop ()
 

Protected Attributes

TunWin::ScopedTAPStream handle_
 
TunWin::SetupBase::Ptr tun_setup_
 
BufferAllocated buf_
 
Protocol proto_
 
openvpn_io::ip::udp::endpoint endpoint_
 
TunWin::DcoTunPersist::Ptr tun_persist
 
SessionStats::DCOTransportSource::Data last_stats
 
SessionStats::DCOTransportSource::Data last_delta
 
- Protected Attributes inherited from openvpn::ClientAPI::OpenVPNClient
Private::ClientStatestate
 

Private Types

typedef RCPtr< OvpnDcoWinClientPtr
 

Friends

class ClientConfig
 

Additional Inherited Members

- Public Types inherited from Client
enum  ClockTickAction {
  CT_UNDEF , CT_STOP , CT_RECONNECT , CT_PAUSE ,
  CT_RESUME , CT_STATS
}
 
- Public Attributes inherited from Client
std::string epki_ca
 
std::string epki_cert
 
std::string certcheck_cert
 file name of properly encoded server cert
 
std::string certcheck_clientca_fn
 file name of properly encoded client ca
 

Detailed Description

Definition at line 14 of file ovpndcowincli.hpp.

Member Typedef Documentation

◆ Ptr

typedef RCPtr<OvpnDcoWinClient> OvpnDcoWinClient::Ptr
private

Definition at line 19 of file ovpndcowincli.hpp.

Constructor & Destructor Documentation

◆ OvpnDcoWinClient()

OvpnDcoWinClient::OvpnDcoWinClient ( openvpn_io::io_context &  io_context,
ClientConfig config,
TransportClientParent *  parent 
)
inlineprotected

Definition at line 228 of file ovpndcowincli.hpp.

Member Function Documentation

◆ add_crypto_()

void OvpnDcoWinClient::add_crypto_ ( const CryptoDCInstance::RekeyType  type,
const KoRekey::KeyConfig *  kc 
)
inlineprotected

Definition at line 463 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ add_peer_()

template<typename CB >
void OvpnDcoWinClient::add_peer_ ( CB  complete)
inlineprotected

Definition at line 384 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ adjust_mss()

void OvpnDcoWinClient::adjust_mss ( int  mss)
inlineoverride

Definition at line 177 of file ovpndcowincli.hpp.

◆ apply_push_update()

void OvpnDcoWinClient::apply_push_update ( const OptionList &  opt,
TransportClient &  transcli 
)
inlineoverride

Definition at line 123 of file ovpndcowincli.hpp.

◆ available()

static bool OvpnDcoWinClient::available ( )
inlinestatic

Definition at line 22 of file ovpndcowincli.hpp.

◆ dco_ioctl_()

DWORD OvpnDcoWinClient::dco_ioctl_ ( DWORD  code,
LPVOID  in_buf = NULL,
DWORD  in_buf_size = 0,
LPVOID  out_buf = NULL,
DWORD  out_buf_size = 0,
openvpn_io::windows::overlapped_ptr *  ov = nullptr 
)
inlineprotected

Definition at line 517 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ dco_transport_stats_delta()

virtual SessionStats::DCOTransportSource::Data OvpnDcoWinClient::dco_transport_stats_delta ( )
inlineoverrideprotectedvirtual

Definition at line 572 of file ovpndcowincli.hpp.

◆ get_handle()

TunWin::TAPStream * OvpnDcoWinClient::get_handle ( )
inlineprotected

Definition at line 562 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ get_stats_()

void OvpnDcoWinClient::get_stats_ ( )
inlineprotected

Definition at line 494 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ queue_read_()

void OvpnDcoWinClient::queue_read_ ( )
inlineprotected

Definition at line 316 of file ovpndcowincli.hpp.

◆ rekey()

void OvpnDcoWinClient::rekey ( const CryptoDCInstance::RekeyType  rktype,
const KoRekey::Info &  rkinfo 
)
inlineoverride

Definition at line 193 of file ovpndcowincli.hpp.

◆ resolve_callback()

void OvpnDcoWinClient::resolve_callback ( const openvpn_io::error_code &  error,
results_type  results 
)
inlineoverrideprotected

Definition at line 235 of file ovpndcowincli.hpp.

◆ send_()

bool OvpnDcoWinClient::send_ ( const Buffer &  buf)
inlineprotected

Definition at line 343 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ server_endpoint_addr()

IP::Addr OvpnDcoWinClient::server_endpoint_addr ( ) const
inlineoverride

Definition at line 183 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ set_keepalive_()

void OvpnDcoWinClient::set_keepalive_ ( )
inlineprotected

Definition at line 443 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ set_service_fail_handler()

void OvpnDcoWinClient::set_service_fail_handler ( )
inline

Definition at line 169 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ setup_tun()

void OvpnDcoWinClient::setup_tun ( const OptionList &  opt,
TransportClient &  transcli,
bool  is_tun_start = true 
)
inline

Definition at line 66 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ start_impl_()

void OvpnDcoWinClient::start_impl_ ( )
inlineprotected

Definition at line 260 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ stop_()

void OvpnDcoWinClient::stop_ ( )
inlineoverrideprotected

Definition at line 357 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ swap_keys_()

void OvpnDcoWinClient::swap_keys_ ( )
inlineprotected

Definition at line 489 of file ovpndcowincli.hpp.

Here is the caller graph for this function:

◆ transport_protocol()

Protocol OvpnDcoWinClient::transport_protocol ( ) const
inlineoverride

Definition at line 188 of file ovpndcowincli.hpp.

◆ transport_send()

bool OvpnDcoWinClient::transport_send ( BufferAllocated &  buf)
inlineoverride

Definition at line 61 of file ovpndcowincli.hpp.

◆ transport_send_const()

bool OvpnDcoWinClient::transport_send_const ( const Buffer &  buf)
inlineoverride

Definition at line 54 of file ovpndcowincli.hpp.

◆ transport_start()

void OvpnDcoWinClient::transport_start ( )
inlineoverride

Definition at line 32 of file ovpndcowincli.hpp.

◆ tun_name()

std::string OvpnDcoWinClient::tun_name ( ) const
inlineoverride

Definition at line 153 of file ovpndcowincli.hpp.

◆ tun_start()

void OvpnDcoWinClient::tun_start ( const OptionList &  opt,
TransportClient &  transcli,
CryptoDCSettings &  dc_settings 
)
inlineoverride

Definition at line 136 of file ovpndcowincli.hpp.

◆ vpn_interface_index()

std::uint32_t OvpnDcoWinClient::vpn_interface_index ( ) const
inlineoverride

Definition at line 158 of file ovpndcowincli.hpp.

Friends And Related Symbol Documentation

◆ ClientConfig

friend class ClientConfig
friend

Definition at line 18 of file ovpndcowincli.hpp.

Member Data Documentation

◆ buf_

BufferAllocated OvpnDcoWinClient::buf_
protected

Definition at line 587 of file ovpndcowincli.hpp.

◆ endpoint_

openvpn_io::ip::udp::endpoint OvpnDcoWinClient::endpoint_
protected

Definition at line 589 of file ovpndcowincli.hpp.

◆ handle_

TunWin::ScopedTAPStream OvpnDcoWinClient::handle_
protected

Definition at line 258 of file ovpndcowincli.hpp.

◆ last_delta

SessionStats::DCOTransportSource::Data OvpnDcoWinClient::last_delta
protected

Definition at line 594 of file ovpndcowincli.hpp.

◆ last_stats

SessionStats::DCOTransportSource::Data OvpnDcoWinClient::last_stats
protected

Definition at line 593 of file ovpndcowincli.hpp.

◆ proto_

Protocol OvpnDcoWinClient::proto_
protected

Definition at line 588 of file ovpndcowincli.hpp.

◆ tun_persist

TunWin::DcoTunPersist::Ptr OvpnDcoWinClient::tun_persist
protected

Definition at line 591 of file ovpndcowincli.hpp.

◆ tun_setup_

TunWin::SetupBase::Ptr OvpnDcoWinClient::tun_setup_
protected

Definition at line 586 of file ovpndcowincli.hpp.


The documentation for this class was generated from the following file: