syncthing-globaldisco.7 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-GLOBALDISCO" "7" "Feb 11, 2018" "v0.14" "Syncthing"
  4. .SH NAME
  5. syncthing-globaldisco \- Global Discovery Protocol v3
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH ANNOUNCEMENTS
  34. .sp
  35. A device should announce itself at startup. It does this by an HTTPS POST to
  36. the announce server URL. Standard discovery currently requires the path to be
  37. “/v2/”, yet this can be up to the discovery server. The POST has a JSON payload
  38. listing connection addresses (if any):
  39. .INDENT 0.0
  40. .INDENT 3.5
  41. .sp
  42. .nf
  43. .ft C
  44. {
  45. addresses: ["tcp://192.0.2.45:22000", "tcp://:22202", "relay://192.0.2.99:22028"],
  46. }
  47. .ft P
  48. .fi
  49. .UNINDENT
  50. .UNINDENT
  51. .sp
  52. It’s OK for the “addresses” field to be either the empty list (\fB[]\fP),
  53. \fBnull\fP, or missing entirely. An announcement with the field missing
  54. or empty is however not useful…
  55. .sp
  56. Any empty or unspecified IP addresses (i.e. addresses like \fBtcp://:22000\fP,
  57. \fBtcp://0.0.0.0:22000\fP, \fBtcp://[::]:22000\fP) are interpreted as referring to
  58. the source IP address of the announcement.
  59. .sp
  60. The device ID of the announcing device is not part of the announcement.
  61. Instead, the server requires that the client perform certificate
  62. authentication. The device ID is deduced from the presented certificate.
  63. .sp
  64. The server response is empty, with code \fB204\fP (No Content) on success. If no
  65. certificate was presented, status \fB403\fP (Forbidden) is returned. If the
  66. posted data doesn’t conform to the expected format, \fB400\fP (Bad Request) is
  67. returned.
  68. .sp
  69. In successful responses, the server may return a \fBReannounce\-After\fP header
  70. containing the number of seconds after which the client should perform a new
  71. announcement.
  72. .sp
  73. In error responses, the server may return a \fBRetry\-After\fP header containing
  74. the number of seconds after which the client should retry.
  75. .sp
  76. Performing announcements significantly more often than indicated by the
  77. \fBReannounce\-After\fP or \fBRetry\-After\fP headers may result in the client being
  78. throttled. In such cases the server may respond with status code \fB429\fP (Too
  79. Many Requests).
  80. .SH QUERIES
  81. .sp
  82. Queries are performed as HTTPS GET requests to the announce server URL. The
  83. requested device ID is passed as the query parameter “device”, in canonical
  84. string form, i.e. \fBhttps://announce.syncthing.net/v2/?device=ABC12345\-....\fP
  85. .sp
  86. Successful responses will have status code \fB200\fP (OK) and carry a JSON payload
  87. of the same format as the announcement above. The response will not contain
  88. empty or unspecified addresses.
  89. .sp
  90. If the “device” query parameter is missing or malformed, the status code 400
  91. (Bad Request) is returned.
  92. .sp
  93. If the device ID is of a valid format but not found in the registry, 404 (Not
  94. Found) is returned.
  95. .sp
  96. If the client has exceeded a rate limit, the server may respond with 429 (Too
  97. Many Requests).
  98. .SH AUTHOR
  99. The Syncthing Authors
  100. .SH COPYRIGHT
  101. 2014-2018, The Syncthing Authors
  102. .\" Generated by docutils manpage writer.
  103. .