OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::TunBuilderCapture::ProxyBypass Class Reference

Class for managing proxy bypass host configurations. More...

#include <capture.hpp>

Public Member Functions

std::string to_string () const
 Converts the bypass host to a string representation.
 
bool defined () const
 Checks if a bypass host is defined.
 
void validate (const std::string &title) const
 Validates the bypass host value.
 
Json::Value to_json () const
 Serializes the object to JSON.
 
void from_json (const Json::Value &root, const std::string &title)
 Deserializes the object from JSON.
 

Public Attributes

std::string bypass_host
 

Detailed Description

Class for managing proxy bypass host configurations.

The ProxyBypass class provides functionality to store, validate, and serialize/deserialize information about a host that should bypass proxy settings.

Definition at line 331 of file capture.hpp.

Member Function Documentation

◆ defined()

bool openvpn::TunBuilderCapture::ProxyBypass::defined ( ) const
inline

Checks if a bypass host is defined.

Returns true if a bypass host is specified (non-empty string), false otherwise.

Returns
true if bypass host is defined, false otherwise.

Definition at line 351 of file capture.hpp.

Here is the caller graph for this function:

◆ from_json()

void openvpn::TunBuilderCapture::ProxyBypass::from_json ( const Json::Value &  root,
const std::string &  title 
)
inline

Deserializes the object from JSON.

Extracts bypass_host value from the provided JSON object.

Parameters
rootThe JSON value to parse.
titleA descriptive title used in error messages if parsing fails.

Definition at line 388 of file capture.hpp.

◆ to_json()

Json::Value openvpn::TunBuilderCapture::ProxyBypass::to_json ( ) const
inline

Serializes the object to JSON.

Creates a JSON object with the bypass_host value.

Returns
JSON value representing the ProxyBypass object.

Definition at line 375 of file capture.hpp.

◆ to_string()

std::string openvpn::TunBuilderCapture::ProxyBypass::to_string ( ) const
inline

Converts the bypass host to a string representation.

Returns
The bypass host string.

Definition at line 340 of file capture.hpp.

Here is the caller graph for this function:

◆ validate()

void openvpn::TunBuilderCapture::ProxyBypass::validate ( const std::string &  title) const
inline

Validates the bypass host value.

Validates the bypass host if defined using the HostPort validator. This ensures the host is properly formatted.

Warning
If bypass host is not defined, the method will return without processing and without raising any errors. This silent behavior may cause unexpected results.
Parameters
titleA descriptive title used in error messages if validation fails.

Definition at line 363 of file capture.hpp.

Member Data Documentation

◆ bypass_host

std::string openvpn::TunBuilderCapture::ProxyBypass::bypass_host

Definition at line 334 of file capture.hpp.


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