Browse Source

doc/src/misc/nodes/tor-guide: update page to a broad tor node guide
doc/src/misc/nodes/public-guide: rename and update to a standalone public node guide
doc/src/misc/network-troubleshooting: fix typos and update tor node inbound link
doc/src/SUMMARY: migrate tor-guide & public-guide to sub-section under Node Configurations in 'User Guide'

foo 1 year ago
parent
commit
8358db7a68

+ 3 - 3
doc/src/SUMMARY.md

@@ -18,9 +18,9 @@
 - [DAO](testnet/dao.md)
 - [DAO](testnet/dao.md)
 - [DarkIRC](misc/darkirc/darkirc.md)
 - [DarkIRC](misc/darkirc/darkirc.md)
 	- [Private Message](misc/darkirc/private_message.md)
 	- [Private Message](misc/darkirc/private_message.md)
-    - [Anonymous Nodes](clients/anonymous_nodes.md)
-        - [Tor DarkIRC](misc/tor_darkirc.md)
-- [Public Node Configurations](misc/darkfi_public_node_guide.md)
+- [Node Configurations](misc/nodes/node-configurations.md)
+    - [Public Node Configurations](misc/nodes/public-guide.md)
+    - [Tor Nodes](misc/nodes/tor-guide.md)
 - [Network Troubleshooting](misc/network-troubleshooting.md)
 - [Network Troubleshooting](misc/network-troubleshooting.md)
 
 
 # Developer Doc
 # Developer Doc

+ 0 - 4
doc/src/clients/anonymous_nodes.md

@@ -1,4 +0,0 @@
-# Anonymous nodes
-
-This section provides an examples for hosting anonymous nodes 
-using `Tor`.

+ 2 - 2
doc/src/misc/network-troubleshooting.md

