syncthing-localdisco.7 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "SYNCTHING-LOCALDISCO" "7" "May 08, 2024" "v1.27.7" "Syncthing"
  31. .SH NAME
  32. syncthing-localdisco \- Local Discovery Protocol v4
  33. .SH MODE OF OPERATION
  34. .sp
  35. Each participating device periodically sends an Announcement packet. It also
  36. keeps a table of the announcements it has seen. There is no way to solicit a
  37. reply; the only message type is Announcement.
  38. .sp
  39. On multihomed hosts the announcement packets should be sent on each interface
  40. on which Syncthing will accept connections.
  41. .sp
  42. The announcement packet is sent over UDP.
  43. .sp
  44. For IPv4, the Announcement packet is broadcast either to the link\-specific
  45. broadcast address, or to the generic link\-local broadcast address
  46. \fB255.255.255.255\fP, with destination port 21027.
  47. .sp
  48. For IPv6, the Announcement packet is multicast to the transient link\-local
  49. multicast address \fBff12::8384\fP, with destination port 21027.
  50. .sp
  51. It is recommended that local discovery Announcement packets be sent on a 30
  52. to 60 second interval, possibly with immediate transmissions when a
  53. previously unknown device is discovered or a device has restarted (see the
  54. \fBinstance_id\fP field).
  55. .SH DEVICE ID
  56. .sp
  57. The device ID is the SHA\-256 (32 bytes) of the device X.509 certificate. See
  58. \X'tty: link #device-ids'\fI\%Understanding Device IDs\fP\X'tty: link' in the Syncthing documentation.
  59. .SH ANNOUNCEMENT PACKET
  60. .sp
  61. The Announcement packet has the following structure:
  62. .INDENT 0.0
  63. .INDENT 3.5
  64. .sp
  65. .EX
  66. 0 1 2 3
  67. 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  68. +\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+
  69. | Magic |
  70. +\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+
  71. / /
  72. \e Announce Message \e
  73. / /
  74. +\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+\-+
  75. .EE
  76. .UNINDENT
  77. .UNINDENT
  78. .sp
  79. There is no explicit length field as the length is given by the length of
  80. the discovery announcement packet itself.
  81. .sp
  82. The Magic field is a 32 bit word representing 0x2EA7D90B in network (big
  83. endian) byte order. It identifies the packet as being a Syncthing discovery
  84. protocol packet.
  85. .sp
  86. The Announce Message contents are in protocol buffer format using the
  87. following schema:
  88. .INDENT 0.0
  89. .INDENT 3.5
  90. .sp
  91. .EX
  92. message Announce {
  93. bytes id = 1;
  94. repeated string addresses = 2;
  95. int64 instance_id = 3;
  96. }
  97. .EE
  98. .UNINDENT
  99. .UNINDENT
  100. .sp
  101. The \fBid\fP field contains the Device ID of the sending device.
  102. .sp
  103. The \fBaddresses\fP field contains a list of addresses where the device can be
  104. contacted. Direct connections will typically have the \fBtcp://\fP scheme.
  105. Relay connections will typically use the \fBrelay://\fP scheme.
  106. .sp
  107. When interpreting addresses with an unspecified address, e.g.,
  108. \fBtcp://0.0.0.0:22000\fP or \fBtcp://:42424\fP, the source address of the
  109. discovery announcement is to be used.
  110. .sp
  111. The \fBinstance_id\fP field is set to a randomly generated ID at client
  112. startup. Other devices on the network can detect a change in instance ID
  113. between two announces and conclude that the announcing device has restarted.
  114. .SH AUTHOR
  115. The Syncthing Authors
  116. .SH COPYRIGHT
  117. 2014-2019, The Syncthing Authors
  118. .\" Generated by docutils manpage writer.
  119. .