Skip to content

Commit

Permalink
Server protocol: Advertize relay servers in welcome message
Browse files Browse the repository at this point in the history
  • Loading branch information
piegamesde committed May 7, 2021
1 parent fcc893d commit 4affa6f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,20 @@ and handle them accordingly, if present:
future version of the protocol requires a rate-limiting CAPTCHA ticket or
other authorization record, the server can send `error` (explaining the
requirement) if it does not see this ticket arrive before the `bind`.
* `relays`: An advertizement list of relay servers. It is a JSON list of which each
entry may look like this:
```json
{
"url": "tcp:myrelay.example.org:12345",
"country": "Italy",
"continent": "EU",
}
```
The only mandatory key is `url`, al others are optional information to help the client
choose an appropriate one. Further keys may be added in the future. Clients must not
expect the protocol to be `tcp` (expect websockets support in the future). Clients
should make a preselection of viable relay servers (which may include entries from other
sources as well), and randomly select one or two.

The first thing each client sends to the server, immediately after receiving
the welcome message, is a `bind` message. This specifies the
Expand Down

0 comments on commit 4affa6f

Please sign in to comment.