diff options
| -rw-r--r-- | 11.md | 24 |
1 files changed, 24 insertions, 0 deletions
| @@ -60,6 +60,30 @@ The relay MAY choose to publish its software version as a string attribute. The | |||
| 60 | Extra Fields | 60 | Extra Fields |
| 61 | ------------ | 61 | ------------ |
| 62 | 62 | ||
| 63 | ### Virtual Relays | ||
| 64 | |||
| 65 | Some relays want to expose "virtual" addresses to the same underlying dataset or other types of weird functionality. A basic example is a relay that may serve all notes under its `/` path, but only Italian notes under its `/it` path and only Japanese notes under its `/jp` path. In this case clients may use the virtual (`/jp` etc) paths when browsing the relay, for example; but in other situations, like when selecting relays for building a feed for some specific profile, clients should just want to connect to `/`. | ||
| 66 | |||
| 67 | ```json | ||
| 68 | { | ||
| 69 | "virtual_path": { | ||
| 70 | "is": true, | ||
| 71 | "canonical": "/", | ||
| 72 | "alternatives": [ | ||
| 73 | {"path": "/jp", "description": "only stuff in Japanese"}, | ||
| 74 | {"path": "/it", "description": "only stuff in Italian"}, | ||
| 75 | {"path": "/fr", "description": "whatever"}, | ||
| 76 | {"path": "/pt", "description": "blergh"} | ||
| 77 | ] | ||
| 78 | }, | ||
| 79 | ... | ||
| 80 | } | ||
| 81 | ``` | ||
| 82 | |||
| 83 | - `is`: this is `true` when the current path queried is a virtual path. | ||
| 84 | - `canonical`: this is the path that should be used when the client doesn't care about the virtual. | ||
| 85 | - `alternatives`: optionally, if a relay wants to announce its virtual paths, this may be useful sometimes. | ||
| 86 | |||
| 63 | ### Server Limitations | 87 | ### Server Limitations |
| 64 | 88 | ||
| 65 | These are limitations imposed by the relay on clients. Your client | 89 | These are limitations imposed by the relay on clients. Your client |