This patch adds a interfaces for bytestreams and changes the SOCKS5 Bytestream and In-Band Bytestream implementation to implement these interfaces.
With this interfaces clients can use the same code to establish bytestreams either via IBB or SOCKS5.
The new interfaces are located in the package 'smackx.bytestreams'. Maybe the implementations of SOCKS5 and IBB should now be subpackages of the 'bytestreams' package. Any opinion?
The patch also contains the latest bugfixes to the SOCKS5 and IBB implementations.
- fixed bug which prevented the target to try out all given StreamHosts if a specific exception occurs while trying to connect to a SOCKS5 proxy
- make connection failure threshold for blacklisting configurable for Socks5BytestreamRequest (0 means there is no blacklisting)
- added option to disable prioritization of working SOCKS5 proxies (in case someone doesn't want this optimization)
- fixed bug for blacklisting of proxies (now address + port is blacklisted, not the address only)
- fixed bug when shutting down Socks5BytestreamManager that prevented stopping the local SOCKS5 proxy which could cause that the java vm didn't shutdown because a server socket was still listening