powered by Jive Software

Local SOCK5 proxy not running

Our application uses file transferring using local SOCKS5 proxy using Smack 4.4.2. But it fails with “no SOCKS5 proxies available” exception.

I checked the code, in Socks5BytestreamManager.establishSession() it calls determineStreamHostInfos() which collects local stream hosts from running local proxies (iterating Socks5Proxy.getRunningProxies()).

But there is no running proxy so it fails with that exception. To start a local proxy Socks5Proxy.getSocks5Proxy() must be called and it’s actually called in establishSession() later.

I also checked git history and it looks like getLocalStreamHost() called Socks5Proxy.getSocks5Proxy() before and started a proxy.

Should the local proxy be started from our application code or this is an issue in Smack library code?

Thanks in advance
Simon

1 Like

You are right that this was changed with

the commit message gives some motivation for this change. However, I don’t remember that not starting the local SOCKS5 proxy automatically was a desired side effect of this change. And Smack, trying to be an easy to use XMPP library, should conveniently start the local proxy by default (with an global option to not start the proxy).

1 Like

Thanks @Flow for the clarification.

We use the customized fork of Smack and we’re going to fix it there.
I think I can create a pull request for master then.

Simon

Thanks, but I also have a potential fix ready. And I’d like to include this in the 4.4 branch (and have it a JIRA issue key assigned).

1 Like

That’d be great, thanks!

https://igniterealtime.atlassian.net/browse/SMACK-912

1 Like