Molybden API
|
A custom proxy settings. More...
#include <proxy_config.hpp>
Public Member Functions | |
virtual std::string | rules ()=0 |
The proxy rules. | |
virtual std::string | exceptions ()=0 |
Returns the proxy exceptions or an empty string if there are no exceptions. | |
Public Member Functions inherited from molybden::ProxyConfig | |
template<class S > | |
std::shared_ptr< S > | as () |
Casts this proxy configuration to the target type. | |
Static Public Member Functions | |
static std::shared_ptr< CustomProxyConfig > | create (std::string rules) |
Creates a custom proxy configuration based on the given rules. | |
static std::shared_ptr< CustomProxyConfig > | create (std::string rules, std::string exceptions) |
Creates a custom proxy configuration based on the given rules and exceptions. | |
Additional Inherited Members | |
Protected Member Functions inherited from molybden::ProxyConfig | |
virtual ProxyConfigType | type () const =0 |
Returns the current proxy config type. | |
A custom proxy settings.
|
static |
Creates a custom proxy configuration based on the given rules.
The examples of the proxy rules:
rules | the proxy rules in the required format. |
|
static |
Creates a custom proxy configuration based on the given rules and exceptions.
The examples of the proxy rules:
The format of the exceptions can be any of the following:
[ URL_SCHEME "://" ] HOSTNAME_PATTERN [ ":" <port> ]
, e.g. "foobar.com", "*foobar.com", "*.foobar.com", "*foobar.com:99", "https://x.*.y.com:99"."." HOSTNAME_SUFFIX_PATTERN [ ":" PORT ]
, e.g. ".google.com", ".com", "http://.google.com".[ SCHEME "://" ] IP_LITERAL [ ":" PORT ]
, e.g. "127.0.1", "[0:0::1]", "[::1]", "http://[::1]:99".IP_LITERAL "/" PREFIX_LENGHT_IN_BITS
, e.g. "192.168.1.1/16", "fefe:13::abc/33".If you need to provide several exception rules you can separate them using comma: "*foobar.com,.google.com,<local>".
rules | the proxy rules in the required format. |
exceptions | the proxy exceptions in the required format. |