[Gossip-dev] File transfers

Dimitur Kirov dkirov at gmail.com
Thu Mar 29 12:08:00 CEST 2007


The initial work on filetransfers for gossip is attached in gnome
bugzilla. There are some things that I want do discuss before going on.

LmBsSession is the public class. It is designed to keep track of all
transfers among all accounts. Currently libgossip creates one instance
of this class per account. I suggest to change this and put LmBsSession
instance in gossip-session, so that we have one LmBsSession per program.

LmBsClient class is used for all socket io actions. In the future it
will be replaced by lm-socket.c , because they overlap in
functionality. This will require extending the lm-socket class with
some functionality for synchronous communication:
 - callback for data_written event
 - ability to add and remove socket watches for reading

Function "lm_bs_transfer_send_success_reply" from lb-bs-transfer.c
sends a streamhost activation reply. It could be better suited in
libgossip, instead of loudmouth, but at the same time this will make
LmBsSession more complicated. 

xep 0096 requires that clients with FT support should advertise their
FT profile as a result of disco info request. I added the following
features and I'm not sure if they cover everything that gossip has:
 <feature var="http://jabber.org/protocol/disco#info"></feature>
 <feature var="http://jabber.org/protocol/si"></feature>
 <feature
var="http://jabber.org/protocol/si/profile/file-transfer"></feature>
<feature var="http://jabber.org/protocol/bytestreams"></feature>
<feature var="http://jabber.org/protocol/muc"></feature>

Currently file transfer session ids are generated with a simple
incremental rule GOSSIPSID1,GOSSIPSID2 .. etc. This is not good from
security point of view, because every internet user will be able to 
steal a file if he knows that certain user runs gossip.

Proxy support helps users behind masqueraded networks to send files.
However it is a bad practice to hardcode a predefined set of proxies
and at the same time users should not be bothered to enter FT proxy in
gossip settings. Do you think it is worth to implement proxy support
now, or better leave it for later versions ?

File request dialog  (ui/file_transfer.glade) looks old-fashioned. IMO
it will be better to have this request notification in chat windows,
similar to muc invitations. 

Finally, we can enable the xep-0047 support with a simple rule like:
if file is <= 20Kb and the sender supports ibb, prefer ibb over
bytestreams. It is not appropriate to use this method for large files,
because user will be banned from server, due to high traffic.

Regards,
D.Kirov



More information about the Gossip-dev mailing list