File transfert over openfire with Proxy enabled

Hi all,

I have an issue related to FileTransfert over OpenFire with Proxy enabled.

I am writting a simple Java code with last smack lib using JID “eloi@breizh” and a “standard” desktop client on Gajim “droid@breizh”

On openfire I enabled the FileTransfert proxy on port 7777. This port is not protected by a firewall.

When my Java code wants to send a file, I see the invitation on Gajim and accept it, but no bytes are transfered.

Here are the raw sent from my Java code :

<stream:stream to="breizh" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
<starttls xmlns="urn:ietf:params:xml:ns:xmpp-tls"/>
<stream:stream to="breizh" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
<auth mechanism="DIGEST-MD5" xmlns="urn:ietf:params:xml:ns:xmpp-sasl"></auth>
<response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">Y2hhcnNldD11dGYtOCx1c2VybmFtZT0iZWxvaUBicmVpemgiLHJlYWxtPSJicmVpemgiLG5vbmNlPSJ4VXNTQmszQmVxVGlsd1pJKzg1c3dFQS9iL1UyUUY2RG9YZHNKQnEyIixuYz0wMDAwMDAwMSxjbm9uY2U9IjM2YmZ0dzNzS1hwTFpZbXlzdDIraTdJSUpYTGF0bmZ6YmhZY2VQQXIiLGRpZ2VzdC11cmk9InhtcHAvYnJlaXpoIixtYXhidWY9NjU1MzYscmVzcG9uc2U9ODIzYzJjNjRiMjMzYjdlYTQyNDYxOTJhMmRkOWRkMTMscW9wPWF1dGgsYXV0aHppZD0iZWxvaUBicmVpemgi</response>
<stream:stream to="breizh" xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" version="1.0">
<iq id="3El1i-0" type="set"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><resource>Smack</resource></bind></iq>
<iq id="3El1i-1" type="set"><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></iq>
<iq id="3El1i-2" type="get"><query xmlns="jabber:iq:roster"></query></iq>
<presence id="3El1i-3"></presence>
<message id="3El1i-4" to="droid@breizh/Gajim" type="chat"><body>salurt toi</body></message>
<iq id="31" to="droid@breizh/Gajim" type="result"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" name="Smack" type="pc"/><feature var="http://jabber.org/protocol/si/profile/file-transfer"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/ibb"/><feature var="http://jabber.org/protocol/bytestreams"/></query></iq>
<iq id="31" to="droid@breizh/Gajim" type="result"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" name="Smack" type="pc"/><feature var="http://jabber.org/protocol/xhtml-im"/><feature var="http://jabber.org/protocol/muc"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/commands"/></query></iq>
<iq id="3El1i-6" to="droid@breizh/Gajim" from="eloi@breizh/Smack" type="set"><si xmlns="http://jabber.org/protocol/si" id="jsi_3685404683071981976" profile="http://jabber.org/protocol/si/profile/file-transfer"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="play_tennis.apk" size="7594485" ><desc>You won&apos;t believe this!</desc></file><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field var="stream-method" type="list-single"><option><value>http://jabber.org/protocol/bytestreams</value></option><option><value>http://jabber.org/protocol/ibb</value></option></field></x></feature></si></iq>
<iq id="3El1i-10" to="droid@breizh/Gajim" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
<iq id="3El1i-11" to="breizh" type="get"><query xmlns="http://jabber.org/protocol/disco#items"></query></iq>
<iq id="3El1i-12" to="broadcast.breizh" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
<iq id="3El1i-13" to="proxy.breizh" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
<iq id="3El1i-14" to="pubsub.breizh" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
<iq id="3El1i-15" to="conference.breizh" type="get"><query xmlns="http://jabber.org/protocol/disco#info"></query></iq>
<iq id="3El1i-16" to="proxy.breizh" type="get"><query xmlns="http://jabber.org/protocol/bytestreams"/></iq>
<iq id="3El1i-17" to="droid@breizh/Gajim" type="set"><query xmlns="http://jabber.org/protocol/bytestreams" sid="jsi_3685404683071981976" mode = "tcp"><streamhost jid="proxy.breizh" host="127.0.1.1" port="7777"/></query></iq>
<iq id="3El1i-18" to="proxy.breizh" type="set"><query xmlns="http://jabber.org/protocol/bytestreams" sid="jsi_3685404683071981976"><activate>droid@breizh/Gajim</activate></query></iq>

I think that the host=127.0.0.1 is an issue. According to my google searchs, I should provide an external ip

with :

xmpp.proxy.externalip = 192.168.50.151

192.168.50.51 is the IP address of my server. I am running the Java code on 192.168.50.143

This modification does not change the issue.

So my questions are :

  1. do you think that this host field to localhost is the cause of my issue ?

  2. How can I change it properly ?

Here you can find the Java code I used :

http://pastebin.com/MvSC4dNH

Thanks !

Eloi