public class Proxy extends Object
httpProxy
manually and then turn
on proxy autodetect.Modifier and Type | Class and Description |
---|---|
static class |
Proxy.ProxyType |
Modifier and Type | Method and Description |
---|---|
static Proxy |
extractFrom(Capabilities capabilities) |
String |
getFtpProxy()
Gets the FTP proxy.
|
String |
getHttpProxy()
Gets the HTTP proxy.
|
String |
getNoProxy()
Gets proxy bypass (noproxy) addresses.
|
String |
getProxyAutoconfigUrl()
Gets the proxy auto-configuration URL.
|
Proxy.ProxyType |
getProxyType()
Gets the
Proxy.ProxyType . |
String |
getSocksPassword()
Gets the SOCKS proxy's password.
|
String |
getSocksProxy()
Gets the SOCKS proxy.
|
String |
getSocksUsername()
Gets the SOCKS proxy's username.
|
String |
getSslProxy()
Gets the SSL tunnel proxy.
|
boolean |
isAutodetect()
Whether to autodetect proxy settings.
|
Proxy |
setAutodetect(boolean autodetect)
Specifies whether to autodetect proxy settings.
|
Proxy |
setFtpProxy(String ftpProxy)
Specify which proxy to use for FTP connections.
|
Proxy |
setHttpProxy(String httpProxy)
Specify which proxy to use for HTTP connections.
|
Proxy |
setNoProxy(String noProxy)
Sets proxy bypass (noproxy) addresses
|
Proxy |
setProxyAutoconfigUrl(String proxyAutoconfigUrl)
Specifies the URL to be used for proxy auto-configuration.
|
Proxy |
setProxyType(Proxy.ProxyType proxyType)
Explicitly sets the proxy type, useful for forcing direct connection on Linux.
|
Proxy |
setSocksPassword(String password)
Specifies a password for the SOCKS proxy.
|
Proxy |
setSocksProxy(String socksProxy)
Specifies which proxy to use for SOCKS.
|
Proxy |
setSocksUsername(String username)
Specifies a username for the SOCKS proxy.
|
Proxy |
setSslProxy(String sslProxy)
Specify which proxy to use for SSL connections.
|
public static Proxy extractFrom(Capabilities capabilities)
public String getFtpProxy()
public String getHttpProxy()
public String getNoProxy()
public String getProxyAutoconfigUrl()
public Proxy.ProxyType getProxyType()
Proxy.ProxyType
. This can signal if set to use a direct connection (without proxy),
manually set proxy settings, auto-configured proxy settings, or whether to use the default
system proxy settings. It defaults to Proxy.ProxyType.UNSPECIFIED
.public String getSocksPassword()
public String getSocksProxy()
public String getSocksUsername()
public String getSslProxy()
public boolean isAutodetect()
public Proxy setAutodetect(boolean autodetect)
autodetect
- set to true to use proxy auto detection, false to leave proxy settings
unspecifiedpublic Proxy setFtpProxy(String ftpProxy)
ftpProxy
- the proxy host, expected format is hostname.com:1234
public Proxy setHttpProxy(String httpProxy)
httpProxy
- the proxy host, expected format is hostname:1234
public Proxy setNoProxy(String noProxy)
noProxy
- The proxy bypass (noproxy) addressespublic Proxy setProxyAutoconfigUrl(String proxyAutoconfigUrl)
http://hostname.com:1234/pacfile
. This is required if getProxyType()
is
set to Proxy.ProxyType.PAC
, ignored otherwise.proxyAutoconfigUrl
- the URL for proxy auto-configurationpublic Proxy setProxyType(Proxy.ProxyType proxyType)
proxyType
- type of proxy being usedpublic Proxy setSocksPassword(String password)
password
- password for the SOCKS proxypublic Proxy setSocksProxy(String socksProxy)
socksProxy
- the proxy host, expected format is hostname.com:1234
public Proxy setSocksUsername(String username)
username
- username for the SOCKS proxyCopyright © 2014-2017 Machine Publishers, LLC and the jBrowserDriver contributors.
Project homepage: https://github.com/machinepublishers/jbrowserdriver