com.mindbright.net
public class SocksProxySocket extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getServerDesc() |
static NetworkConnection |
getSocks4Proxy(java.lang.String targetHost,
int targetPort,
java.lang.String proxyHost,
int proxyPort,
long proxyTimeout,
java.lang.String userId)
Connect through a proxy speaking the socks4 protocol
Note that the connection is done synchronously so this call
will block until the connection is established.
|
static NetworkConnection |
getSocks4Proxy(java.lang.String targetHost,
int targetPort,
java.lang.String proxyHost,
int proxyPort,
java.lang.String userId)
Connect through a proxy speaking the socks4 protocol
Note that the connection is done synchronously so this call
will block until the connection is established.
|
static NetworkConnection |
getSocks5Proxy(java.lang.String targetHost,
int targetPort,
java.lang.String proxyHost,
int proxyPort,
boolean localLookup,
ProxyAuthenticator auth)
Connect through a proxy speaking the socks5 protocol
Note that the connection is done synchronously so this call
will block until the connection is established.
|
static NetworkConnection |
getSocks5Proxy(java.lang.String targetHost,
int targetPort,
java.lang.String proxyHost,
int proxyPort,
long proxyTimeout,
boolean localLookup,
ProxyAuthenticator auth)
Connect through a proxy speaking the socks5 protocol
Note that the connection is done synchronously so this call
will block until the connection is established.
|
static NetworkConnection |
getSocks5Proxy(java.lang.String targetHost,
int targetPort,
java.lang.String proxyHost,
int proxyPort,
long proxyTimeout,
ProxyAuthenticator auth)
Connect through a proxy speaking the socks5 protocol
Note that the connection is done synchronously so this call
will block until the connection is established.
|
static NetworkConnection |
getSocks5Proxy(java.lang.String targetHost,
int targetPort,
java.lang.String proxyHost,
int proxyPort,
ProxyAuthenticator auth)
Connect through a proxy speaking the socks5 protocol
Note that the connection is done synchronously so this call
will block until the connection is established.
|
java.lang.String |
toString() |
public java.lang.String getServerDesc()
public static NetworkConnection getSocks4Proxy(java.lang.String targetHost, int targetPort, java.lang.String proxyHost, int proxyPort, java.lang.String userId) throws java.io.IOException, java.net.UnknownHostException
targetHost
- Host we want to connect totargetPort
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serveruserId
- User to connect asjava.io.IOException
java.net.UnknownHostException
public static NetworkConnection getSocks4Proxy(java.lang.String targetHost, int targetPort, java.lang.String proxyHost, int proxyPort, long proxyTimeout, java.lang.String userId) throws java.io.IOException, java.net.UnknownHostException
targetHost
- Host we want to connect totargetPort
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serverproxyTimeout
- How many milliseconds to wait before givinguserId
- User to connect asjava.io.IOException
java.net.UnknownHostException
public static NetworkConnection getSocks5Proxy(java.lang.String targetHost, int targetPort, java.lang.String proxyHost, int proxyPort, ProxyAuthenticator auth) throws java.io.IOException, java.net.UnknownHostException
targetHost
- Host we want to connect totargetPort
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serverauth
- Used to athenticate (if needed)java.io.IOException
java.net.UnknownHostException
public static NetworkConnection getSocks5Proxy(java.lang.String targetHost, int targetPort, java.lang.String proxyHost, int proxyPort, boolean localLookup, ProxyAuthenticator auth) throws java.io.IOException, java.net.UnknownHostException
targetHost
- Host we want to connect totargetPort
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serverlocalLookup
- If true then the targetHost is resolved
locally. If false then the socks server
will resolve.auth
- Used to athenticate (if needed)java.io.IOException
java.net.UnknownHostException
public static NetworkConnection getSocks5Proxy(java.lang.String targetHost, int targetPort, java.lang.String proxyHost, int proxyPort, long proxyTimeout, ProxyAuthenticator auth) throws java.io.IOException, java.net.UnknownHostException
targetHost
- Host we want to connect totargetPort
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serverproxyTimeout
- How many milliseconds to wait before givingauth
- Used to athenticate (if needed)java.io.IOException
java.net.UnknownHostException
public static NetworkConnection getSocks5Proxy(java.lang.String targetHost, int targetPort, java.lang.String proxyHost, int proxyPort, long proxyTimeout, boolean localLookup, ProxyAuthenticator auth) throws java.io.IOException, java.net.UnknownHostException
targetHost
- Host we want to connect totargetPort
- Port on host we want to connect toproxyHost
- Address or proxy serverproxyPort
- Port on proxy serverproxyTimeout
- How many milliseconds to wait before givinglocalLookup
- If true then the targetHost is resolved
locally. If false then the socks server
will resolve.auth
- Used to athenticate (if needed)java.io.IOException
java.net.UnknownHostException
public java.lang.String toString()
toString
in class java.lang.Object