From b09733317b28410dc46a6fd9e0654d559e107f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C5=82odarek?= Date: Mon, 11 Jan 2021 15:18:39 +0100 Subject: [PATCH] Add Tor onion seed nodes for Monero p2p network --- .../tor-onion-p2p-seed-nodes.md | 57 +++++++++++++++++++ docs/interacting/monerod-reference.md | 2 +- mkdocs.yml | 1 + 3 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 docs/infrastructure/tor-onion-p2p-seed-nodes.md diff --git a/docs/infrastructure/tor-onion-p2p-seed-nodes.md b/docs/infrastructure/tor-onion-p2p-seed-nodes.md new file mode 100644 index 0000000..5027666 --- /dev/null +++ b/docs/infrastructure/tor-onion-p2p-seed-nodes.md @@ -0,0 +1,57 @@ +--- +title: Tor Onion Seed Nodes for Monero P2P Network | Monero Documentation +--- +# Tor onion seed nodes for Monero P2P network + + +## When this is necessary? + +This is only necessary if: + +* you run a full node and you want to propagate locally-originating transactions over Tor (using `tx-proxy` option, see [monerod reference](/interacting/monerod-reference/#tori2p)) + +## What are P2P seed nodes? + +Your monero daemon will discover other p2p nodes but it needs to start somewhere. These starting nodes are known as "seed nodes". For clearnet the seed nodes are hardcoded in the software so no configuration is needed. + +For the Tor network there are no hardcoded seed nodes. You must specify them manually by using the `add-peer` option in `monero.conf`. + +## Config snippet + +These were tested working as of 2020-01-11. They are ran by volunteers and are **not guaranteed** to work or be maintained. See below how you can quickly test them. + +``` +# monero.conf snippet +# ... +add-peer=moneroxmrxw44lku6qniyarpwgznpcwml4drq7vb24ppatlcg4kmxpqd.onion:18080 +add-peer=monerozf6koypqrt.onion:18080 +add-peer=zbjkbsxc5munw3qusl7j2hpcmikhqocdf4pqhnhtpzw5nt5jrmofptid.onion:18083 # https://github.com/monero-project/monero/blob/master/src/p2p/net_node.inl +add-peer=rno75kjcw3ein6i446sqby2xkyqjarb75oq36ah6c2mribyklzhurpyd.onion:28083 # it's mainnet despite the weird port +add-peer=sqzrokz36lgkng2i2nlzgzns2ugcxqosflygsxbkybb4xn6gq3ouugqd.onion:18083 # very flaky, works 1 in 3 times +add-peer=blzchctiibfjfvtukctsydhquucz2oajnxnfc5hh4ix35gyqjhdnaqqd.onion:18080 # by author of monerodocs.org +# ... +``` + +## How to test onion seed nodes? + +You need Tor daemon installed and running on your laptop. You will also need torsocks command line tool that often comes with Tor. + +To test speficic onion: + + torsocks telnet blzchctiibfjfvtukctsydhquucz2oajnxnfc5hh4ix35gyqjhdnaqqd.onion 18080 + +The **correct** output will be similar to (domain resolution errors are fine): + +``` +1610372702 ERROR torsocks[11332]: Unable to resolve. Status reply: 4 (in socks5_recv_resolve_reply() at socks5.c:677) +Trying 127.42.42.0... +Connected to blzchctiibfjfvtukctsydhquucz2oajnxnfc5hh4ix35gyqjhdnaqqd.onion. +Escape character is '^]'. +``` + +## Not enough onion seed nodes + +The onion seed nodes are a scarce resource. Most nodes are only maintained temporarily by their authors. + +You can greatly contribute to Monero P2P network performance and resillience by running onion-enabled monero full node. + diff --git a/docs/interacting/monerod-reference.md b/docs/interacting/monerod-reference.md index e0efd8e..47a7e68 100644 --- a/docs/interacting/monerod-reference.md +++ b/docs/interacting/monerod-reference.md @@ -138,7 +138,7 @@ This is experimental. It may be best to start with this [guide](https://github.c | Option | Description |------------------------|-------------------------------------------------------------------------------------------------------------------------------------- -| `--tx-proxy` | Send out your local transactions through SOCKS5 proxy (Tor or I2P). Format:
`,[,max_connections][,disable_noise]`

Example:
`./monerod --tx-proxy "tor,127.0.0.1:9050,10,disable_noise"`

This was introduced to make publishing transactions over Tor easier (no need for torsocks) while allowing clearnet for blocks at the same time (while torsocks affected everything).

Note that forwarded transactions (those not originating from connected wallet) will still be relayed over clearnet.

Requires multiple `--add-peer`. See [commit](https://github.com/monero-project/monero/pull/6021) and [guide](https://github.com/monero-project/monero/blob/master/ANONYMITY_NETWORKS.md#p2p-commands). +| `--tx-proxy` | Send out your local transactions through SOCKS5 proxy (Tor or I2P). Format:
`,[,max_connections][,disable_noise]`

Example:
`./monerod --tx-proxy "tx-proxy=tor,127.0.0.1:9050,16"`

This was introduced to make publishing transactions over Tor easier (no need for torsocks) while allowing clearnet for blocks at the same time (while torsocks affected everything).

Adding `,disable_noise` disables Dandelion++ (will speed up tx broadcast but is otherwise not recommended).

Note that forwarded transactions (those not originating from connected wallet) will still be relayed over clearnet.

**Requires multiple `--add-peer`** to manually add onion-enabled p2p seed nodes - see [Tor onion seed nodes for Monero P2P network](/infrastructure/tor-onion-p2p-seed-nodes). See this [guide](https://github.com/monero-project/monero/blob/master/ANONYMITY_NETWORKS.md#p2p-commands) and [commit](https://github.com/monero-project/monero/pull/6021). | `--anonymous-inbound` | Allow anonymous incoming connections to your onionized P2P interface. Format:
`,<[bind-ip:]port>[,max_connections]`

Example:
`./monerod --anonymous-inbound "rveahdfho7wo4b2m.onion:18083,127.0.0.1:18083,100"`.

Obviously, you first need to setup the hidden service in your Tor config. See the [guide](https://github.com/monero-project/monero/blob/master/ANONYMITY_NETWORKS.md#p2p-commands). | `--pad-transactions` | Pad relayed transactions to next 1024 bytes to help defend against traffic volume analysis. This only makes sense if you are behind Tor or I2P. See [commit](https://github.com/monero-project/monero/pull/4787). diff --git a/mkdocs.yml b/mkdocs.yml index e2cef71..0be0291 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -41,6 +41,7 @@ nav: - Multisignature: 'multisignature.md' - Infrastructure: - Mainnet, stagenet, testnet: 'infrastructure/networks.md' + - Tor onion seed nodes: 'infrastructure/tor-onion-p2p-seed-nodes.md' - MoneroPulse: 'infrastructure/monero-pulse.md' - Accepting Monero: - Overview: 'accepting-monero/overview.md'