java.lang.Object | +--java.net.SocksSocketImplFactory
This factory creates an SocketImpl that implements the SOCKS protocol (both V5 & V4). It implements RFC 1928.
java.net.Socket#setSocketImplFactory(SocketImplFactory),
java.net.ServerSocket#setSocketImplFactory(SocketImplFactory)(package private)
SocksSocketImplFactory(String server,
int port)
(package private)
SocksSocketImplFactory(String server,
int port,
boolean v4)
private String server
private int port
private boolean useV4
public static final int PROTO_VERS4
public static final int PROTO_VERS
public static final int DEFAULT_PORT
public static final int NO_AUTH
public static final int GSSAPI
public static final int USER_PASSW
public static final int NO_METHODS
public static final int CONNECT
public static final int BIND
public static final int UDP_ASSOC
public static final int IPV4
public static final int DOMAIN_NAME
public static final int IPV6
public static final int REQUEST_OK
public static final int GENERAL_FAILURE
public static final int NOT_ALLOWED
public static final int NET_UNREACHABLE
public static final int HOST_UNREACHABLE
public static final int CONN_REFUSED
public static final int TTL_EXPIRED
public static final int CMD_NOT_SUPPORTED
public static final int ADDR_TYPE_NOT_SUP
SocksSocketImplFactory(String server, int port)
server - the server hostnameport - the port number. -1 for the default SOCKS port.SocksSocketImplFactory(String server, int port, boolean v4)
server - the server hostnameport - the port number. -1 for the default SOCKS port.v4 - true if the protocol should be version 4
false for version 5.private void guessVersion()
public SocketImpl createSocketImpl()
SocketImpl instance.
createSocketImpl in interface SocketImplFactorySocketImpl.java.net.SocketImpl