OpenVPN 3 Core Library
Loading...
Searching...
No Matches
MyListener Class Reference
Inheritance diagram for MyListener:
[legend]
Collaboration diagram for MyListener:
[legend]

Classes

class  WatchdogThread
 

Public Types

typedef RCPtr< MyListenerPtr
 
typedef RCPtr< MyListenerPtr
 
- Public Types inherited from openvpn::WS::Server::Listener
typedef RCPtr< ListenerPtr
 
- Public Types inherited from openvpn::ProxyListener
typedef RCPtr< ProxyListenerPtr
 
- Public Types inherited from openvpn::Acceptor::ListenerBase
typedef RCPtr< ListenerBasePtr
 

Public Member Functions

 MyListener (openvpn_io::io_context &io_context, const WS::Server::Config::Ptr &config, const Listen::List &listen_list, const WS::Server::Listener::Client::Factory::Ptr &client_factory)
 
ScopedFD establish_tun (const TunBuilderCapture &tbc, TunBuilderSetup::Config *config, Stop *stop, std::ostream &os)
 
void destroy_tun (std::ostream &os)
 
void set_watchdog (pid_t pid)
 
void unset_watchdog ()
 
void add_bypass_route (const std::string &host, bool ipv6)
 
 MyListener (const MyConfig &config_arg, openvpn_io::io_context &io_context, const WS::Server::Config::Ptr &hconf, const Listen::List &listen_list, const WS::Server::Listener::Client::Factory::Ptr &client_factory)
 
Win::ScopedHANDLE tun_get_handle (std::ostream &os, const TunWin::Type tun_type, bool allow_local_dns_resolvers)
 
TunWin::Util::TapNameGuidPair get_adapter_state ()
 
Win::ScopedHANDLE establish_tun (const TunBuilderCapture &tbc, const std::wstring &openvpn_app_path, DWORD client_process_id, Stop *stop, std::ostream &os, TunWin::Type tun_type, bool allow_local_dns_resolvers, TunWin::Util::TapNameGuidPair tap)
 
bool destroy_tun (std::ostream &os)
 
void destroy_tun_exit ()
 
void set_client_process (Win::ScopedHANDLE &&proc)
 
void set_client_confirm_event (const std::string &confirm_handle_hex)
 
void set_client_destroy_event (const std::string &event_handle_hex)
 
HANDLE get_client_process ()
 
void set_remote_tap_handle_hex (const HANDLE tap_handle)
 
const std::string & get_remote_tap_handle_hex ()
 
void assign_ring_buffer (TunWin::RingBuffer *ring_buffer_arg)
 
void add_bypass_route (const std::string &host, bool ipv6)
 
- Public Member Functions inherited from openvpn::WS::Server::Listener
template<typename L >
 Listener (openvpn_io::io_context &io_context_arg, const Config::Ptr &config_arg, const L &listen_item_or_list, const Client::Factory::Ptr &client_factory_arg)
 
void start () override
 
void stop () override
 
template<typename CLIENT_INSTANCE , typename FUNC >
void walk (FUNC func) const
 

Public Attributes

const MyConfigconfig
 
TunWin::RingBuffer::Ptr ring_buffer
 

Private Member Functions

bool allow_client (AsioPolySock::Base &sock) override
 
bool allow_client (AsioPolySock::Base &sock) override
 

Private Attributes

std::string bypass_host
 
ActionList remove_cmds_bypass_hosts
 
TunMac::Setup::Ptr tun
 
WatchdogThread::Ptr watchdog
 
TunWin::Setup::Ptr tun
 
openvpn_io::windows::object_handle client_process
 
openvpn_io::windows::object_handle client_confirm_event
 
openvpn_io::windows::object_handle client_destroy_event
 
std::string remote_tap_handle_hex
 
openvpn_io::io_context & io_context_
 
DWORD vpn_interface_index = DWORD(-1)
 

Detailed Description

Definition at line 123 of file ovpnagent.cpp.

Member Typedef Documentation

◆ Ptr [1/2]

Definition at line 252 of file ovpnagent.cpp.

◆ Ptr [2/2]

Definition at line 109 of file ovpnagent.cpp.

Constructor & Destructor Documentation

◆ MyListener() [1/2]

MyListener::MyListener ( openvpn_io::io_context &  io_context,
const WS::Server::Config::Ptr config,
const Listen::List listen_list,
const WS::Server::Listener::Client::Factory::Ptr client_factory 
)
inline

Definition at line 254 of file ovpnagent.cpp.

◆ MyListener() [2/2]

MyListener::MyListener ( const MyConfig config_arg,
openvpn_io::io_context &  io_context,
const WS::Server::Config::Ptr hconf,
const Listen::List listen_list,
const WS::Server::Listener::Client::Factory::Ptr client_factory 
)
inline

Definition at line 111 of file ovpnagent.cpp.

Member Function Documentation

◆ add_bypass_route() [1/2]

void MyListener::add_bypass_route ( const std::string &  host,
bool  ipv6 
)
inline

Definition at line 296 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ add_bypass_route() [2/2]

void MyListener::add_bypass_route ( const std::string &  host,
bool  ipv6 
)
inline

