[JDEV] Re: OOB filetransfer negotiation

Jens Alfke jens at mac.com
Tue Aug 14 13:03:21 CDT 2001


On Tuesday, August 14, 2001, at 10:29 AM, Julie wrote:

> Jens, thanks a lot for your message.  It does solve the problem.  
> However, is there
> any other way that a file transfer can be done?  Perhaps sending the 
> whole file
> directly to the other client?

There is no mechanism in the protocol for sending a file inline in a 
Jabber session. It would require breaking up the file into lots of 
pieces and sending each piece as encoded CDATA in an <iq> or <message> 
element (to avoid the 500k limit on XML elements, and so the user's 
connection can continue to receive other Jabber messages during the 
transfer). There was also strong resistance by people on this list to 
shoveling that much data through the poor Jabber server -- you can 
imagine what would happen if thousands of people were sending MP3s to 
each other this way.

> Is there a way to send a file to the client,
> bypassing a firewall, since we can now find out the IP address of the 
> other client?

As far as I know you cannot find out the IP address of the receiver 
unless it explicitly tells you. As a privacy measure, Jabber doesn't 
directly expose IP addresses. Besides, this would be a poor model since 
it doesn't give the receiver much control over whether to download the 
file. And it wouldn't bypass firewalls -- it just reverses the issue; 
now you're in trouble if the _receiver_ is the one behind the firewall.

There are two workarounds that I know of to the firewall problem:
(1) Sender uploads the file to a public server someplace, i.e. your 
storage area on your ISP account. Works best with FTP or WebDAV access. 
Then you send the receiver a URL to where the file got uploaded. I hear 
that some Jabber clients already support this.
(2) Someone runs a public "relay server" that accepts connections from 
two machines that want to communicate, then relays socket traffic in 
both directions from one to the other. There is a prototype protocol and 
implementation at jabber.org (but I've lost the email that announced it.)

--Jens




More information about the JDev mailing list