SYNCTHING-LOCALDISCO(7)            Syncthing           SYNCTHING-LOCALDISCO(7)



NNAAMMEE
       syncthing-localdisco - Local Discovery Protocol v4

MMOODDEE OOFF OOPPEERRAATTIIOONN
       Each participating device periodically sends an Announcement packet. It
       also keeps a table of the announcements it has seen. There is no way to
       solicit a reply; the only message type is Announcement.

       On  multihomed  hosts  the  announcement packets should be sent on each
       interface on which Syncthing will accept connections.

       The announcement packet is sent over UDP.

       For IPv4, the Announcement packet is broadcast either to the  link-spe‐
       cific broadcast address, or to the generic link-local broadcast address
       225555..225555..225555..225555, with destination port 21027.

       For IPv6,  the  Announcement  packet  is  multicast  to  the  transient
       link-local multicast address ffff1122::::88338844, with destination port 21027.

       It  is recommended that local discovery Announcement packets be sent on
       a 30 to 60 second interval, possibly with immediate transmissions  when
       a  previously  unknown  device  is discovered or a device has restarted
       (see the iinnssttaannccee__iidd field).

DDEEVVIICCEE IIDD
       The device ID is the SHA-256 (32 bytes) of the  device  X.509  certifi‐
       cate. See device-ids in the Syncthing documentation.

AANNNNOOUUNNCCEEMMEENNTT PPAACCKKEETT
       The Announcement packet has the following structure:

           0                   1                   2                   3
           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
          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          |                             Magic                             |
          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
          /                                                               /
          \                       Announce Message                        \
          /                                                               /
          +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

       There  is no explicit length field as the length is given by the length
       of the discovery announcement packet itself.

       The Magic field is a 32 bit word  representing  0x2EA7D90B  in  network
       (big  endian) byte order. It identifies the packet as being a Syncthing
       discovery protocol packet.

       The Announce Message contents are in protocol buffer format  using  the
       following schema:

          message Announce {
              bytes           id          = 1;
              repeated string addresses   = 2;
              int64           instance_id = 3;
          }

       The iidd field contains the Device ID of the sending device.

       The  aaddddrreesssseess  field contains a list of addresses where the device can
       be contacted. Direct connections will typically have the ttccpp:://// scheme.
       Relay connections will typically use the rreellaayy:://// scheme.

       When   interpreting   addresses  with  an  unspecified  address,  e.g.,
       ttccpp::////00..00..00..00::2222000000 or ttccpp::////::4422442244, the source address of the  discov‐
       ery announcement is to be used.

       The  iinnssttaannccee__iidd  field  is  set  to  a randomly generated ID at client
       startup. Other devices on the network can detect a change  in  instance
       ID  between  two  announces and conclude that the announcing device has
       restarted.

AAUUTTHHOORR
       The Syncthing Authors

CCOOPPYYRRIIGGHHTT
       2014-2019, The Syncthing Authors



v1.19.2                          Apr 05, 2022          SYNCTHING-LOCALDISCO(7)
