syncthing/lib/relay/protocol
entity0xfe ad986f372d
cmd/strelaysrv: Add optional auth token (fixes #3987) (#8561)
* implement authentication via token for relaysrv

Make replaysrv check for a token before allowing clients to
join. The token can be set via the replay-uri.

* fix formatting

* key composite literal

* do not error out if auth material is provided but not needed

* remove unused method receiver

* clean up unused parameter in functions

* cleaner token handling, disable joining the pool if token is set.

* Keep backwards compatibility with older clients.

In prior versions of the protocol JoinRelayRequest did not have a
token field. Trying to unmarshal such a request will result in
an error. Return an empty JoinRelayRequest, that is a request
without token, instead.

Co-authored-by: entity0xfe <entity0xfe@my.domain>
2022-10-01 20:41:02 +01:00
..
empty_test.go all: Update license url to https (ref #3976) 2017-02-09 08:04:16 +01:00
packets.go cmd/strelaysrv: Add optional auth token (fixes #3987) (#8561) 2022-10-01 20:41:02 +01:00
packets_xdr.go cmd/strelaysrv: Add optional auth token (fixes #3987) (#8561) 2022-10-01 20:41:02 +01:00
protocol.go cmd/strelaysrv: Add optional auth token (fixes #3987) (#8561) 2022-10-01 20:41:02 +01:00