Definition at line 392 of file ovpnagent.cpp.

◆ allow_client() [1/2]

bool MyListener::allow_client ( AsioPolySock::Base sock)
inlineoverrideprivatevirtual

Reimplemented from openvpn::WS::Server::Listener.

Definition at line 316 of file ovpnagent.cpp.

◆ allow_client() [2/2]

bool MyListener::allow_client ( AsioPolySock::Base sock)
inlineoverrideprivatevirtual

Reimplemented from openvpn::WS::Server::Listener.

Definition at line 504 of file ovpnagent.cpp.

◆ assign_ring_buffer()

void MyListener::assign_ring_buffer ( TunWin::RingBuffer ring_buffer_arg)
inline

Definition at line 387 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ destroy_tun() [1/2]

void MyListener::destroy_tun ( std::ostream &  os)
inline

Definition at line 273 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ destroy_tun() [2/2]

bool MyListener::destroy_tun ( std::ostream &  os)
inline

Definition at line 163 of file ovpnagent.cpp.

◆ destroy_tun_exit()

void MyListener::destroy_tun_exit ( )
inline

Definition at line 228 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ establish_tun() [1/2]

Win::ScopedHANDLE MyListener::establish_tun ( const TunBuilderCapture tbc,
const std::wstring &  openvpn_app_path,
DWORD  client_process_id,
Stop stop,
std::ostream &  os,
TunWin::Type  tun_type,
bool  allow_local_dns_resolvers,
TunWin::Util::TapNameGuidPair  tap 
)
inline

Definition at line 139 of file ovpnagent.cpp.

◆ establish_tun() [2/2]

ScopedFD MyListener::establish_tun ( const TunBuilderCapture tbc,
TunBuilderSetup::Config config,
Stop stop,
std::ostream &  os 
)
inline

Definition at line 263 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ get_adapter_state()

TunWin::Util::TapNameGuidPair MyListener::get_adapter_state ( )
inline

Definition at line 134 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ get_client_process()

HANDLE MyListener::get_client_process ( )
inline

Definition at line 370 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ get_remote_tap_handle_hex()

const std::string & MyListener::get_remote_tap_handle_hex ( )
inline

Definition at line 382 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ set_client_confirm_event()

void MyListener::set_client_confirm_event ( const std::string &  confirm_handle_hex)
inline

Definition at line 262 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ set_client_destroy_event()

void MyListener::set_client_destroy_event ( const std::string &  event_handle_hex)
inline

Definition at line 311 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ set_client_process()

void MyListener::set_client_process ( Win::ScopedHANDLE &&  proc)
inline

Definition at line 236 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ set_remote_tap_handle_hex()

void MyListener::set_remote_tap_handle_hex ( const HANDLE  tap_handle)
inline

Definition at line 377 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ set_watchdog()

void MyListener::set_watchdog ( pid_t  pid)
inline

Definition at line 286 of file ovpnagent.cpp.

Here is the caller graph for this function:

◆ tun_get_handle()

Win::ScopedHANDLE MyListener::tun_get_handle ( std::ostream &  os,
const TunWin::Type  tun_type,
bool  allow_local_dns_resolvers 
)
inline

Definition at line 125 of file ovpnagent.cpp.

◆ unset_watchdog()

void MyListener::unset_watchdog ( )
inline

Definition at line 291 of file ovpnagent.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ bypass_host

std::string MyListener::bypass_host
private

Definition at line 321 of file ovpnagent.cpp.

◆ client_confirm_event

openvpn_io::windows::object_handle MyListener::client_confirm_event
private

Definition at line 523 of file ovpnagent.cpp.

◆ client_destroy_event

openvpn_io::windows::object_handle MyListener::client_destroy_event
private

Definition at line 524 of file ovpnagent.cpp.

◆ client_process

openvpn_io::windows::object_handle MyListener::client_process
private

Definition at line 522 of file ovpnagent.cpp.

◆ config

const MyConfig& MyListener::config

Definition at line 498 of file ovpnagent.cpp.

◆ io_context_

openvpn_io::io_context& MyListener::io_context_
private

Definition at line 526 of file ovpnagent.cpp.

◆ remote_tap_handle_hex

std::string MyListener::remote_tap_handle_hex
private

Definition at line 525 of file ovpnagent.cpp.

◆ remove_cmds_bypass_hosts

ActionList MyListener::remove_cmds_bypass_hosts
private

Definition at line 322 of file ovpnagent.cpp.

◆ ring_buffer

TunWin::RingBuffer::Ptr MyListener::ring_buffer

Definition at line 501 of file ovpnagent.cpp.

◆ tun [1/2]

TunMac::Setup::Ptr MyListener::tun
private

Definition at line 324 of file ovpnagent.cpp.

◆ tun [2/2]

TunWin::Setup::Ptr MyListener::tun
private

Definition at line 521 of file ovpnagent.cpp.

◆ vpn_interface_index

DWORD MyListener::vpn_interface_index = DWORD(-1)
private

Definition at line 531 of file ovpnagent.cpp.

◆ watchdog

WatchdogThread::Ptr MyListener::watchdog
private

Definition at line 325 of file ovpnagent.cpp.


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