@@ -12,7 +12,7 @@ The default location for config files is `~/.config/darkfi`.
 using a different app such as `darkfid` or `taud`, the syntax remains
 using a different app such as `darkfid` or `taud`, the syntax remains
 but the app name will change (for example, if using `taud`, 
 but the app name will change (for example, if using `taud`, 
 the config file `~/.config/darkfi/darkirc_config.toml` 
 the config file `~/.config/darkfi/darkirc_config.toml` 
-would become `~/.config/darkfi/taud_config.toml`.
+would become `~/.config/darkfi/taud_config.toml`).
 
 
 ## Common net problems 
 ## Common net problems 
 
 
@@ -194,7 +194,7 @@ If the peers are reachable, you'll receive a `Connected!` output.
 
 
 To see if your address is reachable to others in the network, you'll need 
 To see if your address is reachable to others in the network, you'll need 
 to use a separate device to `ping` your external address. 
 to use a separate device to `ping` your external address. 
-[You can generate an external address here](tor_darkirc.md#step-1-install-tor-and-launch-a-hidden-service).
+[You can generate an external address here](nodes/tor-guide.md#inbound-node-settings).
 For example purposes, let's assume your external address is 
 For example purposes, let's assume your external address is 
 `jamie3vkiwibfiwucd6vxijskbhpjdyajmzeor4mc4i7yopvpo4p7cyd.onion`. In 
 `jamie3vkiwibfiwucd6vxijskbhpjdyajmzeor4mc4i7yopvpo4p7cyd.onion`. In 
 `${DARKFI_REPO}/script/ping` we can attempt to `ping` your external address 
 `${DARKFI_REPO}/script/ping` we can attempt to `ping` your external address 

+ 3 - 0
doc/src/misc/nodes/node-configurations.md

@@ -0,0 +1,3 @@
+# Node configurations
+
+This section provides configuration examples for hosting DarkFi P2P nodes.

+ 6 - 7
doc/src/misc/darkfi_public_node_guide.md → doc/src/misc/nodes/public-guide.md

@@ -73,14 +73,14 @@ transport_mixing = false
 
 
 ### Fully anonymous Tor-enabled node
 ### Fully anonymous Tor-enabled node
 
 
-A Tor-enabled node routes traffic over `Tor`. You can find a complete example config 
+A Tor-enabled node routes traffic over `tor`. You can find a complete example config 
 file for `darkirc-tor.toml` in `${DARKFI_REPO}/bin/darkirc/config`. This node 
 file for `darkirc-tor.toml` in `${DARKFI_REPO}/bin/darkirc/config`. This node 
 configuration is for users that would like to support `darkirc` over the Tor 
 configuration is for users that would like to support `darkirc` over the Tor 
 network. A Tor node provides the best anonymity on the network.
 network. A Tor node provides the best anonymity on the network.
 
 
 You need to configure Tor and launch your hidden service prior to running your 
 You need to configure Tor and launch your hidden service prior to running your 
 public node over Tor. Please refer to 
 public node over Tor. Please refer to 
-[Tor DarkIRC](tor_darkirc.md#step-1-install-tor-and-launch-a-hidden-service).
+[Tor Nodes](tor-guide.md#inbound-node-settings).
 
 
 ```toml
 ```toml
 ## connection settings
 ## connection settings
@@ -121,8 +121,7 @@ This provides the most benefit for the health of the network. This is the most
 maximally compatible node for people that wish to support the network. You can 
 maximally compatible node for people that wish to support the network. You can 
 find a complete example config file for `darkirc-mixed.toml` in 
 find a complete example config file for `darkirc-mixed.toml` in 
 `${DARKFI_REPO}/bin/darkirc/config`. Refer to 
 `${DARKFI_REPO}/bin/darkirc/config`. Refer to 
-[Tor DarkIRC](tor_darkirc.md#step-1-install-tor-and-launch-a-hidden-service)
-to configure Tor.
+[Tor Nodes](tor-guide.md#inbound-node-settings) to configure Tor.
 
 
 ```toml
 ```toml
 ## connection settings
 ## connection settings
@@ -160,11 +159,11 @@ transport_mixing = true
 ## Test your node
 ## Test your node
 
 
 You can test if your node is configured properly on the network. Use 
 You can test if your node is configured properly on the network. Use 
-[Dnet](../learn/dchat/network-tools/using-dnet.md) and the
-[ping-tool](network-troubleshooting.md#ping-tool) to test your node
+[Dnet](../../learn/dchat/network-tools/using-dnet.md) and the
+[ping-tool](../network-troubleshooting.md#ping-tool) to test your node
 connections. You can view if your node is making inbound and outbound connections.
 connections. You can view if your node is making inbound and outbound connections.
 
 
 ## Troubleshooting
 ## Troubleshooting
 
 
-Refer to [Network troubleshooting](network-troubleshooting.md)
+Refer to [Network troubleshooting](../network-troubleshooting.md)
 for further troubleshooting resources.
 for further troubleshooting resources.

+ 128 - 0
doc/src/misc/nodes/tor-guide.md

@@ -0,0 +1,128 @@
+# Set-up a Tor-enabled node
+
+_To connect to Tor, we use [Arti](https://gitlab.torproject.org/tpo/core/arti). 
+Arti is an experimental project with incomplete security features. See Arti's 
+[roadmap](https://gitlab.torproject.org/tpo/core/arti#roadmap) for more 
+information._
+
+<u><b>Note</b></u>: This page is a general guide for `tor` nodes in the DarkFi 
+ecosystem and is applicable to other apps such as `taud` and `darkfid`. We use 
+`darkirc` as our main example throughout this guide. Commands such as `./darkirc`
+and configuration filenames need to be adjusted if using different apps.
+If you're using another app, the network configurations remain the same except 
+for the seed nodes you connect to.
+
+## Generating configuration files
+
+After compiling, you can start the application so it can spawn its configuration 
+file. We use `darkirc` as the application example going forward.
+
+```shell
+% ./darkirc
+```
+
+`darkirc` creates a configuration file `darkirc_config.toml` by default in 
+`~/.config/darkfi/`. You will review and edit this configuration file for your 
+preferred network settings. 
+
+## Configure network settings
+
+Modify the network settings located in the `~/.config/darkfi` directory. This 
+configuration allows your node to send and receive traffic only via Tor.
+
+<u><b>Note</b></u>: As you modify the file, if you notice some settings are missing, 
+simply add them. Some settings may be commented-out by default. In the example 
+configurations below, you will find the a placeholder `youraddress.onion` which 
+indicates you should replace them with your onion address.
+
+### Outbound node settings
+
+These outbound node settings for your `tor` node configuration is only for
+connecting to the network. You will not advertise an external address.
+
+```toml
+## connection settings
+outbound_connect_timeout = 60
+channel_handshake_timeout = 55
+channel_heartbeat_interval = 90
+outbound_peer_discovery_cooloff_time = 60
+
+## Whitelisted transports for outbound connections
+allowed_transports = ["tor", "tor+tls"]
+
+## Seed nodes to connect to 
+seeds = [
+    "tor://czzulj66rr5kq3uhidzn7fh4qvt3vaxaoldukuxnl5vipayuj7obo7id.onion:5263",
+    "tor://vgbfkcu5hcnlnwd2lz26nfoa6g6quciyxwbftm6ivvrx74yvv5jnaoid.onion:5273",
+]
+
+## Outbound connection slots
+outbound_connections = 8
+
+## Enable transport mixing
+transport_mixing = false
+```
+
+### Inbound node settings
+
+With these settings your node becomes a Tor inbound node. The `inbound` 
+settings are optional, but enabling them will increase the strength and 
+reliability of the network. Using Tor, we can host anonymous nodes as Tor hidden 
+services. To do this, we need to set up our Tor daemon and create a hidden service.
+The following instructions should work on any Linux system.
+
+First, you must install [Tor](https://www.torproject.org/). It can usually be 
+installed with your package manager. For example on an `apt` based system we can run:
+
+```
+% apt install tor
+```
+
+This will install Tor. Now in `/etc/tor/torrc` we can set up the hidden
+service. For hosting an anonymous `darkirc` node, set up the following
+lines in the file:
+
+```
+HiddenServiceDir /var/lib/tor/darkfi_darkirc
+HiddenServicePort 25551 127.0.0.1:25551
+```
+
+Then restart Tor:
+
+```
+% /etc/init.d/tor restart
+```
+
+Find the hostname of your hidden service from the directory:
+
+```
+% cat /var/lib/tor/darkfi_darkirc/hostname
+```
+
+Note your `.onion` address and the ports you used while setting up the
+hidden service, and add the following settings to your configuration file:
+
+```toml
+## Addresses we want to advertise to peers
+external_addrs = ["tor://youraddress.onion:25551"]
+
+## P2P accept addresses
+inbound = ["tcp://127.0.0.1:25551"]
+
+## Inbound connection slots
+inbound_connections = 64
+```
+
+## Connect and test your node
+
+Run `./darkirc`. Welcome to the dark forest.
+
+You can test if your node is configured properly on the network. Use 
+[Dnet](../../learn/dchat/network-tools/using-dnet.md) and the 
+[ping-tool](../network-troubleshooting.md#ping-tool) to test your node 
+connections. You can view if your node is making inbound and outbound connections.
+
+## Troubleshooting
+
+Refer to [Network troubleshooting](../network-troubleshooting.md)
+for further troubleshooting resources.

+ 0 - 93
doc/src/misc/tor_darkirc.md

@@ -1,93 +0,0 @@
-# Set-up a Tor-enabled darkirc node
-
-_To connect to Tor, we use [Arti](https://gitlab.torproject.org/tpo/core/arti). 
-This is an experimental project with incomplete security features. See Arti's 
-[roadmap](https://gitlab.torproject.org/tpo/core/arti#roadmap) for more 
-information._
-
-Using Tor, we can host anonymous nodes as Tor hidden services. To do
-this, we need to set up our Tor daemon and create a hidden service.
-The following instructions should work on any Linux system.
-
-## Step 1: Install Tor and Launch a Hidden Service
-
-Tor can usually be installed with your package manager. For example
-on an `apt` based system we can run:
-
-```
-# apt install tor
-```
-
-This will install it. Now in `/etc/tor/torrc` we can set up the hidden
-service. For hosting an anonymous `darkirc` node, set up the following
-lines in the file:
-
-```
-HiddenServiceDir /var/lib/tor/darkfi_darkirc
-HiddenServicePort 25551 127.0.0.1:25551
-```
-
-Then restart Tor:
-
-```
-# /etc/init.d/tor restart
-```
-
-You can grab the hostname of your hidden service from the directory:
-
-```
-# cat /var/lib/tor/darkfi_darkirc/hostname
-```
-
-Note your `.onion` address and the ports you used while setting up the
-Hidden Service.
-
-## Step 2: Build and run darkirc
-
-In the main repository: `make BINS="darkirc"`. Then run `./darkirc`. This will create 
-a configuration file at `~/.config/darkirc/darkirc_config.toml`.
-
-## Step 3: Configure Network Settings
-
-Change the following settings in the configuration file created in Step 2.
-
-As you modify the file, if you notice some settings are missing, simply add them.
-Some settings may be commented-out by default.
-
-```toml
-# connection settings
-outbound_connect_timeout = 60
-channel_handshake_timeout = 55
-channel_heartbeat_interval = 90
-outbound_peer_discovery_cooloff_time = 60
-
-allowed_transports = ["tor", "tor+tls"]
-external_addr = ["tor://youraddress.onion:your-port"]
-
-# seeds
-seeds = [
-    # These addresses are commented-out by default
-    "tor://czzulj66rr5kq3uhidzn7fh4qvt3vaxaoldukuxnl5vipayuj7obo7id.onion:5263",
-    "tor://vgbfkcu5hcnlnwd2lz26nfoa6g6quciyxwbftm6ivvrx74yvv5jnaoid.onion:5273",
-]
-
-# inbound settings
-inbound = ["tcp://127.0.0.1:your-port"]
-inbound_connections = 8
-```
-
-This configuration allows your node to send and receive traffic only via Tor.
-
-The settings under `inbound settings` are optional, but enabling them will 
-increase the strength and reliability of the network.
-
-## Step 4: Connect
-
-Run `./darkirc`. Welcome to the dark forest.
-
-## Troubleshooting
-
-Run `darkirc -vv` for verbose debugging. This will show detailed errors including
-tor connection issues. Refer to 
-[Network troubleshooting](network-troubleshooting.md)
-for troubleshooting resources.