com.mindbright.net
public class WebProxyTunnelSocket extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static NetworkConnection |
getProxy(java.lang.String host,
int port,
java.lang.String proxyHost,
int proxyPort,
long proxyTimeout,
ProxyAuthenticator authenticator,
java.lang.String userAgent)
Connect through an HTTP proxy.
|
static NetworkConnection |
getProxy(java.lang.String host,
int port,
java.lang.String proxyHost,
int proxyPort,
long proxyTimeout,
java.lang.String protoStr,
ProxyAuthenticator authenticator,
java.lang.String userAgent)
Connect through an HTTP proxy.
|
static NetworkConnection |
getProxy(java.lang.String host,
int port,
java.lang.String proxyHost,
int proxyPort,
ProxyAuthenticator authenticator,
java.lang.String userAgent)
Connect through an HTTP proxy.
|
static NetworkConnection |
getProxy(java.lang.String host,
int port,
java.lang.String proxyHost,
int proxyPort,
java.lang.String protoStr,
ProxyAuthenticator authenticator,
java.lang.String userAgent)
Connect through an HTTP proxy.
|
java.lang.String |
toString() |
public static NetworkConnection getProxy(java.lang.String host, int port, java.lang.String proxyHost, int proxyPort, ProxyAuthenticator authenticator, java.lang.String userAgent) throws java.io.IOException, java.net.UnknownHostException
NetworkConnection
which is connected through the
specified proxy. The connection may be authenticated.
Note that the connection is done synchronously so this call
will block until the connection is established.host
- Host we want to connect toport
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serverauthenticator
- Used to authenticate (if needed)userAgent
- Which user agent we should present
ourselves as to the proxyjava.io.IOException
java.net.UnknownHostException
public static NetworkConnection getProxy(java.lang.String host, int port, java.lang.String proxyHost, int proxyPort, long proxyTimeout, ProxyAuthenticator authenticator, java.lang.String userAgent) throws java.io.IOException, java.net.UnknownHostException
NetworkConnection
which is connected through the
specified proxy. The connection may be authenticated.
Note that the connection is done synchronously so this call
will block until the connection is established.host
- Host we want to connect toport
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serverproxyTimeout
- How many milliseconds to wait before giving
up when connecting.authenticator
- Used to authenticate (if needed)userAgent
- Which user agent we should present
ourselves as to the proxyjava.io.IOException
java.net.UnknownHostException
public static NetworkConnection getProxy(java.lang.String host, int port, java.lang.String proxyHost, int proxyPort, java.lang.String protoStr, ProxyAuthenticator authenticator, java.lang.String userAgent) throws java.io.IOException, java.net.UnknownHostException
NetworkConnection
which is connected through the
specified proxy. The connection may be authenticated.
Note that the connection is done synchronously so this call
will block until the connection is established.host
- Host we want to connect toport
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serverprotoStr
- Extra string to preprend to host when
issuing the CONNECT callauthenticator
- Used to authenticate (if needed)userAgent
- Which user agent we should present
ourselves as to the proxyjava.io.IOException
java.net.UnknownHostException
public static NetworkConnection getProxy(java.lang.String host, int port, java.lang.String proxyHost, int proxyPort, long proxyTimeout, java.lang.String protoStr, ProxyAuthenticator authenticator, java.lang.String userAgent) throws java.io.IOException, java.net.UnknownHostException
NetworkConnection
which is connected through the
specified proxy. The connection may be authenticated.
Note that the connection is done synchronously so this call
will block until the connection is established.host
- Host we want to connect toport
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serverproxyTimeout
- How many milliseconds to wait before giving
up when connecting.protoStr
- Extra string to preprend to host when
issuing the CONNECT callauthenticator
- Used to authenticate (if needed)userAgent
- Which user agent we should present
ourselves as to the proxyjava.io.IOException
java.net.UnknownHostException
public java.lang.String toString()
toString
in class java.lang.Object