Skip to content

Commit f78fcee

Browse files
authored
Merge branch 'main' into session-mode-example
2 parents ae7b2e9 + 34de465 commit f78fcee

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

events/loginattempt.rst

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,36 @@ LoginAttempt
33

44
When authentication is enabled for the GUI, this event is emitted on every
55
login attempt. If either the username or password are incorrect, ``success``
6-
is false and in any case the given username is returned. The included
7-
remote address concerns the immediate connecting host, which may not be the
8-
origin of the request, but e.g. a reverse proxy.
6+
is false and in any case the given username is returned.
97

108
.. code-block:: json
119
1210
{
1311
"id" : 187,
1412
"time" : "2017-03-07T00:19:24.420386143+01:00",
1513
"data" : {
16-
"remoteAddress" : "127.0.0.1:55530",
14+
"remoteAddress" : "127.0.0.1",
15+
"username" : "somename",
16+
"success" : false
17+
},
18+
"type" : "LoginAttempt",
19+
"globalID" : 195
20+
}
21+
22+
If the ``X-Forwared-For`` header is present and the connecting host is
23+
either on ``localhost`` or on the same LAN, it will be treated as a reverse
24+
proxy. In this case, the ``remoteAddress`` field is filled with the leftmost
25+
IP address from the header, and the additional ``proxy`` field retains the
26+
original IP of the connecting host.
27+
28+
.. code-block:: json
29+
30+
{
31+
"id" : 187,
32+
"time" : "2017-03-07T00:19:24.420386143+01:00",
33+
"data" : {
34+
"proxy" : "127.0.0.1",
35+
"remoteAddress" : "192.168.178.10",
1736
"username" : "somename",
1837
"success" : false
1938
},

users/config.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,8 +1253,9 @@ The ``options`` element contains all other global configuration options.
12531253
.. option:: options.stunServer
12541254
:aliases: options.stunServers
12551255

1256-
Server to be used for STUN, given as ip:port. The keyword ``default`` gets
1257-
expanded to a set of public STUN servers.
1256+
Server to use for STUN, given as ip:port. The keyword ``default`` gets
1257+
expanded to a set of public STUN servers, with preference given to those
1258+
hosted by the Syncthing project.
12581259

12591260
To configure multiple servers, you can either: repeat ``<stunServer>`` tags
12601261
in the configuration file or enter several servers separated by commas in

0 commit comments

Comments
 (0)