socks
Class Socks4Proxy

java.lang.Object
  extended by socks.Proxy
      extended by socks.Socks4Proxy
All Implemented Interfaces:
Cloneable

public class Socks4Proxy
extends Proxy
implements Cloneable

Proxy which describes SOCKS4 proxy.


Field Summary
 
Fields inherited from class socks.Proxy
chainProxy, defaultProxy, directHosts, in, out, proxyHost, proxyIP, proxyPort, proxySocket, SOCKS_ADDR_NOT_SUPPORTED, SOCKS_AUTH_FAILURE, SOCKS_AUTH_NOT_SUPPORTED, SOCKS_BADCONNECT, SOCKS_BADNETWORK, SOCKS_CMD_NOT_SUPPORTED, SOCKS_CONNECTION_REFUSED, SOCKS_DIRECT_FAILED, SOCKS_FAILURE, SOCKS_HOST_UNREACHABLE, SOCKS_JUST_ERROR, SOCKS_METHOD_NOTSUPPORTED, SOCKS_NO_PROXY, SOCKS_PROXY_IO_ERROR, SOCKS_PROXY_NO_CONNECT, SOCKS_SUCCESS, SOCKS_TTL_EXPIRE, version
 
Constructor Summary
Socks4Proxy(InetAddress proxyIP, int proxyPort, String user)
          Creates the SOCKS4 proxy
Socks4Proxy(Proxy p, InetAddress proxyIP, int proxyPort, String user)
          Creates the SOCKS4 proxy
Socks4Proxy(Proxy p, String proxyHost, int proxyPort, String user)
          Creates the SOCKS4 proxy
Socks4Proxy(String proxyHost, int proxyPort, String user)
          Creates the SOCKS4 proxy
 
Method Summary
 Object clone()
          Creates a clone of this proxy.
protected  Proxy copy()
           
protected  ProxyMessage formMessage(InputStream in)
           
protected  ProxyMessage formMessage(int cmd, InetAddress ip, int port)
           
protected  ProxyMessage formMessage(int cmd, String host, int port)
           
 
Methods inherited from class socks.Proxy
accept, addDirect, addDirect, addDirect, bind, bind, connect, connect, endSession, exchange, getChainProxy, getDefaultProxy, getDirect, getInetAddress, getPort, isDirect, isDirect, parseProxy, readMsg, sendMsg, setChainProxy, setDefaultProxy, setDefaultProxy, setDefaultProxy, setDefaultProxy, setDefaultProxy, setDirect, startSession, toString, udpAssociate, udpAssociate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Socks4Proxy

public Socks4Proxy(Proxy p,
                   String proxyHost,
                   int proxyPort,
                   String user)
            throws UnknownHostException
Creates the SOCKS4 proxy

Parameters:
p - Proxy to use to connect to this proxy, allows proxy chaining.
proxyHost - Address of the proxy server.
proxyPort - Port of the proxy server
user - User name to use for identification purposes.
Throws:
UnknownHostException - If proxyHost can't be resolved.

Socks4Proxy

public Socks4Proxy(String proxyHost,
                   int proxyPort,
                   String user)
            throws UnknownHostException
Creates the SOCKS4 proxy

Parameters:
proxyHost - Address of the proxy server.
proxyPort - Port of the proxy server
user - User name to use for identification purposes.
Throws:
UnknownHostException - If proxyHost can't be resolved.

Socks4Proxy

public Socks4Proxy(Proxy p,
                   InetAddress proxyIP,
                   int proxyPort,
                   String user)
Creates the SOCKS4 proxy

Parameters:
p - Proxy to use to connect to this proxy, allows proxy chaining.
proxyIP - Address of the proxy server.
proxyPort - Port of the proxy server
user - User name to use for identification purposes.

Socks4Proxy

public Socks4Proxy(InetAddress proxyIP,
                   int proxyPort,
                   String user)
Creates the SOCKS4 proxy

Parameters:
proxyIP - Address of the proxy server.
proxyPort - Port of the proxy server
user - User name to use for identification purposes.
Method Detail

clone

public Object clone()
Creates a clone of this proxy. Changes made to the clone should not affect this object.

Overrides:
clone in class Object

copy

protected Proxy copy()
Specified by:
copy in class Proxy

formMessage

protected ProxyMessage formMessage(int cmd,
                                   InetAddress ip,
                                   int port)
Specified by:
formMessage in class Proxy

formMessage

protected ProxyMessage formMessage(int cmd,
                                   String host,
                                   int port)
                            throws UnknownHostException
Specified by:
formMessage in class Proxy
Throws:
UnknownHostException

formMessage

protected ProxyMessage formMessage(InputStream in)
                            throws SocksException,
                                   IOException
Specified by:
formMessage in class Proxy
Throws:
SocksException
IOException


Copyright © 2012. All Rights Reserved.