Class SocksProxyRequest
java.lang.Object
org.apache.mina.proxy.handlers.ProxyRequest
org.apache.mina.proxy.handlers.socks.SocksProxyRequest
SocksProxyRequest.java - Wrapper class for SOCKS requests.
- Since:
- MINA 2.0.0-M3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate byteThe command code.private StringThe SOCKS server host name.private StringThe user's password used when authenticating to the proxy server.private intThe SOCKS server port.private byteThe SOCKS protocol version.private StringThe Kerberos service name used in GSSAPI authentication mode.private StringThe user name used when authenticating to the proxy server. -
Constructor Summary
ConstructorsConstructorDescriptionSocksProxyRequest(byte protocolVersion, byte commandCode, InetSocketAddress endpointAddress, String userName) Constructor used when building a SOCKS4 request.SocksProxyRequest(byte commandCode, String host, int port, String userName) Constructor used when building a SOCKS4a request. -
Method Summary
Modifier and TypeMethodDescriptionbyteReturn the command code.final StringgetHost()Return the server host name.byte[]Return the user password.byte[]getPort()Return the server port as a byte array.byteReturn the protocol version.Return the Kerberos service name.Return the user name.voidsetPassword(String password) Set the user passwordvoidsetServiceKerberosName(String serviceKerberosName) Set the Kerberos service name.Methods inherited from class ProxyRequest
getEndpointAddress
-
Field Details
-
protocolVersion
private byte protocolVersionThe SOCKS protocol version. -
commandCode
private byte commandCodeThe command code. -
userName
The user name used when authenticating to the proxy server. -
password
The user's password used when authenticating to the proxy server. -
host
The SOCKS server host name. -
port
private int portThe SOCKS server port. -
serviceKerberosName
The Kerberos service name used in GSSAPI authentication mode.
-
-
Constructor Details
-
SocksProxyRequest
public SocksProxyRequest(byte protocolVersion, byte commandCode, InetSocketAddress endpointAddress, String userName) Constructor used when building a SOCKS4 request.- Parameters:
protocolVersion- the protocol versioncommandCode- the command codeendpointAddress- the endpoint addressuserName- the user name
-
SocksProxyRequest
-
-
Method Details
-
getIpAddress
public byte[] getIpAddress()- Returns:
- the endpoint address resulting from the
ProxyRequest.getEndpointAddress(). If not set, it will return theSocksProxyConstants.FAKE_IPconstant value which will be ignored in a SOCKS v4 request.
-
getPort
public byte[] getPort()Return the server port as a byte array.- Returns:
- the server port
-
getCommandCode
public byte getCommandCode()Return the command code.- Returns:
- the command code
-
getProtocolVersion
public byte getProtocolVersion()Return the protocol version.- Returns:
- the protocol version
-
getUserName
-
getHost
-
getPassword
-
setPassword
Set the user password- Parameters:
password- the user password value
-
getServiceKerberosName
Return the Kerberos service name.- Returns:
- the Kerberos service name
-
setServiceKerberosName
Set the Kerberos service name.- Parameters:
serviceKerberosName- the Kerberos service name
-