public final class CustomProxyConfig extends ProxyConfig
Constructor and Description |
---|
CustomProxyConfig(java.lang.String proxyRules)
Constructs a new
CustomProxyConfig instance with given proxyRules . |
CustomProxyConfig(java.lang.String proxyRules,
java.lang.String exceptions)
Constructs a new
CustomProxyConfig instance with given proxyRules and
exceptions . |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExceptions() |
java.lang.String |
getProxyRules() |
public CustomProxyConfig(java.lang.String proxyRules)
CustomProxyConfig
instance with given proxyRules
.
Examples of the proxyRules
string:
"http=foopy:80;ftp=foopy2"use HTTP proxy "foopy:80" for http:// URLs, and HTTP proxy "foopy2:80" for ftp:// URLs.
"foopy:80"use HTTP proxy "foopy:80" for all URLs.
"socks4://foopy"use SOCKS v4 proxy "foopy:1080" for all URLs.
proxyRules
- string that represents proxy rules in specified format. The string should
be a semicolon-separated list of ordered proxies that apply to a particular URL scheme.java.lang.IllegalArgumentException
- when proxyRules
is null
.public CustomProxyConfig(java.lang.String proxyRules, java.lang.String exceptions)
CustomProxyConfig
instance with given proxyRules
and
exceptions
.
The format of the exceptions
string can be any of the following:
[ URL_SCHEME "://" ] HOSTNAME_PATTERN [ ":" <port> ]
Examples:
"foobar.com", "*foobar.com", "*.foobar.com", "*foobar.com:99", "https://x.*.y.com:99"
"." HOSTNAME_SUFFIX_PATTERN [ ":" PORT ]
Examples:
".google.com", ".com", "http://.google.com"
[ SCHEME "://" ] IP_LITERAL [ ":" PORT ]
Examples:
"127.0.1", "[0:0::1]", "[::1]", "http://[::1]:99"
IP_LITERAL "/" PREFIX_LENGHT_IN_BITS
Examples:
"192.168.1.1/16", "fefe:13::abc/33"
"<local>"
Match local addresses. The meaning of "<local>" is whether the host matches
one of: "127.0.0.1", "::1", "localhost".
"*foobar.com,.google.com,<local>"
.proxyRules
- string that represents proxy rules in specified format. The string should
be a semicolon-separated list of ordered proxies that apply to a particular URL scheme.exceptions
- string that represents the set of URLs that should bypass the proxy
settings.java.lang.IllegalArgumentException
- when proxyRules
is null
.