syncthing/cmd
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
..
stcompdirs all: Remove crypto/md5 (#7493) 2021-03-17 22:22:49 +01:00
stcrashreceiver all: Remove unused method receivers (#8462) 2022-07-28 17:32:45 +02:00
stdisco all: Implement suture v4-api (#6947) 2020-11-17 13:19:04 +01:00
stdiscosrv all: Fix various user-facing and non-user-facing typos (#8509) 2022-08-23 15:44:11 +02:00
stevents cmd/stevents: Add command line argument for event type filtering. (#7226) 2020-12-22 22:10:26 +01:00
stfileinfo all: Implement variable sized blocks (fixes #4807) 2018-04-16 19:08:50 +01:00
stfinddevice lib: Removal global connection registry (#8254) 2022-04-09 16:04:56 +02:00
stfindignored all: Unused args, retvals, assignments (#7926) 2021-09-08 00:11:16 +02:00
stgenfiles all: Revert the underscore sillyness 2019-02-02 12:16:27 +01:00
strelaypoolsrv lib/api: String comparisons 2022-07-28 18:49:44 +02:00
strelaysrv cmd/strelaysrv: Add optional auth token (fixes #3987) (#8561) 2022-10-01 20:41:02 +01:00
stsigtool all: Remove usage of deprecated io/ioutil (#7971) 2021-11-22 08:59:47 +01:00
stupgrades cmd/stupgrades: Generate appropriate upgrade data (fixes #5924) (#5960) 2019-08-16 10:04:10 +02:00
stvanity all: Simplify some method calls (#7499) 2021-03-17 23:12:26 +01:00
stwatchfile all: Remove crypto/md5 (#7493) 2021-03-17 22:22:49 +01:00
syncthing cmd/syncthing: Fix incorrect cli help text (#8557) 2022-09-26 22:52:33 +01:00
uraggregate cmd/uraggregate: Optimise queries (#7679) 2021-05-16 12:34:46 +01:00
ursrv all: Minor deprecation updates 2022-07-28 17:54:12 +02:00
.gitignore Remove reprecated st* utils 2014-07-01 12:20:25 +02:00