public class ProxyUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PROXY_PORT |
| Constructor and Description |
|---|
ProxyUtil() |
| Modifier and Type | Method and Description |
|---|---|
static PacProxySelector |
buildPacSelectorForUrl(String url)
Build a PAC proxy selector for the given URL.
|
static ProtocolDispatchSelector |
buildProtocolDispatchSelector(Properties properties) |
static String |
cleanIPv6(String hostOrIP)
This method can be used to cleanup an IPv6 address.
|
static List<Proxy> |
noProxyList()
Gets an unmodifiable proxy list that will have as it's only entry an
DIRECT proxy.
|
static Properties |
parseProxyList(String proxyString)
Parses the proxy list and splits it by protocol.
|
static FixedProxySelector |
parseProxySettings(String proxyVar)
Parse host and port out of a proxy variable.
|
static ProxySelector |
setByPassListOnSelector(String bypassList,
ProtocolDispatchSelector ps)
Installs the proxy exclude list on the given selector.
|
public static final int DEFAULT_PROXY_PORT
public static FixedProxySelector parseProxySettings(String proxyVar)
proxyVar - the proxy string. example: http://192.168.10.9:8080/public static List<Proxy> noProxyList()
public static PacProxySelector buildPacSelectorForUrl(String url)
url - to fetch the PAC script from.public static String cleanIPv6(String hostOrIP)
hostOrIP - to cleanuppublic static ProxySelector setByPassListOnSelector(String bypassList, ProtocolDispatchSelector ps)
bypassList - the list of urls / hostnames to ignore.ps - the proxy selector to wrap.public static Properties parseProxyList(String proxyString)
proxyString - the proxy list stringpublic static ProtocolDispatchSelector buildProtocolDispatchSelector(Properties properties)
Copyright © 2021. All rights reserved.