Regarding Jingle Relay Nodes

67 views
Skip to first unread message

Kunal Kerkar

unread,
Aug 8, 2011, 7:50:25 AM8/8/11
to jingl...@googlegroups.com
Hello,
I'm working on implementing Jingle Relay Nodes for Prosody. From what I
understand from the XEP-0278, the server opens up 2 ports. It listens on
the localport and writes the same packets back to the remoteport.

Now say 2 clients A and B need to interact using server S's jingle
channel. A sends a request to S. S replies with the needed information.
A then starts sending messages on the localport of S. S will now write
the same message to its remoteport. I have 2 questions.

1) How would B know which port to connect to?
2) Even if B connects, how do I verify B is who he says he is?

--
Regards
Kunal

Thiago

unread,
Aug 8, 2011, 6:02:35 PM8/8/11
to jinglenodes
Hi Kunal Kerkar,

In fact your server will have to open 4 ports in total, 1rtp+ 1rtcp
for each end point.
Lets call them A, A', B, B' respectively.

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 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.

Regards,
Thiago
Reply all
Reply to author
Forward
0 new messages