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.

Wednesday, March 08, 2006

JBother 'direct' file transfer - more testing

I added a simple class 'Socks5AuthenticationMessage' to JBother's file transfer in order to handle SOCKS5 authentication messages more easily. I have also started testing of new old fuctionality across subnets and OSes; it proved that it worked as long as the host/port properties are OK... so instead of trusting the user to put the correct values, JBo is trying to fill them out as much as possible. Hopefully this will result in less complaints from users :-).

Also (re)started working on Wildfire plugin for logging Jabber messages. After SIMEX lots of people reported that it would be nice to be able to view conversations... this would be something like Bandersnatch but better - with the possibility to view our extensions to XMPP.

Tuesday, March 07, 2006

some JBother news

It's been avery long time since anything interesting was put here so I guess it's good moment to write down what was going on during the last couple of weeks. We have successfuly completed SIMEX '06, where Jabber service was performing cery well - I'm very happy with new Wildfire server. As for JBother, it was working very good for most of the time; plugins worked OK although our favourite bug hunter Reiner managed to find some. Main thing that was not all right was (infamous) file transfer. That's why I decided to work on it now.

File transfer is implemented in latest version of JBother to use 'proxy65' method to make transfers over the internet possible. What we need, however, is 'direct' filetransfer, as described in JEP-0065. That was why, among other things, we were using older (0.8.8 + some corrections) version of JBother. Rigth now we will switch to the latest (0.8.9) version of JBo and I'm going to put my changes to make the 'direct' SOCKS5 filetransfer possible. I have pre-tested it today with JBother and PSI and it worked; it also worked one-way with Tkabber, due to the bug in Tkabber (it can't handle mor than one option offered in stream initiation; and JBother offers now both StreamHost-based and IBB (in-band-bytestreams, older method).

There is also more stuff coming up when it comes to Jabber; we are considering using Jabber with working filetransfer (hopefully it will come very soon! :-) to ingest files into CSD, instead of FTP based solution we are using right now; also we would like to separate JChat client from FAST and create a standalone IM/Conference client. This is still in alpha-phase right now but sound quite interesting.