JingleFT in main branch
Jefry Lagrange, 13/04/2012 | Source: Jefry Lagrange (Gajim)
EDIT: Actually it is not yet merged right now, give it one week.
Jefry Lagrange, 13/04/2012 | Source: Jefry Lagrange (Gajim)
Jefry Lagrange, 12/02/2012 | Source: Jefry Lagrange (Gajim)
Jefry Lagrange, 17/01/2012 | Source: Jefry Lagrange (Gajim)
Jefry Lagrange, 01/01/2012 | Source: Jefry Lagrange (Gajim)
Jefry Lagrange, 28/11/2011 | Source: Jefry Lagrange (Gajim)
<iq type='get'
from='hag66 at shakespeare.lit/pda'
to='darkcave at shakespeare.lit'
id='find45'>
<query xmlns='http://jabber.org/protocol/disco#info'
node='files'>
<identity category='filesys' type='file' name='file1' />
</query>
</iq>
<iq type='result'
from='darkcave at macbeth.shakespeare.lit'
to='hag66 at shakespeare.lit/pda'
id='find45'>
<query xmlns='http://jabber.org/protocol/disco#info'
node='files/somefile'>
<identity category='filesys' type='file' name='file1'
hash='552da749930852c69ae5d2141d3766b1'/>
</query>
</iq>
<iq type='get'
from='hag66 at shakespeare.lit/pda'
to='darkcave at shakespeare.lit'
id='find46'>
<query xmlns='http://jabber.org/protocol/disco#info'
node='files'>
<identity category='filesys' type='file' name='file1'/>
<x xmlns='jabber:x:data' type='get'>
<field var='ssn' type='text-single' label='Social Security Number'>
<regex>([0-9]{3})-([0-9]{2})-([0-9]{4})</regex>
</field>
</query>
</iq>
Jefry Lagrange, 12/09/2011 | Source: Jefry Lagrange (Gajim)
Anonymous, 22/08/2011 | Source: Kunal Kerkar (Prosody)
A couple of weeks ago, Thiago helped me out understand the basics of JIngle Relay Nodes. He explained that, the server needs to open 4 ports and transfer data coming into them with each one of the other. His exact email
In fact your server will have to open 4 ports in total, 1rtp+ 1rtcp
Every packet that arrives at A needs to be sent through B to whichever
for each end point.
Lets call them A, A', B, B' respectively.
address(IP:Port) is sending to B.
Every packet that arrives at A' needs to be sent through B' to
whichever address(IP:Port) is sending to B'.
Every packet that arrives at B needs to be sent through A to whichever
address(IP:Port) is sending to A.
Every packet that arrives at B' needs to be sent through A' to
whichever address(IP:Port) is sending to A'. Exception:
* If no packet was received in a given port, packets to be sent
through that port should be discarded. Remarks:
* There is no process to verify that a sender to a given port is the
real sender of the stream. The recommended mitigation is to create a
race of packets, for the latest 10 received packets in a given port,
only relay and update Address to the one sender holding the majority
of the packets.
I ended up implementing the same in TCP. mod_jinglerelaynodes.lua and mod_jinglechannel.lua
Tobias Markmann, 07/08/2011 | Source: Tobias Markmann (Swift)
Here another update on the progress of my current Google Summer of Code project, adding file-transfer support to Swift.
I've finished my implementation of SOCKS5 bytestreams, which is the basis for peer-to-peer file transfer via TCP with Jingle.
The protocol for Jingle describes that both sides of a file-transfer start a SOCKS5 server and send each other a list of IP/port combinations which the other side can then try to connect to. This alone leads to direct peer-to-peer connection as long as only one side is behind a firewall/NAT, or in other words, at least one side is publicly accessible from the internet. Sadly most users are behind some kind of NAT at home (due to WLAN and DSL routers).
Here assisted candidates, IP/port combinations which were acquired with help of UPnP or NAT-PMP, come into play. A lot of home routers and similar devices support one of those protocols, and if enabled they allow a program like Swift to forward certain ports to itself and request the real public IP from the router.
The plan is to use the libraries from the MiniUPnP project. This turned out to be harder than expected, because the library doesn't provide an asynchronous API. I'll still use those libs but will have to change the design and move those API calls to a dedicated thread.
Kind of as a last resort, there are also SOCKS5 proxies. They are used if it's impossible to establish a direct peer-to-peer connection via TCP. This could be due to firewalls or NATs on both sides with no UPnP/NAT-PMP technologies being available at either end.
While this year's Summer of Code nears its end, my next tasks are basically implementing SOCKS5 proxy support, verification of received data using SHA-1 hash, some GUI work and general testing/cleanup.
Jefry Lagrange, 01/08/2011 | Source: Jefry Lagrange (Gajim)
| Status | Operation |
|---|---|
| 0 | About to connect |
| 1 | send version and auth types / initial read |
| 2 | read auth response / reply with desired auth type |
| 3 | send 'connect' request / read connect request |
| 4 | get approve of our request / approve connect |
| 5 | ????? / read file |
| 6 | retrieve file / ???? |
Tobias Markmann, 28/07/2011 | Source: Tobias Markmann (Swift)
Here a short update on the UI. The following 4 pictures will roughly show the workflow of sending a file with Swift.
First you right-click on the contact you want to transfer a file to and select "Send File". That item will only be available if the client your contact uses supports Jingle File-Transfer.
A chat view to that contact will appear showing you a chat bubble for the intended transfer. Here you can actually initiate the transfer or cancel it.
After you clicked the send button a input dialog for the description will appear at as soon as you've entered your description the transfer will be negotiated and started.
During the transfer the progress will be shown as a progress bar, like in many other chat applications. The actual presentation could be a bit smoother but this works for starters.
Thanks go out to Jefry, who brought Gajim's file transfer implementation up-to-date, so I could test against it.