|
|
. What follows is information for advanced users.'''
|
|
|
|
|
|
*Overview*
|
|
|
|
|
|
File Transfer support comes with Gajim 0.8. It is implemented by socks5 bytestreams ([XEP-0065](https://xmpp.org/extensions/xep-0065.html), [XEP-0096](https://xmpp.org/extensions/xep-0096.html), for information on file transfer over jingle: [wiki: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](https://en.wikipedia.org/wiki/Internet_service_provider). 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](https://en.wikipedia.org/wiki/Firewall_%28networking%29) 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 [xmpp.net](https://xmpp.net/directory.php) .
|
|
|
The last star marks if server has proxy for file transfers.
|
|
|
Another posible solution is described below.
|
|
|
You also can open the [wiki: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](https://en.wikipedia.org/wiki/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 [Dynamic DNS](https://en.wikipedia.org/wiki/Dynamic_DNS)-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](https://en.wikipedia.org/wiki/Port_forwarding)
|
|
|
and [iptables](https://en.wikipedia.org/wiki/Netfilter)
|
|
|
|
|
|
*Disable File Transfer Proxies*
|
|
|
|
|
|
Open [wiki: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](https://en.wikipedia.org/wiki/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 https://trac.gajim.org
|
|
|
|
|
|
|
|
|
## tests
|
|
|
Here are the different tests we did about file transfer:
|
|
|
|
|
|
| || SI || Jingle |
|
|
|
|----------------------------------||-----------||------------|
|
|
|
| | IBB |Socks5| IBB |Socks5 |
|
|
|
|sender can be contacted directly | X | X | X | X |
|
|
|
|using sender proy | NA | X | NA | X |
|
|
|
|receiver can be contacted directly| NA | NA | NA | X |
|
|
|
|using receiver proxy | NA | NA | NA | X | |