OpenVPN 3 Core Library
Loading...
Searching...
No Matches
altproxy.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_ALTPROXY_H
13#define OPENVPN_TRANSPORT_ALTPROXY_H
14
15#include <string>
16
17#include <openvpn/common/rc.hpp>
22
23namespace openvpn {
24struct AltProxy : public RC<thread_unsafe_refcount>
25{
44
46
47 // return proxy name
48 virtual std::string name() const = 0;
49
50 // called to indicate whether or not remote_list should be cached
51 virtual void set_enable_cache(const bool enable_cache) = 0;
52
53 // return a RemoteList::Ptr (optional) to precache it
54 virtual void precache(RemoteList::Ptr &r) = 0;
55
56 // iterate to next host in proxy-specific remote_list, return true
57 // to prevent next() from being called on global remote_list
58 virtual bool next() = 0;
59
60 // return true if this proxy method only supports TCP transport
61 virtual bool requires_tcp() const = 0;
62
63 // return a new TransportClientFactory for this proxy
65};
66} // namespace openvpn
67
68#endif
Reference count base class for objects tracked by RCPtr. Disallows copying and assignment.
Definition rc.hpp:912
SocketProtect * socket_protect
Definition altproxy.hpp:42
StrongRandomAPI::Ptr rng
Definition altproxy.hpp:39
SessionStats::Ptr stats
Definition altproxy.hpp:37
DigestFactory::Ptr digest_factory
Definition altproxy.hpp:40
RemoteList::Ptr remote_list
Definition altproxy.hpp:34
virtual TransportClientFactory::Ptr new_transport_client_factory(const Config &)=0
RCPtr< AltProxy > Ptr
Definition altproxy.hpp:45
virtual std::string name() const =0
virtual bool next()=0
virtual void precache(RemoteList::Ptr &r)=0
virtual bool requires_tcp() const =0
virtual void set_enable_cache(const bool enable_cache)=0