OpenVPN 3 Core Library
Loading...
Searching...
No Matches
socket_protect.hpp
Go to the documentation of this file.
1
// OpenVPN -- An application to securely tunnel IP networks
2
// over a single port, with support for SSL/TLS-based
3
// session authentication and key exchange,
4
// packet encryption, packet authentication, and
5
// packet compression.
6
//
7
// Copyright (C) 2012- OpenVPN Inc.
8
//
9
// SPDX-License-Identifier: MPL-2.0 OR AGPL-3.0-only WITH openvpn3-openssl-exception
10
//
11
12
#ifndef OPENVPN_TRANSPORT_SOCKET_PROTECT_H
13
#define OPENVPN_TRANSPORT_SOCKET_PROTECT_H
14
15
#include <
openvpn/addr/ip.hpp
>
16
#ifdef OPENVPN_PLATFORM_UWP
17
#include <openvpn/transport/uwp_socket_protect.hpp>
18
#endif
19
20
namespace
openvpn
{
21
// Used as an interface in cases where the high-level controlling app
22
// needs early access to newly created transport sockets for making
23
// property changes. For example, on Android, we need to "protect"
24
// the socket from being routed into the VPN tunnel.
25
class
BaseSocketProtect
26
{
27
public
:
28
virtual
~BaseSocketProtect
() =
default
;
29
30
virtual
bool
socket_protect
(openvpn_io::detail::socket_type socket,
IP::Addr
endpoint) = 0;
31
};
32
33
#ifdef OPENVPN_PLATFORM_UWP
34
typedef
UWPSocketProtect
SocketProtect
;
35
#else
36
typedef
BaseSocketProtect
SocketProtect
;
37
#endif
38
}
// namespace openvpn
39
40
#endif
openvpn::BaseSocketProtect
Definition
socket_protect.hpp:26
openvpn::BaseSocketProtect::~BaseSocketProtect
virtual ~BaseSocketProtect()=default
openvpn::BaseSocketProtect::socket_protect
virtual bool socket_protect(openvpn_io::detail::socket_type socket, IP::Addr endpoint)=0
openvpn::IP::Addr
Definition
ip.hpp:39
ip.hpp
openvpn
Definition
ovpncli.cpp:97
openvpn::SocketProtect
BaseSocketProtect SocketProtect
Definition
socket_protect.hpp:36
openvpn
transport
socket_protect.hpp
Generated by
1.9.8