Skip to content

Commit 40f8418

Browse files
authored
users/strelaysrv: Document new access control, update options (#799)
Documentation for PR syncthing/syncthing#8561 Also took the opportunity to document missing flags `-pprof` and `-version`
1 parent cf42cb1 commit 40f8418

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

users/strelaysrv.rst

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ Synopsis
99
::
1010

1111
strelaysrv [-debug] [-ext-address=<address>] [-global-rate=<bytes/s>] [-keys=<dir>] [-listen=<listen addr>]
12-
[-message-timeout=<duration>] [-nat] [-nat-lease=<duration> [-nat-renewal=<duration>]
12+
[-message-timeout=<duration>] [-nat] [-nat-lease=<duration>] [-nat-renewal=<duration>]
1313
[-nat-timeout=<duration>] [-network-timeout=<duration>] [-per-session-rate=<bytes/s>]
14-
[-ping-interval=<duration>] [-pools=<pool addresses>] [-protocol=<string>] [-provided-by=<string>]
15-
[-status-srv=<listen addr>]
14+
[-ping-interval=<duration>] [-pools=<pool addresses>] [-pprof] [-protocol=<string>]
15+
[-provided-by=<string>] [-status-srv=<listen addr>] [-token=<string>] [-version]
1616

1717
Description
1818
-----------
@@ -89,6 +89,10 @@ Options
8989
"https://relays.syncthing.net/endpoint"). Blank to disable announcement to
9090
a pool, thereby remaining a private relay.
9191

92+
.. cmdoption:: -pprof
93+
94+
Enable the built in profiling on the status server
95+
9296
.. cmdoption:: -protocol=<string>
9397

9498
Protocol used for listening. 'tcp' for IPv4 and IPv6, 'tcp4' for IPv4, 'tcp6' for IPv6 (default "tcp").
@@ -102,6 +106,14 @@ Options
102106
Listen address for status service (blank to disable) (default ":22070").
103107
Status service is used by the relay pool server UI for displaying stats (data transferred, number of clients, etc.)
104108

109+
.. cmdoption:: -token=<string>
110+
111+
Token to restrict access to the relay (optional). Disables joining any pools.
112+
113+
.. cmdoption:: -version
114+
115+
Show version
116+
105117
Installing
106118
~~~~~~~~~~
107119

@@ -205,6 +217,20 @@ Runtime ``iptables`` rules to allow access to the default ports::
205217
206218
Please consult Linux distribution documentation to persist firewall rules.
207219

220+
Access control for private relays
221+
---------------------------------
222+
223+
.. versionadded:: 1.22.1
224+
225+
Private relays can be configured to only accept connections from peers in possession of a shared secret.
226+
To configure this use the ``-token`` option:
227+
228+
$ strelaysrv -token=mySecretToken
229+
230+
Then configure your Syncthing devices to send the token when joining the relay::
231+
232+
relay://<host name|IP>[:port]/?id=<relay device ID>&token=mySecretToken
233+
208234
See Also
209235
--------
210236

0 commit comments

Comments
 (0)