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
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).
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.
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).
This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.