Class ProxyBypassListSelector
- java.lang.Object
-
- java.net.ProxySelector
-
- com.github.markusbernhardt.proxy.selector.whitelist.ProxyBypassListSelector
-
public class ProxyBypassListSelector extends ProxySelector
Special purpose ProxySelector used as Facade on top of a normal ProxySelector. A wrapper that will first check the URI against a white list and if it matches it will return DIRECT else it will pass the URI to an delegate for inspection.- Author:
- Markus Bernhardt, Copyright 2016, Bernd Rosstauscher, Copyright 2009
-
-
Constructor Summary
Constructors Constructor Description ProxyBypassListSelector(String whiteList, ProxySelector proxySelector)ConstructorProxyBypassListSelector(List<UriFilter> whiteListFilter, ProxySelector proxySelector)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconnectFailed(URI uri, SocketAddress sa, IOException ioe)connectFailedList<Proxy>select(URI uri)selectStringtoString()-
Methods inherited from class java.net.ProxySelector
getDefault, of, setDefault
-
-
-
-
Constructor Detail
-
ProxyBypassListSelector
public ProxyBypassListSelector(List<UriFilter> whiteListFilter, ProxySelector proxySelector)
Constructor- Parameters:
whiteListFilter- a list of filters for whitelist URLs.proxySelector- the proxy selector to use.
-
ProxyBypassListSelector
public ProxyBypassListSelector(String whiteList, ProxySelector proxySelector)
Constructor- Parameters:
whiteList- a list of filters for whitelist URLs as comma/space separated string.proxySelector- the proxy selector to use.
-
-
Method Detail
-
connectFailed
public void connectFailed(URI uri, SocketAddress sa, IOException ioe)
connectFailed- Specified by:
connectFailedin classProxySelector- See Also:
ProxySelector.connectFailed(java.net.URI, java.net.SocketAddress, java.io.IOException)
-
select
public List<Proxy> select(URI uri)
select- Specified by:
selectin classProxySelector- See Also:
ProxySelector.select(java.net.URI)
-
-