From 7bc7724d3fd203abf56ee8caccf677acf886bca4 Mon Sep 17 00:00:00 2001 From: Evan Lin Date: Thu, 17 Oct 2019 19:49:19 +1300 Subject: [PATCH] Update README to include stcp config documentation. --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 0757467827..1b854faa63 100644 --- a/README.md +++ b/README.md @@ -102,6 +102,30 @@ $ make install # compiles and installs all binaries $ skywire-cli node gen-config ``` +### `skywire-visor` config file + +#### `stcp` setup + +With `stcp`, you can directly connect to other skywire visors with the `tcp` protocol. + +As visors are identified with public keys and not IP addresses, we need to directly define the associations between IP address and public keys. This is done via the configuration file for `skywire-visor`. + +```json +{ + "stcp": { + "pk_table": { + "024a2dd77de324d543561a6d9e62791723be26ddf6b9587060a10b9ba498e096f1": "127.0.0.1:7031", + "0327396b1241a650163d5bc72a7970f6dfbcca3f3d67ab3b15be9fa5c8da532c08": "127.0.0.1:7032" + }, + "local_address": "127.0.0.1:7033" + } +} +``` + +In the above example, we have two other visors running on localhost (that we wish to connect to via `stcp`). +- The field `stcp.pk_table` holds the associations of `` to `:`. +- The field `stcp.local_address` should only be specified if you want the visor in question to listen for incoming `stcp` connection. + ### Run `skywire-visor` `skywire-visor` hosts apps, proxies app's requests to remote nodes and exposes communication API that apps can use to implement communication protocols. App binaries are spawned by the node, communication between node and app is performed via unix pipes provided on app startup.