From c3af3fcfab1e301014093baaf0081aadc85244b5 Mon Sep 17 00:00:00 2001 From: Ari Archer Date: Sat, 24 Feb 2024 13:07:26 +0200 Subject: [PATCH] add network.md, remove useless subdomains from readme Signed-off-by: Ari Archer --- .well-known/network/server.json | 7 +- .well-known/network/services.json | 6 -- NETWORK.md | 118 ++++++++++++++++++++++++++++++ README.md | 9 +-- 4 files changed, 123 insertions(+), 17 deletions(-) create mode 100644 NETWORK.md diff --git a/.well-known/network/server.json b/.well-known/network/server.json index d3fb5cd..8fd85be 100644 --- a/.well-known/network/server.json +++ b/.well-known/network/server.json @@ -17,15 +17,16 @@ "website": "https://ari.lt/", "role": "owner", "matrix": "@ari:ari.lt", - "xmpp": "ari@ari.lt" + "xmpp": "ari@ari.lt", + "of": ["*"] }, { "name": "Sininenkissa", "email": "sininenkissa@ari.lt", - "website": null, "role": "admin", "matrix": "@sininenkissa:ari.lt", - "xmpp": "sininenkissa@ari.lt" + "xmpp": "sininenkissa@ari.lt", + "of": ["*"] } ], "name": "Ari::web -> Server", diff --git a/.well-known/network/services.json b/.well-known/network/services.json index 1163c79..fc70fb0 100644 --- a/.well-known/network/services.json +++ b/.well-known/network/services.json @@ -14,7 +14,6 @@ "description": "Vim or Emacs?", "license": "GPL-3.0-or-later", "public": true, - "extra": null, "keywords": ["ari-web", "poll", "statistics", "vim", "emacs"], "privacy": "https://ari.lt/privacy", "terms": "https://ari.lt/tos" @@ -44,7 +43,6 @@ "description": "Cryptpad instance: End-to-end encrypted collabware, hosted by ari-web", "license": "MIT", "public": true, - "extra": null, "keywords": ["ari-web", "e2ee", "cryptpad", "collabware"], "privacy": "https://ari.lt/privacy", "terms": "https://ari.lt/tos" @@ -64,7 +62,6 @@ "description": "Ari-web roundcube mail instance", "license": "MIT", "public": true, - "extra": null, "keywords": [ "ari-web", "email", @@ -80,7 +77,6 @@ "description": "Schildichat Matrix client instance by ari-web", "license": "MIT", "public": true, - "extra": null, "keywords": ["ari-web", "schildichat", "schildi", "matrix client"], "privacy": "https://ari.lt/matrix", "terms": "https://ari.lt/matrix" @@ -90,7 +86,6 @@ "description": "Cinny Matrix client instance by ari-web", "license": "MIT", "public": true, - "extra": null, "keywords": ["ari-web", "cinny", "matrix client"], "privacy": "https://ari.lt/matrix", "terms": "https://ari.lt/matrix" @@ -100,7 +95,6 @@ "description": "Ari-web privatebin instance: End-to-end encrypted pastebin", "license": "MIT", "public": true, - "extra": null, "keywords": ["ari-web", "privatebin", "pastebin", "e2ee"], "privacy": "https://ari.lt/privacy", "terms": "https://ari.lt/tos" diff --git a/NETWORK.md b/NETWORK.md new file mode 100644 index 0000000..3bd55f2 --- /dev/null +++ b/NETWORK.md @@ -0,0 +1,118 @@ +# The network protocol + +The network protocol consists of 2 different files: + +- `.well-known/netowrk/server.json` - defines the server information +- `.well-known/netowrk/services.json` - defines the services information + +All the servers and services must support HTTPS. + +## Server + +The server file, `.well-known/netowrk/server.json`, has the following structure: + +```json +{ + "server": "us.ari.lt", + "domain": "ari.lt", + "description": "Ari-web server", + "keywords": [...], + "staff": [ + {"name": "Ari Archer", "email": "ari@ari.lt", "website": "https://ari.lt/", "role": "owner", "matrix": "@ari:ari.lt", "xmpp": "ari@ari.lt", "of": ["*"]}, + {..., "xmpp": "meow@ari.lt", "of": "xmpp.ari.lt"}, + ... + ], + "name": "Ari::web -> Server", + "privacy": "https://ari.lt/privacy", + "terms": "https://ari.lt/tos", + "affiliated-with": ["pain.agency", "h2.gay"], + "hardware": { + "ram": 16, + "cpu": 6, + "storage": 400, + "network": 800 + } +} +``` + +(This is an example) + +And this is what the fields mean: + +\*required + +- \*`server`: The server domain or IP address, a domain (or IP) that directly points to your server. +- \*`domain`: The representative domain of the server, does not have to run on the same server as `server`. +- \*`description`: The description of your server, usually small, up to 1024 characters. +- \*`keywords`: The keywords of your server. This is used for categorization and discovery of your server in the network. Up to 32 tags, of up to 32 characters each. +- \*`staff`: A list of staff contacts. See required entries below. + - `name`: The name of the staff member, may repeat to add alternative accounts. + - `email`: The email of the staff member. + - `role`: The role of the staff member, usually: + - `owner` + - `admin` + - `mod` + - `audit` (person who may review code, configurations, etc. from time to time) + - `of`: The list of services that this staff member _may_ manage. Globbing supported (such as `*.ari.lt`). + - Other keys will be listed as-is. +- \*`name`: The name of your server, any string up to 128 characters. +- `privacy`: General privacy statement of your server, such as logging, +- `terms`: General privacy statement of your server, such as logging, +- \*`affiliated-with`: The affiliated servers in your network. Your server won't be able to talk to other servers not listed in the this list. +- \*`hardware`: The hardware of your server, in gigabytes + - `ram`: The memory/RAM your server has in total, excluding swap. + - `cpu`: The CPU threads on your server. + - `storage`: The total storage your server has. + - `network`: The network speed in GBit/s. + +That is all for the server configuration + +This file should be served with the following HTTP headers: + +- `Access-Control-Allow-Origin` = `*` +- `Access-Control-Allow-Methods` = `GET` +- `Content-Type` = `application/json` + +# Services + +The services configuration, `.well-known/netowrk/server.json`, has the following structure: + +```json +{ + "matrix.ari.lt": { + "source": "https://matrix.ari.lt/git", + "description": "The ari.lt Matrix homeserver using Dendrite", + "license": "MIT", + "public": false, + "extra": "Required to contact admin for signup", + "keywords": ["ari-web", "matrix", "messaging", "im", "dendrite"], + "privacy": "https://ari.lt/matrix", + "terms": "https://ari.lt/matrix" + }, + ... +} +``` + +(This is an example) + +This is what those fields mean: + +\*required + +- The keys of the object are the domain names used for the service hosting. +- `source`: The source code/configuration/etc. of your service. +- \*`description`: The description of your service. Up to 1024 characters. +- `license`: The license of your `source` or content on the page. Up to 128 characters. +- \*`public`: Whether or not any random passer-by can sign up and use this service without any extra steps. +- `extra`: Any extra information about the service. Up to 512 characters. +- \*`keywords`: The keywords for your service, used for discovery and categorization. Up to 32 tags, of up to 32 characters each. +- `privacy`: Privacy statement of your service. +- `terms`: Terms of your service. + +You may add as many services as you want. + +This file should be served with the following HTTP headers: + +- `Access-Control-Allow-Origin` = `*` +- `Access-Control-Allow-Methods` = `GET` +- `Content-Type` = `application/json` diff --git a/README.md b/README.md index ea695cb..778b0f9 100644 --- a/README.md +++ b/README.md @@ -147,11 +147,4 @@ how much per avg sites are using: # Subdomains -- https://www.ari.lt/ (source: https://ari.lt/git) -- https://files.ari.lt/ (source: https://files.ari.lt/git) -- https://blog.ari.lt/ (source: https://blog.ari.lt/git) -- https://legacy.blog.ari.lt/ (source: https://legacy.blog.ari.lt/git) -- https://school.ari.lt/ (source: proprietary (I don't want people snooping on my homework lol)) -- https://user.ari.lt/ (source: https://user.ari.lt/git) -- https://etc.ari.lt/ (source: https://etc.ari.lt/git) -- https://a.ari.lt/ (source: https://a.ari.lt/git) +Check