Class Socks5Utils

java.lang.Object
org.jivesoftware.smackx.bytestreams.socks5.Socks5Utils

public class Socks5Utils extends Object
A collection of utility methods for SOcKS5 messages.
  • Constructor Details

  • Method Details

    • createDigest

      public static String createDigest(String sessionID, Jid initiatorJID, Jid targetJID)
      Returns a SHA-1 digest of the given parameters as specified in XEP-0065.
      Parameters:
      sessionID - for the SOCKS5 Bytestream
      initiatorJID - JID of the initiator of a SOCKS5 Bytestream
      targetJID - JID of the target of a SOCKS5 Bytestream
      Returns:
      SHA-1 digest of the given parameters
    • receiveSocks5Message

      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 occurred
      SmackException.SmackMessageException - if the SOCKS5 message contains an unsupported address type