Class Socks5Utils
java.lang.Object
org.jivesoftware.smackx.bytestreams.socks5.Socks5Utils
A collection of utility methods for SOcKS5 messages.
-
Constructor Details
-
Socks5Utils
public Socks5Utils()
-
-
Method Details
-
createDigest
Returns a SHA-1 digest of the given parameters as specified in XEP-0065.- Parameters:
sessionID
- for the SOCKS5 BytestreaminitiatorJID
- JID of the initiator of a SOCKS5 BytestreamtargetJID
- JID of the target of a SOCKS5 Bytestream- Returns:
- SHA-1 digest of the given parameters
-
receiveSocks5Message
public static byte[] receiveSocks5Message(DataInputStream in) throws IOException, SmackException.SmackMessageException Reads a SOCKS5 message from the given InputStream. The message can either be a SOCKS5 request message or a SOCKS5 response message.(see RFC1928)
- Parameters:
in
- the DataInputStream to read the message from- Returns:
- the SOCKS5 message
- Throws:
IOException
- if a network error occurredSmackException.SmackMessageException
- if the SOCKS5 message contains an unsupported address type
-