Skip to content

fix(relay): document RelayFull message (fixes #880) #909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 26, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 19 additions & 3 deletions specs/relay-v1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ Temporary protocol submode
^^^^^^^^^^^^^^^^^^^^^^^^^^

A temporary protocol submode begins with ConnectRequest message, to which the
relay responds with either ResponseNotFound if the device the client it is after
is not available, or with a SessionInvitation, which contains the unique session
relay responds with ResponseNotFound if the device the client it is after
is not available, with a RelayFull if the relay has reached its limits,
or with a SessionInvitation, which contains the unique session
key which then can be used to establish a connection in session mode.

The connection is terminated immediately after that.
Expand Down Expand Up @@ -125,11 +126,13 @@ Session mode
The first and only message the client sends in the session mode is the
JoinSessionRequest message which contains the session key identifying which
session you are trying to join. The relay responds with one of the following
Response messages:
messages:

1. ResponseNotFound - Session key is invalid
2. ResponseAlreadyConnected - Session is full (both sides already connected)
3. ResponseSuccess - You have successfully joined the session
4. RelayFull - Relay limits are too strict for you to be able to join the session.
The relay immediately terminates the connection after sending this.

After the successful response, all the bytes written and received will be
relayed between the two devices in the session directly.
Expand Down Expand Up @@ -372,6 +375,19 @@ SessionInvitation message (Type = 6)
the invitation which is sent to the other device, so that there is always
one client socket, and one server socket.

RelayFull message (Type = 7)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

::

0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+


struct RelayFull {
}

How Syncthing uses relays, and general security
-----------------------------------------------

Expand Down