syncthing/man/syncthing-globaldisco.7

104 lines
3.5 KiB
Groff
Raw Normal View History

2015-10-22 06:14:43 +00:00
.\" Man page generated from reStructuredText.
.
.TH "SYNCTHING-GLOBALDISCO" "7" "Aug 08, 2018" "v0.14" "Syncthing"
2015-10-22 06:14:43 +00:00
.SH NAME
syncthing-globaldisco \- Global Discovery Protocol v3
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH ANNOUNCEMENTS
.sp
A device should announce itself at startup. It does this by an HTTPS POST to
2016-06-03 11:02:27 +00:00
the announce server URL. Standard discovery currently requires the path to be
2017-11-29 06:45:17 +00:00
“/v2/”, yet this can be up to the discovery server. The POST has a JSON payload
2016-06-03 11:02:27 +00:00
listing connection addresses (if any):
2015-10-22 06:14:43 +00:00
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
{
2016-06-03 11:02:27 +00:00
addresses: ["tcp://192.0.2.45:22000", "tcp://:22202", "relay://192.0.2.99:22028"],
2015-10-22 06:14:43 +00:00
}
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
2017-11-29 06:45:17 +00:00
Its OK for the “addresses” field to be either the empty list (\fB[]\fP),
2016-06-03 11:02:27 +00:00
\fBnull\fP, or missing entirely. An announcement with the field missing
2017-11-29 06:45:17 +00:00
or empty is however not useful…
2015-10-22 06:14:43 +00:00
.sp
Any empty or unspecified IP addresses (i.e. addresses like \fBtcp://:22000\fP,
\fBtcp://0.0.0.0:22000\fP, \fBtcp://[::]:22000\fP) are interpreted as referring to
the source IP address of the announcement.
.sp
The device ID of the announcing device is not part of the announcement.
Instead, the server requires that the client perform certificate
authentication. The device ID is deduced from the presented certificate.
.sp
The server response is empty, with code \fB204\fP (No Content) on success. If no
certificate was presented, status \fB403\fP (Forbidden) is returned. If the
2017-11-29 06:45:17 +00:00
posted data doesnt conform to the expected format, \fB400\fP (Bad Request) is
2015-10-22 06:14:43 +00:00
returned.
.sp
In successful responses, the server may return a \fBReannounce\-After\fP header
2015-10-22 06:14:43 +00:00
containing the number of seconds after which the client should perform a new
announcement.
.sp
In error responses, the server may return a \fBRetry\-After\fP header containing
the number of seconds after which the client should retry.
.sp
Performing announcements significantly more often than indicated by the
\fBReannounce\-After\fP or \fBRetry\-After\fP headers may result in the client being
throttled. In such cases the server may respond with status code \fB429\fP (Too
Many Requests).
.SH QUERIES
.sp
Queries are performed as HTTPS GET requests to the announce server URL. The
2017-11-29 06:45:17 +00:00
requested device ID is passed as the query parameter “device”, in canonical
2016-06-03 11:02:27 +00:00
string form, i.e. \fBhttps://announce.syncthing.net/v2/?device=ABC12345\-....\fP
2015-10-22 06:14:43 +00:00
.sp
Successful responses will have status code \fB200\fP (OK) and carry a JSON payload
2015-10-22 06:14:43 +00:00
of the same format as the announcement above. The response will not contain
empty or unspecified addresses.
.sp
2017-11-29 06:45:17 +00:00
If the “device” query parameter is missing or malformed, the status code 400
2015-10-22 06:14:43 +00:00
(Bad Request) is returned.
.sp
If the device ID is of a valid format but not found in the registry, 404 (Not
Found) is returned.
.sp
If the client has exceeded a rate limit, the server may respond with 429 (Too
Many Requests).
.SH AUTHOR
The Syncthing Authors
.SH COPYRIGHT
2018-02-07 06:45:17 +00:00
2014-2018, The Syncthing Authors
2015-10-22 06:14:43 +00:00
.\" Generated by docutils manpage writer.
.