From f548a16aeaa4e8c95b64097f6df5dcbe357d5642 Mon Sep 17 00:00:00 2001 From: jurij-jukic Date: Tue, 7 May 2024 16:12:21 +0200 Subject: [PATCH 1/3] minor fix --- src/http_server_and_client.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/http_server_and_client.md b/src/http_server_and_client.md index 6727dd77..9c9d7aef 100644 --- a/src/http_server_and_client.md +++ b/src/http_server_and_client.md @@ -6,12 +6,13 @@ This enables Kinode apps to read data from the web (and other Kinodes), and also The HTTP server is how most processes in the Kinode OS present their interface to the user, through an authenticated web browser. The specification for the [server](./apis/http_server.md) and [client](./apis/http_client.md) APIs are available in the API reference. -These APIs are accessible via messaging the `http_server:distro:sys` and `http_client:distro:sys` runtime extensions, respectively. +These APIs are accessible via messaging the [`http_server:distro:sys`](https://github.com/kinode-dao/kinode/blob/main/kinode/src/http/server.rs) and [`http_client:distro:sys`](https://github.com/kinode-dao/kinode/blob/main/kinode/src/http/client.rs) runtime modules, respectively. The only [capability](./process/capabilities.md) required to use either process is the one to message it, granted by the kernel. WebSocket server/client functionality is presented alongside HTTP. -At startup, the server task finds an open port, starting its search at 8080, to bind at and listen for HTTP and WebSocket requests. +At startup, an open port is searched for (starting at 8080, if not, then 8081, etc.). +The server is then bound to this port, and it will listen for HTTP and WebSocket requests. All server functionality can be either authenticated or public. If a given functionality is public, it is presented open to the world. Note that the configuration of the Kinode will still determine whether it is accessible over IPv4/IPv6 – Kinode OS does also not provide any DNS management for nodes. From 48ce48bef26e5e96f82cf110873ba27670df2a5a Mon Sep 17 00:00:00 2001 From: jurij-jukic Date: Wed, 8 May 2024 12:28:21 +0200 Subject: [PATCH 2/3] apply requested changes --- src/http_server_and_client.md | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/http_server_and_client.md b/src/http_server_and_client.md index 9c9d7aef..e22c0ba5 100644 --- a/src/http_server_and_client.md +++ b/src/http_server_and_client.md @@ -11,12 +11,20 @@ The only [capability](./process/capabilities.md) required to use either process WebSocket server/client functionality is presented alongside HTTP. -At startup, an open port is searched for (starting at 8080, if not, then 8081, etc.). -The server is then bound to this port, and it will listen for HTTP and WebSocket requests. -All server functionality can be either authenticated or public. -If a given functionality is public, it is presented open to the world. -Note that the configuration of the Kinode will still determine whether it is accessible over IPv4/IPv6 – Kinode OS does also not provide any DNS management for nodes. -Since direct nodes are expected to be accessible over IP, their HTTP server is likely to work, if the bound port is accessible. -However, indirect nodes are not expected to be accessible over IP, so in the near future, the HTTP server will include a proxying feature to allow indirect nodes to serve HTTP requests. +At startup, the server either: +1. Binds to the port given at the commandline, or +2. Searches for an open port (starting at 8080, if not, then 8081, etc.). +The server then binds this port, listening for HTTP and WebSocket requests. +## Private and Public Serving + +All server functionality can be either private (authenticated) or public. +If a given functionality is public, the Kinode serves HTTP openly to the world; if it is authenticated, you need your node's password so that your node can generate a cookie that grants you access. + +## Direct and Indirect Nodes + +Since direct nodes are expected to be accessible over IP, their HTTP server is likely to work if the bound port is accessible. +Note that direct nodes will need to do their own IP/DNS configuration, as Kinode doesn't provide any DNS management. + +However, Kinode provides indirect nodes for users who don't want to do this config, as indirect nodes are not expected to be accessible over IP. From 627da8320409197562387ee28ca2b92ccd0088ed Mon Sep 17 00:00:00 2001 From: jurij-jukic Date: Wed, 8 May 2024 19:06:48 +0200 Subject: [PATCH 3/3] add link to domain resolution --- src/http_server_and_client.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/http_server_and_client.md b/src/http_server_and_client.md index e22c0ba5..65759f44 100644 --- a/src/http_server_and_client.md +++ b/src/http_server_and_client.md @@ -27,4 +27,4 @@ If a given functionality is public, the Kinode serves HTTP openly to the world; Since direct nodes are expected to be accessible over IP, their HTTP server is likely to work if the bound port is accessible. Note that direct nodes will need to do their own IP/DNS configuration, as Kinode doesn't provide any DNS management. -However, Kinode provides indirect nodes for users who don't want to do this config, as indirect nodes are not expected to be accessible over IP. +However, Kinode provides indirect nodes for users who don't want to do this config, as indirect nodes are not expected to be accessible over IP. For more, see [Domain Resolution](https://book.kinode.org/identity_system.html#domain-resolution).