protocol-ext.txt 1.1 KB

12345678910111213141516171819202122232425262728
  1. There are two new GET parameters for the tracker in the latest
  2. release. They are -
  3. key=xxxx - this is like peer id, but it's only known to the client and the
  4. tracker. It allows clients to be behind dynamic IP. If a peer announced
  5. a key previously, then it's accepted if and only if it gives the same key
  6. again. If no key was given, then the fallback is checking that the IP
  7. hasn't changed. If the IP has changed, mainline currently will give a peer
  8. list but not change any data related to that peer, so that peers behind
  9. dynamic IP using old clients will continue to work okay. Currently
  10. mainline generates the value associated with key as eight random hex
  11. values, and the tracker accepts any string from clients.
  12. compact=1 - when a client sends this, the 'peers' return value is a single
  13. string whose length is a multiple of 6 rather than a dict. To extract peer
  14. information from the string, chop it into substrings of length 6. For each
  15. substring, the first four bytes are the IP and the last two are the port,
  16. encoded big-endian. This results in huge bandwidth savings.
  17. Everybody developing ports should implement these keys, they're very
  18. useful.
  19. -Bram