Skip to content

Commit 4affa6f

Browse files
committed
Server protocol: Advertize relay servers in welcome message
1 parent fcc893d commit 4affa6f

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

server-protocol.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,20 @@ and handle them accordingly, if present:
8686
future version of the protocol requires a rate-limiting CAPTCHA ticket or
8787
other authorization record, the server can send `error` (explaining the
8888
requirement) if it does not see this ticket arrive before the `bind`.
89+
* `relays`: An advertizement list of relay servers. It is a JSON list of which each
90+
entry may look like this:
91+
```json
92+
{
93+
"url": "tcp:myrelay.example.org:12345",
94+
"country": "Italy",
95+
"continent": "EU",
96+
}
97+
```
98+
The only mandatory key is `url`, al others are optional information to help the client
99+
choose an appropriate one. Further keys may be added in the future. Clients must not
100+
expect the protocol to be `tcp` (expect websockets support in the future). Clients
101+
should make a preselection of viable relay servers (which may include entries from other
102+
sources as well), and randomly select one or two.
89103

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

0 commit comments

Comments
 (0)