CoqDevel

the stuff Coquelicot does when it thinks it is at work

Wednesday, March 15, 2006

upgrading JBother's file transfer - Smack 2.2.0

After I have finished implementing my own version of (direct) file transfer, I decided to upgrade JBother to the latest Smack library (I have used a bleeding-edge nightly build from March, 12) because it includes file transfer already. This is going to be a nice training before embarking on newest JChat project - creating our own version of Jabber communicator :-). Well, I must say that new code works ok, it doesn't implement 'direct' SOCKS5 file transfer - it uses proxified but the proyx is running on the same host as Initiator - which makes it little bit more universal and doesn't bring too much of an overhead (the difference is one extra TCP connection on Initiator's side, from his data stream socket to the 'bogus' proxy's).

So, at the end of the day I was able to transfer files between JBother and PSI using SOCKS5 method - not too bad! Still to come: find a way to specify different proxy65 hosts than local host (to actually see the file transfer from behind the NAT working) and get 'I would like to use the older, deprecated IBB over SOCKS5 method' option.

I have found some inconsistencies in current Smack code that has been picked up by (always accurate, picky PSI):

GOOD:

<iq from=\"admin@devpc4.ccb.nc3a.nato.int/JBother\" type=\"set\" to=\"test@devpc4.ccb.nc3a.nato.int/Psi\" id=\"T5qLw-7\" >
<si xmlns=\"http://jabber.org/protocol/si\" profile=\"http://jabber.org/protocol/si/profile/file-transfer\" id=\"jsi_4019840249536931701\" >
<file xmlns=\"http://jabber.org/protocol/si/profile/file-transfer\" size=\"27976321\" name=\"xen-3.0.1-install-x86_32p.tgz\" >
<desc>asdfasdf</desc>
</file>
<feature xmlns=\"http://jabber.org/protocol/feature-neg\">
<x xmlns=\"jabber:x:data\" type=\"form\" >
<field type=\"list-single\" var=\"stream-method\" >
<option>
<value>http://jabber.org/protocol/bytestreams</value>
</option>
<option>
<value>http://jabber.org/protocol/ibb</value>
</option>
</field>
</x>
</feature>
</si>
</iq>
BAD:

<iq from=\"admin@devpc4.ccb.nc3a.nato.int/JBother\" type=\"set\" to=\"test@devpc4.ccb.nc3a.nato.int/Psi\" id=\"T5qLw-7\" >
<si xmlns=\"http://jabber.org/protocol/si\" profile=\"http://jabber.org/protocol/si/profile/file-transfer\" id=\"jsi_4019840249536931701\" >
<file xmlns=\"http://jabber.org/protocol/si/profile/file-transfer\" size=\"27976321\" name=\"xen-3.0.1-install-x86_32p.tgz\" >
<desc>asdfasdf</desc>
</file>
<feature xmlns=\"http://jabber.org/protocol/feature-neg\">
<x xmlns=\"jabber:x:data\" type=\"form\" >
<field type=\"list-multi\" var=\"stream-method\" >
<option>
<value>http://jabber.org/protocol/bytestreams</value>
</option>
<option>
<value>http://jabber.org/protocol/ibb</value>
</option>
</field>
</x>
</feature>
</si>
</iq>


I have notified Alex Wenckus, who maintains Smack's filetransfer code.

0 Comments:

Post a Comment

<< Home