| 1 | <?xml version="1.0" encoding="utf-8" ?> |
|---|
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|---|
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
|---|
| 4 | <head> |
|---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
|---|
| 6 | <meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" /> |
|---|
| 7 | <title></title> |
|---|
| 8 | <link rel="stylesheet" href="css/screen.css" type="text/css" /> |
|---|
| 9 | </head> |
|---|
| 10 | <body> |
|---|
| 11 | <div class="document"> |
|---|
| 12 | |
|---|
| 13 | <div id="upper" class="clear"> |
|---|
| 14 | <div id="wrap"> |
|---|
| 15 | <div id="header"> |
|---|
| 16 | <h1><a href="./index.html">BitTorrent<span>.org</span></a></h1> |
|---|
| 17 | </div> |
|---|
| 18 | <div id="nav"> |
|---|
| 19 | <ul> |
|---|
| 20 | <li><a href="./index.html">Home</a></li> |
|---|
| 21 | <li><a href="./introduction.html">For Users</a></li> |
|---|
| 22 | <li><span>For Developers</span></li> |
|---|
| 23 | <!-- <li><a href="./blog">Blog</a></li> --> |
|---|
| 24 | <li><a href="./donate.html">Donate!</a></li> |
|---|
| 25 | </ul> |
|---|
| 26 | </div> <!-- nav --> |
|---|
| 27 | <!-- ### Begin Content ### --> |
|---|
| 28 | <div id="second"> |
|---|
| 29 | |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | <div class="section"> |
|---|
| 33 | <h1><a id="ipv6-tracker-extension" name="ipv6-tracker-extension">IPv6 tracker extension</a></h1> |
|---|
| 34 | <p>This extension extends the tracker response to better support IPv6 peers as |
|---|
| 35 | well as defines a way for multi homed machines to announce multiple addresses |
|---|
| 36 | at the same time. This proposal addresses the use case where peers |
|---|
| 37 | are either on an IPv4 network running <a class="reference" href="https://www.microsoft.com/technet/network/ipv6/teredo.mspx">Teredo</a> or peers are on |
|---|
| 38 | an IPv6 network with an IPv4 tunnel interface.</p> |
|---|
| 39 | <p>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", |
|---|
| 40 | "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to |
|---|
| 41 | be interpreted as described in IETF <a class="reference" href="http://tools.ietf.org/html/rfc2119">RFC 2119</a>.</p> |
|---|
| 42 | <div class="section"> |
|---|
| 43 | <h2><a id="announce-parameter" name="announce-parameter">announce parameter</a></h2> |
|---|
| 44 | <p>The client MAY add an <tt class="docutils literal"><span class="pre">&ipv6=</span></tt> parameter to the HTTP GET request it sends |
|---|
| 45 | to the tracker. The value is either an IPv6 endpoint (address and port) or |
|---|
| 46 | just an IPv6 address. In the case where only an address is supplied, the IPv6 |
|---|
| 47 | port is assumed to be the same as specified by the <tt class="docutils literal"><span class="pre">&port=</span></tt> parameter.</p> |
|---|
| 48 | <p>The tracker SHOULD perform a NAT check on the IPv6 endpoint.</p> |
|---|
| 49 | <p>In case the client contacts the tracker on an IPv6 interface, it may add |
|---|
| 50 | an <tt class="docutils literal"><span class="pre">&ipv4=</span></tt> parameter with its IPv4 address or endpoint. The value MUST |
|---|
| 51 | be either an IPv4 endpoint (address and port) or just an IPv4 address. If only |
|---|
| 52 | an address is supplied, the port is assumed to be the same as the <tt class="docutils literal"><span class="pre">&port=</span></tt> |
|---|
| 53 | parameter.</p> |
|---|
| 54 | <p>The endpoints are encoded as strings as defined by <a class="reference" href="http://tools.ietf.org/html/rfc2732">RFC 2732</a>.</p> |
|---|
| 55 | <p>If both an <tt class="docutils literal"><span class="pre">&ipv4=</span></tt> and an <tt class="docutils literal"><span class="pre">&ipv6=</span></tt> parameter are specified, the tracker |
|---|
| 56 | MAY ignore the address family that is the same as the source address of the |
|---|
| 57 | request. i.e. If the client connects to the tracker with an IPv4 source |
|---|
| 58 | address, the tracker MAY ignore any <tt class="docutils literal"><span class="pre">&ipv4=</span></tt> address and if the client |
|---|
| 59 | connects to the tracker with an IPv6 source address, the tracker MAY ignore |
|---|
| 60 | any <tt class="docutils literal"><span class="pre">&ipv6=</span></tt> parameter.</p> |
|---|
| 61 | </div> |
|---|
| 62 | <div class="section"> |
|---|
| 63 | <h2><a id="announce-response" name="announce-response">announce response</a></h2> |
|---|
| 64 | <p>In case the tracker does not support the <tt class="docutils literal"><span class="pre">compact</span></tt> response, no change is |
|---|
| 65 | necessary. Since the original <tt class="docutils literal"><span class="pre">peers</span></tt> response returns peer endpoints in |
|---|
| 66 | their expanded string form, IPv6 addresses can be passed back this way.</p> |
|---|
| 67 | <p>In case a compact response is requested, the tracker MAY add another key |
|---|
| 68 | to the response; <tt class="docutils literal"><span class="pre">peers6</span></tt>. This key has the same layout as <tt class="docutils literal"><span class="pre">peers</span></tt> in |
|---|
| 69 | compact mode, but instead of using 6 bytes per endpoint, 18 bytes are used. |
|---|
| 70 | peers6 contains address-port pairs where the addresses are all IPv6.</p> |
|---|
| 71 | </div> |
|---|
| 72 | <div class="section"> |
|---|
| 73 | <h2><a id="examples" name="examples">examples</a></h2> |
|---|
| 74 | <p>Example announce string with <tt class="docutils literal"><span class="pre">2001::53aa:64c:0:7f83:bc43:dec9</span></tt> as IPv6 |
|---|
| 75 | address:</p> |
|---|
| 76 | <pre class="literal-block"> |
|---|
| 77 | GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&info_hash=aaaaaaaaaaaaaaaaaaaa |
|---|
| 78 | &port=6881&left=0&downloaded=100&uploaded=0&compact=1 |
|---|
| 79 | &ipv6=2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9 |
|---|
| 80 | </pre> |
|---|
| 81 | <p>Example announce string with <tt class="docutils literal"><span class="pre">[2001::53aa:64c:0:7f83:bc43:dec9]:6882</span></tt> as IPv6 endpoint:</p> |
|---|
| 82 | <pre class="literal-block"> |
|---|
| 83 | GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&info_hash=aaaaaaaaaaaaaaaaaaaa |
|---|
| 84 | &port=6881&left=0&downloaded=100&uploaded=0&compact=1 |
|---|
| 85 | &ipv6=%5B2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9%5D%3A6882 |
|---|
| 86 | </pre> |
|---|
| 87 | <p>Example announce string with <tt class="docutils literal"><span class="pre">2001::53aa:64c:0:7f83:bc43:dec9</span></tt> as IPv6 |
|---|
| 88 | address and <tt class="docutils literal"><span class="pre">261.52.89.12</span></tt> as IPv4 address:</p> |
|---|
| 89 | <pre class="literal-block"> |
|---|
| 90 | GET /announce?peer_id=aaaaaaaaaaaaaaaaaaaa&info_hash=aaaaaaaaaaaaaaaaaaaa |
|---|
| 91 | &port=6881&left=0&downloaded=100&uploaded=0&compact=1 |
|---|
| 92 | &ipv6=2001%3A%3A53Aa%3A64c%3A0%3A7f83%3Abc43%3Adec9&ipv4=261.52.89.12 |
|---|
| 93 | </pre> |
|---|
| 94 | <p>Example response:</p> |
|---|
| 95 | <pre class="literal-block"> |
|---|
| 96 | d8:intervali1800e5:peers6:iiiipp6:peers618:iiiiiiiiiiiiiiiippe |
|---|
| 97 | </pre> |
|---|
| 98 | </div> |
|---|
| 99 | <div class="section"> |
|---|
| 100 | <h2><a id="rationale" name="rationale">rationale</a></h2> |
|---|
| 101 | <p>The naming of <tt class="docutils literal"><span class="pre">peers6</span></tt> is chosen not to collide with the current <tt class="docutils literal"><span class="pre">peers</span></tt> |
|---|
| 102 | response and to be backwards compatible. It is also a simple addition to the |
|---|
| 103 | current response, using the same encoding.</p> |
|---|
| 104 | </div> |
|---|
| 105 | <div class="section"> |
|---|
| 106 | <h2><a id="authors" name="authors">authors</a></h2> |
|---|
| 107 | <div class="line-block"> |
|---|
| 108 | <div class="line"><a class="reference" href="mailto:greg%40bittorrent.com">Greg Hazel</a></div> |
|---|
| 109 | <div class="line"><a class="reference" href="mailto:arvid%40bittorrent.com">Arvid Norberg</a></div> |
|---|
| 110 | </div> |
|---|
| 111 | </div> |
|---|
| 112 | </div> |
|---|
| 113 | |
|---|
| 114 | </div> |
|---|
| 115 | <div id="footer"> |
|---|
| 116 | <hr/> |
|---|
| 117 | <p>Copyright 2008 BitTorrent.org</p> |
|---|
| 118 | </div> |
|---|
| 119 | |
|---|
| 120 | </div> |
|---|
| 121 | </body> |
|---|
| 122 | </html> |
|---|