update readme

This commit is contained in:
dd dd 2024-07-23 21:36:57 +02:00
parent 6b113af7fe
commit 6f4db0092d

View File

@ -28,7 +28,7 @@ Running NWS using Docker is recommended. For instructions on running NWS on your
### Using Docker Compose ### Using Docker Compose
Please navigate to the `docker-compose.yaml` file and set the value of `NOSTR_PRIVATE_KEY` to your own private key. Please navigate to the `docker-compose.yaml` file and set `NOSTR_PRIVATE_KEY` to your own private key.
Leaving it empty will generate a new private key on startup. Leaving it empty will generate a new private key on startup.
To set up using Docker Compose, run the following command: To set up using Docker Compose, run the following command:
@ -36,7 +36,7 @@ To set up using Docker Compose, run the following command:
docker compose up -d --build docker compose up -d --build
``` ```
This will start an example setup, including the entry node, exit node, and a backend service. This will start an example environment, including the entry node, exit node, and a backend service.
You can run the following commands to receive your nprofiles: You can run the following commands to receive your nprofiles:
@ -52,13 +52,13 @@ docker logs exit 2>&1 | awk -F'profile=' '{if ($2) print $2}' | awk '{print $1}
With the log information from the previous step, you can use the following command to send a request to the nprofile: With the log information from the previous step, you can use the following command to send a request to the nprofile:
``` ```
curl -v -x socks5h://localhost:8882 http://"$(docker logs exit 2>&1 | awk -F'profile=' '{if ($2) print $2}' | awk '{print $1}')"/v1/info --insecure curl -v -x socks5h://localhost:8882 http://"$(docker logs exit 2>&1 | awk -F'profile=' '{if ($2) print $2}' | awk '{print $1}' | tail -n 1)"/v1/info --insecure
``` ```
If the nprofile supports TLS, you can choose to connect using https scheme If the nprofile supports TLS, you can choose to connect using https scheme
``` ```
curl -v -x socks5h://localhost:8882 https://"$(docker logs exit-https 2>&1 | awk -F'profile=' '{if ($2) print $2}' | awk '{print $1}')"/v1/info --insecure curl -v -x socks5h://localhost:8882 https://"$(docker logs exit-https 2>&1 | awk -F'profile=' '{if ($2) print $2}' | awk '{print $1}' | tail -n 1)"/v1/info --insecure
``` ```
When using https, the entry node can be used as a service, since the operator will not be able to see the request data. When using https, the entry node can be used as a service, since the operator will not be able to see the request data.
@ -69,7 +69,7 @@ The exit node must be set up to make the services reachable via Nostr.
### Configuration ### Configuration
Configuration can be completed using environment variables. Configuration should be completed using environment variables.
Alternatively, you can create a `.env` file in the current working directory with the following content: Alternatively, you can create a `.env` file in the current working directory with the following content:
``` ```
NOSTR_RELAYS = 'ws://localhost:6666;wss://relay.damus.io' NOSTR_RELAYS = 'ws://localhost:6666;wss://relay.damus.io'