OpenVPN 3 Core Library
Loading...
Searching...
No Matches
ovpncli.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// API for OpenVPN Client, may be used standalone or wrapped by swig.
13// Use ovpncli.i to wrap the API for swig.
14// The crux of the API is defined in OpenVPNClient (below)
15// and TunBuilderBase.
16
17#include <string>
18#include <unordered_set>
19#include <utility>
20#include <vector>
21#include <optional>
22
27
28namespace openvpn {
29class OptionList;
30class ProfileMerge;
31class Stop;
32
33namespace InitProcess {
34class Init;
35};
36
37namespace ClientAPI {
38// Represents an OpenVPN server and its friendly name
39// (client reads)
41{
42 std::string server;
43 std::string friendlyName;
44};
45
55{
56 // true if error
57 bool error = false;
58
59 // if error, message given here
60 std::string message;
61
62 // this username must be used with profile
63 std::string userlockedUsername;
64
65 // profile name of config
66 std::string profileName;
67
68 // "friendly" name of config
69 std::string friendlyName;
70
71 // true: no creds required, false: username/password required
72 bool autologin = false;
73
74 // if true, this is an External PKI profile (no cert or key directives)
75 bool externalPki = false;
76
77 // VPN server CA in PEM format as given in the configuration. This is the CA, the
78 // VPN server certificate is checked against. This is not a parsed version so it
79 // can have extra lines around the actual certificates that an X509 parser would
80 // ignore.
81 // Note that this can can be empty if the profile uses --peer-fingerprint instead of traditional PKI check.
82 std::string vpnCa;
83
84 // static challenge, may be empty, ignored if autologin
85 std::string staticChallenge;
86
87 // true if static challenge response should be echoed to UI, ignored if autologin
88 bool staticChallengeEcho = false;
89
90 // true if this profile requires a private key password
92
93 // true if user is allowed to save authentication password in UI
94 bool allowPasswordSave = false;
95
96 // information about the first remote item in config
97 std::string remoteHost; // will be overridden by Config::serverOverride if defined
98 std::string remotePort;
99 std::string remoteProto;
100
101 // optional list of user-selectable VPN servers
102 std::vector<ServerEntry> serverList;
103
104 // optional, values are "tap-windows6" and "wintun"
105 std::string windowsDriver;
106
109};
110
111// used to pass credentials to VPN core
112// (client writes)
114{
115 std::string username;
116 std::string password;
117
118 std::string http_proxy_user;
119 std::string http_proxy_pass;
120
121 // response to challenge
122 std::string response;
123
124 // Dynamic challenge/response cookie
126};
127
128// used to get session token from VPN core
129// (client reads)
131{
132 std::string username;
133 std::string session_id; // an OpenVPN Session ID, used as a proxy for password
134};
135
136// used to query challenge/response from user
137// (client reads)
139{
140 std::string challenge;
141 bool echo = false;
142 bool responseRequired = false;
143
144 std::string stateID;
145};
146
147// a basic key/value pair, used in Config below when OpenVPN profile is
148// passed as a dictionary
150{
152 {
153 }
154
155 KeyValue(std::string key_arg, std::string value_arg)
156 : key(std::move(key_arg)),
157 value(std::move(value_arg))
158 {
159 }
160
161 std::string key;
162 std::string value;
163};
164
165/* Settings in this struct do not need to be parsed, so we can share them
166 * between the parsed and unparsed client settings */
168{
169 // Set to identity OpenVPN GUI version.
170 // Format should be "<gui_identifier><space><version>"
171 // Passed to server as IV_GUI_VER.
172 std::string guiVersion;
173
174 // Set to a comma separated list of supported SSO mechanisms that may
175 // be signalled via INFO_PRE to the client.
176 // "openurl" deprecated version of webauth
177 // "webauth" to continue authentication by opening an url in a browser
178 // "crtext" gives a challenge response in text format that needs to
179 // responded via control channel. (
180 // Passed to the server as IV_SSO
181 std::string ssoMethods;
182
183 // Set to a comma separated list of supported custom app control channel
184 // protocols. The semantics of these protocols are determined by the
185 // app/server and not by the OpenVPN protocol.
187
188 // Override the string that is passed as IV_HWADDR to the server
189 std::string hwAddrOverride;
190
191 // Set the string that is passed to the server as IV_PLAT_VER
192 std::string platformVersion;
193
194 // Use a different server than that specified in "remote"
195 // option of profile
196 std::string serverOverride;
197
198 // Use a different port than that specified in "remote"
199 // option of profile
200 std::string portOverride;
201
202 // Connection timeout in seconds, or 0 to retry indefinitely
203 int connTimeout = 0;
204
205 // Keep tun interface active during pauses or reconnections
206 bool tunPersist = false;
207
208 // If true and a redirect-gateway profile doesn't also define
209 // DNS servers, use the standard Google DNS servers.
210 bool googleDnsFallback = false;
211
212 // If true --dhcp-option DOMAIN{-SEARCH} are parsed as split
213 // domains, ADAPTER_DOMAIN_SUFFIX is the only search domain
214#if defined(OPENVPN_PLATFORM_WIN) || defined(OPENVPN_PLATFORM_MAC) || defined(OPENVPN_PLATFORM_LINUX) || defined(OPENVPN_PLATFORM_IPHONE)
216#else
218#endif
219
220 // if true, do synchronous DNS lookup.
222
223 // Enable autologin sessions
224 bool autologinSessions = true;
225
226 // If true, consider AUTH_FAILED to be a non-fatal error,
227 // and retry the connection after a pause.
228 bool retryOnAuthFailed = false;
229
230 // If true, don't send client cert/key to peer.
231 bool disableClientCert = false;
232
233 // SSL library debug level
235
236 // private key password (optional)
238
239 // Default key direction parameter for tls-auth (0, 1, or
240 // -1 (bidirectional -- default)) if no key-direction parameter
241 // defined in profile. Generally should be -1 (bidirectional)
242 // for compatibility with 2.x branch
244
245 // Override the minimum TLS version:
246 // Will not lower the minimum if already a higher minimum has been
247 // specified by tls-version-min in the profile
248 // disabled -- don't specify a minimum, and disable any minimum
249 // specified in profile
250 // default or "" -- use profile minimum or system minimum
251 // tls_1_0 -- use TLS 1.0 minimum
252 // tls_1_1 -- use TLS 1.1 minimum
253 // tls_1_2 -- use TLS 1.2 minimum
254 // tls_1_3 -- use TLS 1.3 minimum
255
256
258
259 // Override or default the tls-cert-profile setting:
260 // default or "" -- use profile default
261 // legacy -- allow 1024-bit RSA certs signed with SHA1
262 // preferred -- require at least 2048-bit RSA certs signed
263 // with SHA256 or higher
264 // suiteb -- require NSA Suite-B
265 // legacy-default -- use legacy as the default if profile
266 // doesn't specify tls-cert-profile
267 // preferred-default -- use preferred as the default if profile
268 // doesn't specify tls-cert-profile
270
271 // Overrides the list of tls ciphers like the tls-cipher option
272 std::string tlsCipherList;
273
274 // Overrides the list of TLS 1.3 ciphersuites like the tls-ciphersuites
275 // option
277
278 // HTTP Proxy parameters (optional)
279 std::string proxyHost; // hostname or IP address of proxy
280 std::string proxyPort; // port number of proxy
281 std::string proxyUsername; // proxy credentials (optional)
282 std::string proxyPassword; // proxy credentials (optional)
283 bool proxyAllowCleartextAuth = false; // enables HTTP Basic auth
284
285 // Custom proxy implementation
286 bool altProxy = false;
287
288 // Enable automatic Data Channel Offload
289#if defined(ENABLE_OVPNDCO) || defined(ENABLE_OVPNDCOWIN)
290 bool dco = true;
291#else
292 bool dco = false;
293#endif
294
295 // pass through pushed "echo" directives via "ECHO" event
296 bool echo = false;
297
298 // pass through control channel INFO notifications via "INFO" event
299 bool info = false;
300
301 // Allow access to local LAN. This is for platforms like
302 // Android that disable local LAN access by default.
304
305#ifdef OPENVPN_PLATFORM_ANDROID
306 // Instead of setting include and exclude routes, calculate a set of
307 // include routes only to emulate the lack of excluding routes
308 // (Android earlier than Tiramisu (Android 13))
309 bool enableRouteEmulation = true;
310#endif
311
312 // Periodic convenience clock tick in milliseconds.
313 // Will call clock_tick() at a frequency defined by this parameter.
314 // Set to 0 to disable.
315 unsigned int clockTickMS = 0;
316
317 // Gremlin configuration (requires that the core is built with OPENVPN_GREMLIN)
318 std::string gremlinConfig;
319
320 // Use wintun instead of tap-windows6 on Windows
321 bool wintun = false;
322
323 // On Windows allow DNS resolvers on localhost, such as Umbrella Roaming Client
324 // This disables adding NRPT rule for "." zone and permits DNS requests to localhost
326
327 // Allow usage of legacy (cipher) algorithm that are no longer considered safe
328 // This includes BF-CBC, single DES and RC2 private key encryption.
329 // With OpenSSL 3.0 this also instructs OpenSSL to load the legacy provider.
331
332 // By default modern OpenVPN version (OpenVPN 2.6 and OpenVPN core 3.7) will only allow
333 // preferred algorithms (AES-GCM, Chacha20-Poly1305) that also work with the newer DCO
334 // implementations. If this is enabled, we fall back to allowing all algorithms (if these are
335 // supported by the crypto library)
337
338 // Generate an INFO_JSON/TUN_BUILDER_CAPTURE event
339 // with all tun builder properties pushed by server.
340 // Currently only implemented on Linux.
342};
343
344// OpenVPN config-file/profile. Includes a few settings that we do not just
345// copy but also parse
346// (client writes)
347struct Config : public ConfigCommon
348{
349 // OpenVPN profile as a string
350 std::string content;
351
352 // OpenVPN profile as series of key/value pairs (may be provided exclusively
353 // or in addition to content string above).
354 std::vector<KeyValue> contentList;
355
356 // Force a given transport protocol
357 // Should be tcp, udp, or adaptive.
358 std::string protoOverride;
359
360 // Force transport protocol IP version
361 // Should be 4 for IPv4 or 6 for IPv6.
363
364 // allowUnusedAddrFamilies preference
365 // no -- disable IPv6/IPv4, so tunnel will be IPv4 or IPv6 only if not dualstack
366 // yes -- Allow continuing using native IPv4/IPv6 connectivity for single IP family tunnel
367 // default (or empty string) -- leave decision to server/config
369
370 // Compression mode, one of:
371 // yes -- allow compression on both uplink and downlink
372 // asym -- allow compression on downlink only (i.e. server -> client)
373 // no (default if empty) -- support compression stubs only
374 std::string compressionMode;
375
376 // An ID used for get-certificate and RSA signing callbacks
377 // for External PKI profiles.
378 std::string externalPkiAlias;
379
380 // Pass custom key/value pairs to OpenVPN server.
381 std::vector<KeyValue> peerInfo;
382};
383
384// used to communicate VPN events such as connect, disconnect, etc.
385// (client reads)
386struct Event
387{
388 bool error = false; // true if error (fatal or nonfatal)
389 bool fatal = false; // true if fatal error (will disconnect)
390 std::string name; // event name
391 std::string info; // additional event info
392};
393
402{
403 std::string protocol;
404 std::string payload;
405};
406
407// used to communicate extra details about successful connection
408// (client reads)
410{
411 bool defined = false;
412 std::string user;
413 std::string serverHost;
414 std::string serverPort;
415 std::string serverProto;
416 std::string serverIp;
417 std::string vpnIp4;
418 std::string vpnIp6;
419 std::string vpnMtu;
420 std::string gw4;
421 std::string gw6;
422 std::string clientIp;
423 std::string tunName;
424};
425
426// returned by some methods as a status/error indication
427// (client reads)
428struct Status
429{
430 bool error = false; // true if error
431 std::string status; // an optional short error label that identifies the error
432 std::string message; // if error, message given here
433};
434
435// used to pass log lines
436// (client reads)
438{
440 {
441 }
442 LogInfo(std::string str)
443 : text(std::move(str))
444 {
445 }
446 std::string text; // log output (usually but not always one line)
447};
448
449// receives log messages
451{
452 virtual void log(const LogInfo &) = 0;
453 virtual ~LogReceiver() = default;
454};
455
456// used to pass stats for an interface
458{
459 long long bytesIn;
460 long long packetsIn;
461 long long errorsIn;
462 long long bytesOut;
463 long long packetsOut;
464 long long errorsOut;
465};
466
467// used to pass basic transport stats
469{
470 long long bytesIn;
471 long long bytesOut;
472 long long packetsIn;
473 long long packetsOut;
474
475 // number of binary milliseconds (1/1024th of a second) since
476 // last packet was received, or -1 if undefined
478};
479
480// return value of merge_config methods
482{
483 std::string status; // ProfileMerge::Status codes rendered as string
484 std::string errorText; // error string (augments status)
485 std::string basename; // profile basename
486 std::string profileContent; // unified profile
487 std::vector<std::string> refPathList; // list of all reference paths successfully read
488};
489
490// base class for External PKI queries
492{
493 bool error = false; // true if error occurred (client writes)
494 std::string errorText; // text describing error (client writes)
495 bool invalidAlias = false; // true if the error is caused by an invalid alias (client writes)
496 std::string alias; // the alias string, used to query cert/key (client reads)
497};
498
499// used to query for External PKI certificate
501{
502 // leaf cert
503 std::string cert; // (client writes)
504
505 // chain of intermediates and root (optional)
506 std::string supportingChain; // (client writes)
507};
508
509// Used to request an external certificate signature.
510// algorithm will determinate what signature is expected:
511// algorithm, hashalg and saltlen together determine what
512// should be used. hashalg and saltlen can be empty
513// - ECDSA
514// do a ECDSA signature.
515// - ECDSA hashalg=ALG
516// Use hashAlg for the ECDSA signature (e.g. SHA512withECDSA in Java)
517// - RSA_PKCS1_PADDING
518// data will be prefixed by an optional PKCS#1 digest prefix per RFC 3447.
519// - RSA_PKCS1_PSS_PADDING
520// Use PSS padding for the signature
521// - RSA_PKCS1_PSS_PADDING,saltlen=digest,hashalg=ALG
522// Use a PSS padding with hash algorithm ALG and a salt of length
523// of the digest (hash ALG).
525{
526 std::string data; // data rendered as base64 (client reads)
527 std::string sig; // RSA signature, rendered as base64 (client writes)
528 std::string algorithm;
529 std::string hashalg; // If non-empty use this algorith for hashing (e.g. SHA384)
530 std::string saltlen;
531};
532
533// used to override "remote" directives
535{
536 // components of "remote" directive (client writes),
537 std::string host; // either one of host
538 std::string ip; // or ip must be defined (or both)
539 std::string port;
540 std::string proto;
541 std::string error; // if non-empty, indicates an error
542};
543
544namespace Private {
545class ClientState;
546};
547
553{
554 /* To call parse_config */
555 friend class OpenVPNClient;
556
557 public:
559
561
563
564 // Read an OpenVPN profile that might contain external
565 // file references, returning a unified profile.
566 MergeConfig merge_config(const std::string &path, bool follow_references);
567
568 // Read an OpenVPN profile that might contain external
569 // file references, returning a unified profile.
570 MergeConfig merge_config_string(const std::string &config_content);
571
572 // Parse profile and determine needed credentials statically.
574
575 // Maximum size of profile that should be allowed
576 static long max_profile_size();
577
578 // Parse a dynamic challenge cookie, placing the result in dc.
579 // Return true on success or false if parse error.
580 static bool parse_dynamic_challenge(const std::string &cookie, DynamicChallenge &dc);
581
582 // Do a crypto library self test
583 std::string crypto_self_test();
584
585 // Returns platform description string
586 static std::string platform();
587
588 // Returns core copyright
589 static std::string copyright();
590
591 private:
593
594 static void parse_config(const Config &, EvalConfig &, OptionList &);
595
596 /* including initprocess.hpp here break since it pulls in logging
597 * (OPENVPN_LOG) which not setup when including this header, so break that
598 * cycle here with a pointer instead a normal member, std::unique_ptr
599 * and std::unique_ptr because they still need to have the initprocess.hpp
600 * included in the same compilation unit which breaks in the swig wrapped
601 * class, so we use a plain pointer and new/delete in constructor/destructor */
603};
604
605// Top-level OpenVPN client class.
606class OpenVPNClient : public TunBuilderBase, // expose tun builder virtual methods
607 public LogReceiver, // log message notification
608 public ExternalTun::Factory, // low-level tun override
609 public ExternalTransport::Factory, // low-level transport override
610 private ExternalPKIBase
611{
612 public:
614 virtual ~OpenVPNClient();
615
616 // Parse OpenVPN configuration file.
618
619 // Provide credentials and other options. Call before connect().
621
622 // Callback to "protect" a socket from being routed through the tunnel.
623 // Will be called from the thread executing connect().
624 // The remote and ipv6 are the remote host this socket will connect to
625 virtual bool socket_protect(openvpn_io::detail::socket_type socket, std::string remote, bool ipv6);
626
627 // Primary VPN client connect method, doesn't return until disconnect.
628 // Should be called by a worker thread. This method will make callbacks
629 // to event() and log() functions. Make sure to call eval_config()
630 // and possibly provide_creds() as well before this function.
631 Status connect();
632
633 // Return information about the most recent connection. Should be called
634 // after an event of type "CONNECTED".
636
637 // Writes current session token to tok and returns true.
638 // If session token is unavailable, false is returned and
639 // tok is unmodified.
640 bool session_token(SessionToken &tok);
641
642 // Stop the client. Only meaningful when connect() is running.
643 // May be called asynchronously from a different thread
644 // when connect() is running.
645 void stop();
646
647 // Pause the client -- useful to avoid continuous reconnection attempts
648 // when network is down. May be called from a different thread
649 // when connect() is running.
650 void pause(const std::string &reason);
651
652 // Resume the client after it has been paused. May be called from a
653 // different thread when connect() is running.
654 void resume();
655
656 // Do a disconnect/reconnect cycle n seconds from now. May be called
657 // from a different thread when connect() is running.
658 void reconnect(int seconds);
659
660 // When a connection is close to timeout, the core will call this
661 // method. If it returns false, the core will disconnect with a
662 // CONNECTION_TIMEOUT event. If true, the core will enter a PAUSE
663 // state.
664 virtual bool pause_on_connection_timeout() = 0;
665
666 // Get stats/error info. May be called from a different thread
667 // when connect() is running.
668
669 // number of stats
670 static int stats_n();
671
672 // return a stats name, index should be >= 0 and < stats_n()
673 static std::string stats_name(int index);
674
675 // return a stats value, index should be >= 0 and < stats_n()
676 long long stats_value(int index) const;
677
678 // return all stats in a bundle
679 std::vector<long long> stats_bundle() const;
680
681 // return tun stats only
683
684 // return transport stats only
686
687 // post control channel message
688 void post_cc_msg(const std::string &msg);
689
690 // send custom app control channel message
691 void send_app_control_channel_msg(const std::string &protocol, const std::string &msg);
692
703 void start_cert_check(const std::string &client_cert,
704 const std::string &clientkey,
705 const std::optional<const std::string> &ca = std::nullopt);
706
716 void start_cert_check_epki(const std::string &alias, const std::optional<const std::string> &ca);
717
718 // Callback for delivering events during connect() call.
719 // Will be called from the thread executing connect().
720 // Will also deliver custom message from the server like AUTH_PENDING AUTH
721 // events and custom control message events
722 virtual void event(const Event &) = 0;
723
724 // Call for delivering event from app custom control channel
725 virtual void acc_event(const AppCustomControlMessageEvent &) = 0;
726
727 // Callback for logging.
728 // Will be called from the thread executing connect().
729 virtual void log(const LogInfo &) override = 0;
730
731 // External PKI callbacks
732 // Will be called from the thread executing connect().
735
736 // Remote override callback (disabled by default).
737 virtual bool remote_override_enabled();
738 virtual void remote_override(RemoteOverride &);
739
740 // Periodic convenience clock tick, controlled by Config::clockTickMS
741 virtual void clock_tick();
742
743 // Hide protected methods/data from SWIG
744#ifdef SWIGJAVA
745 private:
746#else
747 protected:
748#endif
749
751
752 virtual void connect_attach();
753 virtual void connect_pre_run();
754 virtual void connect_run();
755 virtual void connect_session_stop();
756
757 virtual Stop *get_async_stop();
758
760
761 private:
762 void connect_setup(Status &, bool &);
763 void do_connect_async();
764 static Status status_from_exception(const std::exception &);
765 void parse_extras(const Config &, EvalConfig &);
766 void external_pki_error(const ExternalPKIRequestBase &, const size_t);
768
769 friend class MyClientEvents;
770 void on_disconnect();
771
772 // from ExternalPKIBase
773 bool sign(const std::string &alias,
774 const std::string &data,
775 std::string &sig,
776 const std::string &algorithm,
777 const std::string &hashalg,
778 const std::string &saltlen) override;
779
780 // disable copy and assignment
781 OpenVPNClient(const OpenVPNClient &) = delete;
783};
784
785} // namespace ClientAPI
786} // namespace openvpn
OpenVPNClientHelper(OpenVPNClientHelper &)=delete
EvalConfig eval_config(const Config &config)
Definition ovpncli.cpp:759
MergeConfig merge_config(const std::string &path, bool follow_references)
Definition ovpncli.cpp:720
static void parse_config(const Config &, EvalConfig &, OptionList &)
Definition ovpncli.cpp:606
static bool parse_dynamic_challenge(const std::string &cookie, DynamicChallenge &dc)
Definition ovpncli.cpp:810
MergeConfig merge_config_string(const std::string &config_content)
Definition ovpncli.cpp:732
static MergeConfig build_merge_config(const ProfileMerge &)
Definition ovpncli.cpp:742
void send_app_control_channel_msg(const std::string &protocol, const std::string &msg)
Definition ovpncli.cpp:1320
void external_pki_error(const ExternalPKIRequestBase &, const size_t)
Definition ovpncli.cpp:1103
virtual void external_pki_sign_request(ExternalPKISignRequest &)=0
virtual void log(const LogInfo &) override=0
TransportStats transport_stats() const
Definition ovpncli.cpp:1236
void post_cc_msg(const std::string &msg)
Definition ovpncli.cpp:1310
virtual void event(const Event &)=0
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.
Definition ovpncli.cpp:1367
bool session_token(SessionToken &tok)
Definition ovpncli.cpp:1083
static Status status_from_exception(const std::exception &)
Definition ovpncli.cpp:1033
virtual void remote_override(RemoteOverride &)
Definition ovpncli.cpp:1153
InterfaceStats tun_stats() const
Definition ovpncli.cpp:1203
std::vector< long long > stats_bundle() const
Definition ovpncli.cpp:1182
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.
Definition ovpncli.cpp:1350
void process_epki_cert_chain(const ExternalPKICertRequest &)
Definition ovpncli.cpp:827
Status provide_creds(const ProvideCreds &)
Definition ovpncli.cpp:782
static std::string stats_name(int index)
Definition ovpncli.cpp:1162
virtual bool pause_on_connection_timeout()=0
void connect_setup(Status &, bool &)
Definition ovpncli.cpp:935
long long stats_value(int index) const
Definition ovpncli.cpp:1167
virtual void external_pki_cert_request(ExternalPKICertRequest &)=0
virtual bool socket_protect(openvpn_io::detail::socket_type socket, std::string remote, bool ipv6)
Definition ovpncli.cpp:805
OpenVPNClient & operator=(const OpenVPNClient &)=delete
Private::ClientState * state
Definition ovpncli.hpp:759
void pause(const std::string &reason)
Definition ovpncli.cpp:1280
EvalConfig eval_config(const Config &)
Definition ovpncli.cpp:768
bool sign(const std::string &alias, const std::string &data, std::string &sig, const std::string &algorithm, const std::string &hashalg, const std::string &saltlen) override
Definition ovpncli.cpp:1122
OpenVPNClient(const OpenVPNClient &)=delete
virtual void acc_event(const AppCustomControlMessageEvent &)=0
void parse_extras(const Config &, EvalConfig &)
Definition ovpncli.cpp:667
TunBuilder methods, loosely based on the Android VpnService.Builder abstraction.
Definition base.hpp:42
Support deferred server-side state creation when client connects.
Definition ovpncli.cpp:95
std::vector< KeyValue > peerInfo
Definition ovpncli.hpp:381
std::string allowUnusedAddrFamilies
Definition ovpncli.hpp:368
std::vector< KeyValue > contentList
Definition ovpncli.hpp:354
Struct containing configuration details parsed from an OpenVPN configuration file.
Definition ovpncli.hpp:55
std::vector< ServerEntry > serverList
Definition ovpncli.hpp:102
KeyValue(std::string key_arg, std::string value_arg)
Definition ovpncli.hpp:155
LogInfo(std::string str)
Definition ovpncli.hpp:442
virtual void log(const LogInfo &)=0
virtual ~LogReceiver()=default
std::vector< std::string > refPathList
Definition ovpncli.hpp:487
remote_address ipv6
static const char config[]
#define msg(flags,...)