5 Commits
Author SHA1 Message Date
Jakob Borg d21f613102 wip
Signed-off-by: Jakob Borg <[email protected]>
2026-11-13 07:38:50 +01:00
Jakob Borg 3f795834db feat: Peer-to-peer discovery (fixes #3388)
This implements a new peer-to-peer-based discovery protocol.

- The DHT is based on libp2p (of IPFS etc) and constitutes a new,
  separate Syncthing-specific network. It does not piggyback on any
  existing non-Syncthing nodes out there.
- It uses existing device IDs as the keys, and publishes discovery
  documents that include the device certificate and are signed by the
  same. This enables validation that the discovery data is _for_ the
  right device ID, as well as published _by_ that device.
- The DHT runs on the QUIC socket, so it shares UPnP/NAT-PMP whole
  punches and STUN discovery. (Unless the QUIC listener is disabled,
  then it runs on an ephemeral socket and can effectively do only
  queries and not participate as a full DHT node.)
- There is a hardcoded default pointing to three bootstrap nodes hosted
  in the usual manner.
- Currently it's strictly additive -- it runs separately and in
  parallell with the usual global discovery. Once proven and scaled, it
  will gradually take over the duties of the global discovery.
- There is a new command line tool `stdht` which just runs a DHT node to
  assist with discovery (the bootstrap nodes are this).

The diff is large and terrifying, but that's how it is.

Signed-off-by: Jakob Borg <[email protected]>
2026-11-05 22:43:18 +01:00
Jakob Borg 8ea09c0094 chore: style fixes from go fix (#10846)
Just `go fix ./...`

Signed-off-by: Jakob Borg <[email protected]>
2026-08-05 20:23:22 +02:00
Jakob Borg dc2a77ab8e chore: build with Go 1.26; use Go 1.25 features (#10570)
WaitGroup.Go and built-in gomaxprocs handling.

Signed-off-by: Jakob Borg <[email protected]>
2026-02-11 10:41:38 +00:00
Jakob Borg d4770ddc77 chore(cmd): clean up commands (#9705)
Move infrastructure related commands to under `cmd/infra` and
development stuff to `cmd/dev`. The default build command builds the
regular user facing binaries: syncthing, stdiscosrv, and strelaysrv.
2024-09-21 09:04:22 +02:00