Improve accepting of Socks5 bytestream requests


Implements accepting a Socks5 bytestream request.

  • Target tries to connect to each Socks5 proxy provided in the Socks5 bytestream request using the Socks5Client

  • every connection attempt now has a time limit to be able to answer to the request before initiator times out

  • timeout behavior can be configured before accepting the request

  • bad proxies are blacklisted

  • target now replies with the correct error if request has to be canceled because of an error or if all connections to proxies failed ( 5.2 A 3)

  • #accept() returns Socket to be used for bidirectional use (was InputStream in old implementation)

  • tests for handling incoming Socks5 bytestream requests

  • handels all cases mentioned in the XEP-0065 (

  • adds Util classes to test implementation without a real XMPP server by mocking the Connection and predefining answer packets

related to SMACK-239,




Henning Staib
August 15, 2010, 12:16 PM

done in revision 11821



Robin Collier


Henning Staib