C++ Client-Side SDK
LaunchDarkly SDK
Public Member Functions | List of all members
launchdarkly::config::shared::built::ProxyOptions Class Referencefinal

#include <http_properties.hpp>

Public Member Functions

 ProxyOptions (std::optional< std::string > url)
 
 ProxyOptions ()
 
std::optional< std::string > const & Url () const
 

Detailed Description

Proxy configuration for HTTP requests.

When using CURL networking (LD_CURL_NETWORKING=ON), this controls proxy behavior:

The empty string is forwarded to the networking implementation (CURL) which interprets it as "do not use any proxy, even if environment variables are set."

When CURL networking is disabled, attempting to configure a proxy will throw an error.

Constructor & Destructor Documentation

◆ ProxyOptions() [1/2]

launchdarkly::config::shared::built::ProxyOptions::ProxyOptions ( std::optional< std::string >  url)
explicit

Construct proxy options with a proxy URL.

Parameters
urlProxy URL or configuration:
  • std::nullopt: Use environment variables (default)
  • "socks5://user:pass@proxy.example.com:1080": SOCKS5 proxy with auth
  • "socks5h://proxy:1080": SOCKS5 proxy with DNS resolution through proxy
  • "http://proxy.example.com:8080": HTTP proxy
  • "": Empty string explicitly disables proxy (overrides environment variables)
Exceptions
std::runtime_errorif proxy URL is non-empty and CURL networking is not enabled

◆ ProxyOptions() [2/2]

launchdarkly::config::shared::built::ProxyOptions::ProxyOptions ( )

Default constructor. Uses environment variables for proxy configuration.

Member Function Documentation

◆ Url()

std::optional< std::string > const & launchdarkly::config::shared::built::ProxyOptions::Url ( ) const

Get the configured proxy URL.

Returns
Proxy URL if configured, or std::nullopt to use environment variables.

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