|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindbright.net.SocksProxySocket
public class SocksProxySocket
Socket that connects through a socks proxy. Note that the proxy setup is done in blocking mdoe so this will block until the socket is connected, or it gives up. This supports both Socks4 and Socks5
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
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 as
java.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 as
java.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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |