Pidgin XMPP discovery of TURN servers
Yclept Nemo
orbisvicis at gmail.com
Wed Apr 30 15:29:47 EDT 2014
I just took a quick look at pidgin's source, what follows is my conclusion.
Please correct if wrong:
During network initialization, or if NetworkManager is supported whenever
the network is reconnected, pidgin will update the turn server via a DNS
query. If the DNS query fails then the default turn server as specified in
preferences will be used. However only the IP address of the turn server is
updated in this fashion; the port must be specified in preferences.
The farsight2 backend will fall back upon this IP address only when [not
using the farsight2 nice transmitter] and [the particular protocol did not
provide a "relay-info" entry in the parameter list]. If these two
conditions are met, the parameter list will receive a "relay-info" entry
populated with the TURN server username, password, and port from pidgin's
preferences and the ip resulting from the DNS query.
When using the Jabber/XMPP protocol, this behaviour is next to useless. The
parameter list is created during RTP media initialization, and the
"relay-info" entry is populated with the values of NULL, 0, 0, 0, NULL,
NULL representing respectively the IP, UDP Mode, TCP Mode, SSLTCP Mode,
Username, and Password. Then from initialization to stream creation this
"relay-info" information is never updated. External Service Discovery
(XEP-0215) is not used to update pidgin's STUN or TURN servers and plays no
role. Even when not using the farsight2 nice transmitter neither the TURN
server settings from pidgin's preferences nor the TURN server IP from the
DNS query will be used, because the "relay-info" entry exists, albeit empty.
In other words, when using XMPP via pidgin, not only is discovery of TURN
servers via DNS queries or XEP-0215 disallowed, any TURN server preferences
in pidgin are ignored.
While it is possible that farsight's nice transmitter may use DNS SRV
records to determine the IP address and (hopefully) port of the TURN server
(outside the scope of the pidgin project and thus this email), since stream
creation is detached from the XMPP protocol there can be no TURN server
discovery via XEP-0215.
Since I am attempting to enable pidgin to discover and use the TURN server
(with a non-standard port) hosted on the same domain as my XMPP server, and
since pidgin uses farsight2, I would of course look forward to any
information concerning TURN server discovery performed by farsight2's nice
transmitter.
Sincerely,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pidgin.im/pipermail/devel/attachments/20140430/a7361421/attachment.html>
More information about the Devel
mailing list