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