No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xep-0279.xml 6.0KB

  1. <?xml version='1.0' encoding='UTF-8'?>
  2. <!DOCTYPE xep SYSTEM 'xep.dtd' [
  3. <!ENTITY % ents SYSTEM 'xep.ent'>
  4. %ents;
  5. ]>
  6. <?xml-stylesheet type='text/xsl' href='xep.xsl'?>
  7. <xep>
  8. <header>
  9. <title>Server IP Check</title>
  10. <abstract>This specification defines a simple XMPP extension that enables a client to discover its external IP address.</abstract>
  12. <number>0279</number>
  13. <status>Deferred</status>
  14. <type>Standards Track</type>
  15. <sig>Standards</sig>
  16. <approver>Council</approver>
  17. <dependencies>
  18. <spec>XMPP Core</spec>
  19. </dependencies>
  20. <supersedes/>
  21. <supersededby/>
  22. <shortname>sic</shortname>
  23. &stpeter;
  24. &diana;
  25. &thiago;
  26. <revision>
  27. <version>0.2</version>
  28. <date>2013-04-17</date>
  29. <initials>psa</initials>
  30. <remark><p>Modified XML format so server can return port as well as IP address; incremented protocol version from 0 to 1.</p></remark>
  31. </revision>
  32. <revision>
  33. <version>0.1</version>
  34. <date>2010-03-05</date>
  35. <initials>psa</initials>
  36. <remark><p>Initial published version.</p></remark>
  37. </revision>
  38. <revision>
  39. <version>0.0.2</version>
  40. <date>2009-03-10</date>
  41. <initials>psa</initials>
  42. <remark><p>Removed client inclusion of its IP address; added IPv6 example.</p></remark>
  43. </revision>
  44. <revision>
  45. <version>0.0.1</version>
  46. <date>2009-03-10</date>
  47. <initials>psa</initials>
  48. <remark><p>First draft.</p></remark>
  49. </revision>
  50. </header>
  51. <section1 topic='Introduction' anchor='intro'>
  52. <p>There are times when a client might want or need to discover what its external Internet Protocol (IP) address and port are, e.g. when gathering transport candidates for protocols such as &xep0065; or &xep0176;. One way to do so is for the client to ask the XMPP server to which it has connected. This specification defines such a method. The information provided by the server cannot necessarily be relied upon because there might be intermediate entities between the client and the server, but if the IP address and port returned by the server is different from the client's notion of its IP address and port then at the very least the client has received a hint that it might be behind a network address translator (NAT) and therefore cannot usefully provide its private IP address as a candidate for use in multimedia negotiations.</p>
  53. </section1>
  54. <section1 topic='Protocol' anchor='proto'>
  55. <p>First the client sends an IQ-get request to its server.</p>
  56. <example caption="Client requests its IP address from the server"><![CDATA[
  57. <iq from='romeo@montague.lit/orchard'
  58. id='ik2s7159'
  59. type='get'>
  60. <address xmlns='urn:xmpp:sic:1'/>
  61. </iq>
  62. ]]></example>
  63. <p>The server then returns an IQ-result containing an &lt;address/&gt; element containing an &lt;ip/&gt; element specifying the client's external IP address and, optionally, a &lt;port/&gt; element specifying the client's external port.</p>
  64. <example caption="Server returns IP address and port"><![CDATA[
  65. <iq id='ik2s7159'
  66. to='romeo@montague.lit/orchard'
  67. type='result'>
  68. <address xmlns='urn:xmpp:sic:1'>
  69. <ip></ip>
  70. <port>12345</port>
  71. </iq>
  72. ]]></example>
  73. <p>Note that the IP address could be IPv4 or IPv6.</p>
  74. <example caption="Server returns IPv6 address"><![CDATA[
  75. <iq id='ik2s7159'
  76. to='romeo@montague.lit/orchard'
  77. type='result'>
  78. <address xmlns='urn:xmpp:sic:1'>
  79. <ip>2001:db8::9:1</ip>
  80. <port>12345</port>
  81. </address>
  82. </iq>
  83. ]]></example>
  84. </section1>
  85. <section1 topic='Determining Support' anchor='support'>
  86. <p>If an entity supports this protocol, it MUST report that by including a service discovery feature of "urn:xmpp:sic:1" in response to disco#info requests &NSNOTE;.</p>
  87. <example caption="Service discovery information request"><![CDATA[
  88. <iq from='romeo@montague.lit/orchard'
  89. id='ux71f395'
  90. to='montague.lit'
  91. type='get'>
  92. <query xmlns=''/>
  93. </iq>
  94. ]]></example>
  95. <example caption="Service discovery information response"><![CDATA[
  96. <iq from='montague.lit'
  97. id='ux71f395'
  98. to='romeo@montague.lit/orchard'
  99. type='result'>
  100. <query xmlns=''>
  101. <feature var='urn:xmpp:sic:1'/>
  102. </query>
  103. </iq>
  104. ]]></example>
  105. </section1>
  106. <section1 topic='Security Considerations' anchor='security'>
  107. <p>&xmppcore; specifies that client IP addresses shall not be made public. If a client requests its own IP address, that policy is not violated. However, a server MUST NOT return the IP address of another client (e.g., if a connected client sends a SIC request to the bare JID of another user); instead, it MUST return a &forbidden; error.</p>
  108. </section1>
  109. <section1 topic='IANA Considerations' anchor='iana'>
  110. <p>This document requires no interaction with &IANA;.</p>
  111. </section1>
  112. <section1 topic='XMPP Registrar Considerations' anchor='registrar'>
  113. <section2 topic='Protocol Namespaces' anchor='registrar-ns'>
  114. <p>This specification defines the following XML namespace:</p>
  115. <ul>
  116. <li>urn:xmpp:sic:1</li>
  117. </ul>
  118. <p>Upon advancement of this specification from a status of Experimental to a status of Draft, the &REGISTRAR; shall add the foregoing namespace to the registry located at &NAMESPACES;, as described in Section 4 of &xep0053;.</p>
  119. </section2>
  120. <section2 topic='Protocol Versioning' anchor='registrar-versioning'>
  121. &NSVER;
  122. </section2>
  123. </section1>
  124. <section1 topic='XML Schema' anchor='schema'>
  125. <code><![CDATA[
  126. <?xml version='1.0' encoding='UTF-8'?>
  127. <xs:schema
  128. xmlns:xs=''
  129. targetNamespace='urn:xmpp:sic:1'
  130. xmlns='urn:xmpp:sic:1'
  131. elementFormDefault='qualified'>
  132. <xs:element name='address' type='xs:string'/>
  133. <xs:element name='address'>
  134. <xs:complexType>
  135. <xs:sequence minOccurs='0'>
  136. <xs:element name='ip' maxOccurs='unbounded' type='xs:string'/>
  137. <xs:element name='port' maxOccurs='unbounded' type='xs:positiveInteger' use='optional'/>
  138. </xs:sequence>
  139. </xs:complexType>
  140. </xs:element>
  141. </xs:schema>
  142. ]]></code>
  143. </section1>
  144. <section1 topic='Acknowledgements' anchor='ack'>
  145. <p>Thanks to Joe Hildebrand for his feedback.</p>
  146. </section1>
  147. </xep>