public interface SocksCommandSender
SocksCommandSender
can send SOCKS command to SOCKS server.SocksCommand
,
SOCKS Protocol Version 5Modifier and Type | Field and Description |
---|---|
static byte |
ATYPE_DOMAINNAME |
static byte |
ATYPE_IPV4 |
static byte |
ATYPE_IPV6 |
static int |
REP_ADDRESS_TYPE_NOT_SUPPORTED |
static int |
REP_COMMAND_NOT_SUPPORTED |
static int |
REP_CONNECTION_NOT_ALLOWED_BY_RULESET |
static int |
REP_CONNECTION_REFUSED |
static int |
REP_GENERAL_SOCKS_SERVER_FAILURE |
static int |
REP_HOST_UNREACHABLE |
static int |
REP_NETWORK_UNREACHABLE |
static int |
REP_SUCCEEDED |
static int |
REP_TTL_EXPIRED |
static int |
RESERVED |
Modifier and Type | Method and Description |
---|---|
CommandReplyMesasge |
checkServerReply(InputStream inputStream) |
CommandReplyMesasge |
send(Socket socket,
SocksCommand command,
InetAddress address,
int port,
int version)
Send a command to SOCKS server.
|
CommandReplyMesasge |
send(Socket socket,
SocksCommand command,
SocketAddress address,
int version)
Send a command to SOCKS server.
|
CommandReplyMesasge |
send(Socket socket,
SocksCommand command,
String host,
int port,
int version)
Send a command to SOCKS server and resolve domain name in SOCKS server.
|
static final int RESERVED
static final byte ATYPE_IPV4
static final byte ATYPE_DOMAINNAME
static final byte ATYPE_IPV6
static final int REP_SUCCEEDED
static final int REP_GENERAL_SOCKS_SERVER_FAILURE
static final int REP_CONNECTION_NOT_ALLOWED_BY_RULESET
static final int REP_NETWORK_UNREACHABLE
static final int REP_HOST_UNREACHABLE
static final int REP_CONNECTION_REFUSED
static final int REP_TTL_EXPIRED
static final int REP_COMMAND_NOT_SUPPORTED
static final int REP_ADDRESS_TYPE_NOT_SUPPORTED
CommandReplyMesasge send(Socket socket, SocksCommand command, InetAddress address, int port, int version) throws SocksException, IOException
socket
- Socket that has connected SOCKS server.command
- The Command such as CONNECT, BIND, UDP ASSOCIATE.address
- Remote server IPv4 or IPv6 address.port
- Remote server port.version
- The version of SOCKS protocol.SocksException
- If any error about SOCKS protocol occurs.IOException
- If any I/O error occurs.CommandReplyMesasge send(Socket socket, SocksCommand command, SocketAddress address, int version) throws SocksException, IOException
socket
- Socket that has connected SOCKS server.command
- The Command such as CONNECT, BIND, UDP ASSOCIATE.address
- Remote server address.version
- The version of SOCKS protocol.SocksException
- If any error about SOCKS protocol occurs.IOException
- If any I/O error occurs.CommandReplyMesasge send(Socket socket, SocksCommand command, String host, int port, int version) throws SocksException, IOException
socket
- Socket that has connected SOCKS server.command
- The Command such as CONNECT, BIND, UDP ASSOCIATE.host
- Remote server host. The host will be resolved in SOCKS server.port
- Remote server port.version
- The version of SOCKS protocol.SocksException
- If any error about SOCKS protocol occurs.IOException
- If any I/O error occurs.CommandReplyMesasge checkServerReply(InputStream inputStream) throws SocksException, IOException
SocksException
IOException
Copyright © 2015. All rights reserved.