From 4affa6f390cb53f0306962322ed50d3ab99c2404 Mon Sep 17 00:00:00 2001 From: piegames Date: Sat, 8 May 2021 00:14:47 +0200 Subject: [PATCH] Server protocol: Advertize relay servers in welcome message --- server-protocol.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/server-protocol.md b/server-protocol.md index d8f32c6..1b36191 100644 --- a/server-protocol.md +++ b/server-protocol.md @@ -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