NOTE: File Transfer should work for you out of the box. You do not need to do something special. What follows is information for advanced users.

Overview

File Transfer support comes with Gajim 0.8. It is implemented by socks5 bytestreams ( JEP-0065,  JEP-0096, for information on file transfer over jingle: JingleFileTransfer) The main objective is to provide a way of exchanging files between users over a stream independent of the jabber servers, thus saving their resources.

The way it works

First of all the initiator sends request for new file transfer, then recipient of the file should send its response (accept/deny) to the initiator. In the next step the initiator of the file transfer (sender) posts iq with its own ip and list of socks5 proxy server. Then recipient tries to establish direct p2p connection to the sender. If it is impossible to do it recipient tries to connect to one of the socks5 proxies he got from the sender. If it succeeds it notifies the sender for the used proxy and file transfer can begin.

During the file transfer it is possible that connection to the peer or the socks5 proxy is lost or one of the peers cancels the transfer. In these cases both peers should be notified that file transfer cannot be completed.

Possible problems and solutions

1. Till the date of writing this wiki all socks5 proxy servers suffered from one problem: It is impossible to send file over socks5 proxy if one of the peers contains non ascii characters in his jid or resource. In this case the contact that has such jid should change it and relogin to his server and then the transfer can be instantiated.

2. File transfer port (7777) can be filtered by your  ISP. You can check this by typing one of the following commands:

	telnet 208.245.212.98 7777
	telnet 213.134.161.52 7777
	telnet 129.16.79.37 7777

If connection cannot be established to any of the hosts then your computer is probably behind a  firewall and this firewall filters port 7777. You can ask your ISP to open the port to the specific proxies that Gajim uses or you can try to find a proxy that listens on different port than 7777. List of jabber servers is available at  http://www.jabber.org/network/oldnetwork.shtml .

The last star marks if server has proxy for file transfers. Another posible solution is described below. You also can open the ACE and simply change the value of key "file_transfers_port" to an allowed port.

Forward Port on Your Gateway/Router?

If you are behind  NAT but you have access to your router you can forward the port so that your computer is accessible through the translated port on your router. Let's say your internal ip address is 10.10.10.1 and your router's real ip 1.2.3.4 then all you have to do is tell the router to forward all connection to 1.2.3.4 on port 28011 to 10.10.10.1:28011. After that open advanced preferences (Preferences -> Advanced) and change the value of key "ft_override_host_to_send" to your real ip address (1.2.3.4) or if you have to the Hostname of your  DynDNS-Account.

Sample port forward from 1.2.3.4:28011 to 10.10.10.1:28011 using iptables:

iptables -t nat -A PREROUTING -p tcp -d 1.2.3.4 --dport 28011 -j DNAT --to-destination 10.10.10.1:28011
iptables -A FORWARD -p tcp --dport 28011 -j ACCEPT

See more info on  Port Forwarding and  iptables

Disable File Transfer Proxies

Open ACE, edit your account and under General tab, uncheck 'Use file transfer proxies'.


If you have problems with file transfer between two Gajim users on  Windows behind NAT please make sure you use 0.8.1 or higher where those problems are fixed


If you find bugs or have ideas how Gajim can be better please send tickets in  http://trac.gajim.org