5#ifndef MOLYBDEN_PROXY_CONFIG_HPP
6#define MOLYBDEN_PROXY_CONFIG_HPP
17enum ProxyConfigType { kAutoDetect, kDirect, kSystem, kPac, kCustom };
40 std::shared_ptr<S>
as();
48 virtual ProxyConfigType
type()
const = 0;
60 static std::shared_ptr<AutoDetectProxyConfig>
create();
71 static std::shared_ptr<DirectProxyConfig>
create();
83 static std::shared_ptr<SystemProxyConfig>
create();
99 static std::shared_ptr<PacProxyConfig>
create(std::string pac_url);
124 static std::shared_ptr<CustomProxyConfig>
create(std::string
rules);
157 static std::shared_ptr<CustomProxyConfig>
create(std::string
rules,
With this proxy configuration the connection automatically detects proxy settings.
Definition proxy_config.hpp:55
static std::shared_ptr< AutoDetectProxyConfig > create()
Creates an auto-detect proxy configuration.
A custom proxy settings.
Definition proxy_config.hpp:110
static std::shared_ptr< CustomProxyConfig > create(std::string rules)
Creates a custom proxy configuration based on the given rules.
virtual std::string exceptions()=0
Returns the proxy exceptions or an empty string if there are no exceptions.
static std::shared_ptr< CustomProxyConfig > create(std::string rules, std::string exceptions)
Creates a custom proxy configuration based on the given rules and exceptions.
virtual std::string rules()=0
The proxy rules.
With this proxy configuration the connection does not use a proxy server.
Definition proxy_config.hpp:66
static std::shared_ptr< DirectProxyConfig > create()
Creates a direct proxy configuration.
With this proxy configuration the connection uses proxy settings received from proxy auto-config (PAC...
Definition proxy_config.hpp:91
virtual std::string pacUrl()=0
Returns the URL address of the PAC file.
static std::shared_ptr< PacProxyConfig > create(std::string pac_url)
Creates a proxy configuration based on the PAC file located at the given PAC URL.
An interface that all proxy config implementations must extend.
Definition proxy_config.hpp:22
virtual ProxyConfigType type() const =0
Returns the current proxy config type.
std::shared_ptr< S > as()
Casts this proxy configuration to the target type.
With this proxy configuration the connection uses the operating system proxy settings.
Definition proxy_config.hpp:78
static std::shared_ptr< SystemProxyConfig > create()
Creates a system proxy configuration.