public class SocksProxyRequest extends ProxyRequest
构造器和说明 |
---|
SocksProxyRequest(byte protocolVersion,
byte commandCode,
java.net.InetSocketAddress endpointAddress,
java.lang.String userName)
Constructor used when building a SOCKS4 request.
|
SocksProxyRequest(byte commandCode,
java.lang.String host,
int port,
java.lang.String userName)
Constructor used when building a SOCKS4a request.
|
限定符和类型 | 方法和说明 |
---|---|
byte |
getCommandCode()
Return the command code.
|
java.lang.String |
getHost()
Return the server host name.
|
byte[] |
getIpAddress() |
java.lang.String |
getPassword()
Return the user password.
|
byte[] |
getPort()
Return the server port as a byte array.
|
byte |
getProtocolVersion()
Return the protocol version.
|
java.lang.String |
getServiceKerberosName()
Return the Kerberos service name.
|
java.lang.String |
getUserName()
Return the user name.
|
void |
setPassword(java.lang.String password)
Set the user password
|
void |
setServiceKerberosName(java.lang.String serviceKerberosName)
Set the Kerberos service name.
|
getEndpointAddress
public SocksProxyRequest(byte protocolVersion, byte commandCode, java.net.InetSocketAddress endpointAddress, java.lang.String userName)
protocolVersion
- the protocol versioncommandCode
- the command codeendpointAddress
- the endpoint addressuserName
- the user namepublic SocksProxyRequest(byte commandCode, java.lang.String host, int port, java.lang.String userName)
commandCode
- the command codehost
- the server host nameport
- the server portuserName
- the user namepublic byte[] getIpAddress()
ProxyRequest.getEndpointAddress()
.
If not set, it will return the SocksProxyConstants.FAKE_IP
constant
value which will be ignored in a SOCKS v4 request.public byte[] getPort()
public byte getCommandCode()
public byte getProtocolVersion()
public java.lang.String getUserName()
public final java.lang.String getHost()
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- the user password valuepublic java.lang.String getServiceKerberosName()
public void setServiceKerberosName(java.lang.String serviceKerberosName)
serviceKerberosName
- the Kerberos service name