ejabberd - Comments for "STUN server configuration" https://www.ejabberd.im/node/3981 en Re: STUN server configuration https://www.ejabberd.im/node/3981#comment-55501 <div class="quote-msg"> <div class="quote-author"><em>itekimasu</em> wrote:</div> <p>Zinid, the code I am trying to get working with my own server came from <noindex><a href="http://code.google.com/apis/talk/libjingle/index.html" title="http://code.google.com/apis/talk/libjingle/index.html" rel="nofollow" >http://code.google.com/apis/talk/libjingle/index.html</a></noindex></p> <p>Quote:</p> <p> libjingle is a collection of open-source C++ code and sample applications that enables you to build a peer-to-peer application. The code handles creating a network connection (through NAT and firewall devices, relay servers, and proxies), negotiating session details (codecs, formats, etc.), and exchanging data. It also provides helper tasks such as parsing XML, and handling network proxies. You could build the following programs with libjingle:</p> <p> * A multi-user voice chat application<br /> * A multi-user video conferencing application<br /> * A multi-user live music streaming application<br /> * A peer-to-peer file sharing application</p> </div> <p>libjingle is a neglected library written ages ago by Google, and it doesn't implement current version of jingle as described in XEP-0166</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>So I guess it will work from behind a NAT? </p></div> <p>STUN server should reside on public Internet as required by RFC5389.</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>When you say "this isn't jingle" are you trying to say that this forum/project has no affiliation with jingle so I won't receive any help here? </p></div> <p>Yes</p> <div class="quote-msg"> <div class="quote-author">Quote:</div> <p>I would still appreciate knowing how to set up a STUN server if anyone knows how, if this jingle app needs a STUN server then it should still be a step in the right direction. </p></div> <p>STUN is implemented in ejabberd as described in RFC5389. Currently, there is no way to discover STUN server through XMPP stream, because the corresponding XEP-0215 is not supported by ejabberd since it is still in experimental state.</p> Sat, 03 Apr 2010 14:57:31 +0000 zinid comment 55501 at https://www.ejabberd.im google:jingleinfo seems to be https://www.ejabberd.im/node/3981#comment-55496 <p>google:jingleinfo seems to be used to retrieve a list of stun servers so I should be able to bypass that part and manually specify my own server. Is STUN a component of ejabberd or an external server you need to run and then direct ejabberd to?</p> <div class="codeblock"><code>If the server supports the Jingle information extension, the reply will include the &#039;google:jingleinfo&#039; feature, as shown here:<br />Example 2. Client service discovery response <p>&lt;iq type=&#039;result&#039; to=&#039;romeo@gmail.com&#039; from=&#039;gmail.com&#039;&gt;<br />&nbsp; &lt;query xmlns=&#039;http://jabber.org/protocol/disco#info&#039;&gt;<br />&nbsp;&nbsp;&nbsp; ...<br />&nbsp;&nbsp;&nbsp; &lt;feature var=&#039;google:jingleinfo&#039;/&gt;<br />&nbsp;&nbsp;&nbsp; ...<br />&nbsp; &lt;/query&gt;<br />&lt;/iq&gt;</p> <p>Requesting Jingle Info Server Addresses</p> <p>To request the addresses of servers, a client sends an IQ get containing a &lt;query/&gt; element qualified by the &#039;google:jingleinfo&#039; namespace, as shown here:<br />Example 3. Client requests list of servers</p> <p>&lt;iq type=&#039;get&#039;<br />&nbsp;&nbsp;&nbsp; from=&#039;romeo@gmail.com/orchard&#039;<br />&nbsp;&nbsp;&nbsp; to=&#039;romeo@gmail.com&#039;<br />&nbsp;&nbsp;&nbsp; id=&#039;ji-request-1&#039;&gt;<br />&nbsp; &lt;query xmlns=&#039;google:jingleinfo&#039;/&gt;<br />&lt;/iq&gt;</p> <p>The first time this request is sent, in addition to returning the server addresses, the service will also subscribe the client to receive updates when the servers change as described below.</p> <p>The server will respond to the request with a &lt;query/&gt; element qualified by the &#039;google:jingleinfo&#039; namespace. Among other information, this element contains one &lt;stun/&gt; element that contains a list of &lt;server/&gt; elements, each of which describes one STUN server. Each &lt;server/&gt; element has the following two attributes:</p> <p>&nbsp;&nbsp;&nbsp; * host&nbsp; Gives the DNS name or IP address of the STUN server<br />&nbsp;&nbsp;&nbsp; * udp&nbsp;&nbsp; Gives the port on the STUN server</p> <p>Example 4. Client receives list of STUN servers</p> <p>&lt;iq type=&#039;result&#039;<br />&nbsp;&nbsp;&nbsp; from=&#039;romeo@gmail.com&#039;<br />&nbsp;&nbsp;&nbsp; to=&#039;romeo@gmail.com/orchard&#039;<br />&nbsp;&nbsp;&nbsp; id=&#039;ji-request-1&#039;&gt;<br />&nbsp; &lt;query xmlns=&#039;google:jingleinfo&#039;&gt;<br />&nbsp;&nbsp;&nbsp; &lt;stun&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;server host=&#039;host1&#039; udp=&#039;12345&#039;/&gt;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;server host=&#039;host2&#039; udp=&#039;12345&#039;/&gt;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp; &lt;/stun&gt;<br />&nbsp; &lt;/query&gt;<br />&lt;iq&gt;</p></code></div> Sat, 03 Apr 2010 13:27:52 +0000 itekimasu comment 55496 at https://www.ejabberd.im Zinid, the code I am trying https://www.ejabberd.im/node/3981#comment-55495 <p>Zinid, the code I am trying to get working with my own server came from <noindex><a href="http://code.google.com/apis/talk/libjingle/index.html" title="http://code.google.com/apis/talk/libjingle/index.html" rel="nofollow" >http://code.google.com/apis/talk/libjingle/index.html</a></noindex></p> <p>Quote:</p> <p> libjingle is a collection of open-source C++ code and sample applications that enables you to build a peer-to-peer application. The code handles creating a network connection (through NAT and firewall devices, relay servers, and proxies), negotiating session details (codecs, formats, etc.), and exchanging data. It also provides helper tasks such as parsing XML, and handling network proxies. You could build the following programs with libjingle:</p> <p> * A multi-user voice chat application<br /> * A multi-user video conferencing application<br /> * A multi-user live music streaming application<br /> * A peer-to-peer file sharing application</p> <p>So I guess it will work from behind a NAT? </p> <p>When you say "this isn't jingle" are you trying to say that this forum/project has no affiliation with jingle so I won't receive any help here? </p> <p>I would still appreciate knowing how to set up a STUN server if anyone knows how, if this jingle app needs a STUN server then it should still be a step in the right direction.</p> <p>Thanks</p> Fri, 02 Apr 2010 18:25:36 +0000 itekimasu comment 55495 at https://www.ejabberd.im I don't know how https://www.ejabberd.im/node/3981#comment-55492 <p>I don't know how google:jingleinfo works (because this is actually not jingle at all) and I'm not sure if it uses stun or not.<br /> By the way, STUN is not designed to work behind a NAT.</p> Fri, 02 Apr 2010 15:44:22 +0000 zinid comment 55492 at https://www.ejabberd.im