Feature request: client-specified XEP-0065 SOCKS5 bytestream proxies

I already have a patch for this – it’s 22 lines including javadoc, 8 lines of actual code – very simple. But I’d rather not sign/fax/mail the contributor agreement, so instead, I’m asking for it as a feature request here.

I’d like to have the ability to add a specific XEP-0065 SOCKS5 bytestream proxy to Smack. Some servers advertise invalid proxies in Service Discovery, while others advertise none at all. Clients like Psi have the capability to specify a particular bytestream proxy. I’d like to see this as well in Smack.

Changes requested:

Socks5BytestreamManager.java:

  • Add two methods:

/** Adds a proxy to the list of user-specified proxies.

  • @param proxyJID the JID of the SOCKS5 Bytestream proxy

*/

public void addProxy(String targetJID);

/** Removes a proxy to the list of user-specified proxies.

  • @param proxyJID the JID of the SOCKS5 Bytestream proxy

*/

public void removeProxy(String targetJID);

  • Add one field:
    private List userSpecifiedBytestreamJIDs;

  • Change one method:

    • public Socks5BytestreamSession establishSession(String targetJID, String sessionID):
      add all proxies in userSpecifiedBytestreamJIDs to List proxies.

(Gah! I give up trying to format the code. This richtext editor is terrible!)

Please add contributions in the form of .patch files. Preferably including unit tests .

Patch attached.
Socks5BytestreamManager.java.patch.zip (793 Bytes)