aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-08-26 12:42:50 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-08-26 12:44:46 +0200
commit7740ebcb023089d03cd2373da16305a4e501cfad (patch)
treefcb4cbadd17867819a045d056fe83a93ee06e401 /doc
parent0492b56e38c24e599a221b5bb276957c674cfafe (diff)
parent017597767b977bb8fe11be8e2012130df1dffd30 (diff)
downloadbitcoin-7740ebcb023089d03cd2373da16305a4e501cfad.tar.xz
Merge bitcoin/bitcoin#22648: doc, test: improve i2p/tor docs and i2p reachable unit tests
017597767b977bb8fe11be8e2012130df1dffd30 Add I2P network SetReachable/IsReachable unit test assertions (Jon Atack) b87a9c4d13329a6236124d4b93580c4df8107b32 Improve doc/i2p.md regarding I2P router options/versions (Jon Atack) bebcf785c080df9273e03b854832ba3dbd4320ec Update i2p.md and tor.md regarding -onlynet config option (Jon Atack) Pull request description: This pull addresses https://github.com/bitcoin/bitcoin/issues/22634#issuecomment-894104681 and various user feedback/questions, updates the -onlynet documentation in doc/i2p.md and doc/tor.md per #22651 (src/init.cpp is already fine) and fills in some missing I2P unit test coverage. Note: this PR depends in part on whether #22651 is merged in order to propose the correct -onlynet documentation (it is currently aligned with the change in #22651), so that PR should be decided or merged first. ACKs for top commit: Rspigler: Re-ACK 017597767b977bb8fe11be8e2012130df1dffd30 prayank23: reACK https://github.com/bitcoin/bitcoin/commit/017597767b977bb8fe11be8e2012130df1dffd30 vasild: ACK 017597767b977bb8fe11be8e2012130df1dffd30 Tree-SHA512: ae606437522bfccdfb7508108cddc7dfede2385e30a0561dbd007b784ed2639962c28552eb0e9336412faa323637fe964c26b8d8fc6dcf9fc63734ac00d05736
Diffstat (limited to 'doc')
-rw-r--r--doc/i2p.md52
-rw-r--r--doc/tor.md10
2 files changed, 44 insertions, 18 deletions
diff --git a/doc/i2p.md b/doc/i2p.md
index 3a507a25ab..5f631c11ca 100644
--- a/doc/i2p.md
+++ b/doc/i2p.md
@@ -10,11 +10,22 @@ started with I2P terminology.
## Run Bitcoin Core with an I2P router (proxy)
A running I2P router (proxy) with [SAM](https://geti2p.net/en/docs/api/samv3)
-enabled is required (there is an [official one](https://geti2p.net) and
-[a few alternatives](https://en.wikipedia.org/wiki/I2P#Routers)). Notice the IP
-address and port the SAM proxy is listening to; usually, it is
-`127.0.0.1:7656`. Once it is up and running with SAM enabled, use the following
-Bitcoin Core options:
+enabled is required. Options include:
+
+- [i2prouter (I2P Router)](https://geti2p.net), the official implementation in
+ Java
+- [i2pd (I2P Daemon)](https://github.com/PurpleI2P/i2pd)
+ ([documentation](https://i2pd.readthedocs.io/en/latest)), a lighter
+ alternative in C++ (successfully tested with version 2.23 and up; version 2.36
+ or later recommended)
+- [i2p-zero](https://github.com/i2p-zero/i2p-zero)
+- [other alternatives](https://en.wikipedia.org/wiki/I2P#Routers)
+
+Note the IP address and port the SAM proxy is listening to; usually, it is
+`127.0.0.1:7656`.
+
+Once an I2P router with SAM enabled is up and running, use the following Bitcoin
+Core configuration options:
```
-i2psam=<ip:port>
@@ -42,15 +53,30 @@ named `i2p_private_key` in the Bitcoin Core data directory.
## Additional configuration options related to I2P
-You may set the `debug=i2p` config logging option to have additional
-information in the debug log about your I2P configuration and connections. Run
-`bitcoin-cli help logging` for more information.
+```
+-debug=i2p
+```
+
+Set the `debug=i2p` config logging option to see additional information in the
+debug log about your I2P configuration and connections. Run `bitcoin-cli help
+logging` for more information.
+
+```
+-onlynet=i2p
+```
+
+Make outgoing connections only to I2P addresses. Incoming connections are not
+affected by this option. It can be specified multiple times to allow multiple
+network types, e.g. onlynet=ipv4, onlynet=ipv6, onlynet=onion, onlynet=i2p.
+
+Warning: if you use -onlynet with values other than onion, and the -onion or
+-proxy option is set, then outgoing onion connections will still be made; use
+-noonion or -onion=0 to disable outbound onion connections in this case.
-It is possible to restrict outgoing connections in the usual way with
-`onlynet=i2p`. I2P support was added to Bitcoin Core in version 22.0 (mid-2021)
-and there may be fewer I2P peers than Tor or IP ones. Therefore, using
-`onlynet=i2p` alone (without other `onlynet=`) may make a node more susceptible
-to [Sybil attacks](https://en.bitcoin.it/wiki/Weaknesses#Sybil_attack). Use
+I2P support was added to Bitcoin Core in version 22.0 and there may be fewer I2P
+peers than Tor or IP ones. Therefore, using I2P alone without other networks may
+make a node more susceptible to [Sybil
+attacks](https://en.bitcoin.it/wiki/Weaknesses#Sybil_attack). You can use
`bitcoin-cli -addrinfo` to see the number of I2P addresses known to your node.
Another consideration with `onlynet=i2p` is that the initial blocks download
diff --git a/doc/tor.md b/doc/tor.md
index 7d134b64e0..a3ec1987aa 100644
--- a/doc/tor.md
+++ b/doc/tor.md
@@ -57,11 +57,11 @@ outgoing connections, but more is possible.
-onlynet=onion Make outgoing connections only to .onion addresses. Incoming
connections are not affected by this option. This option can be
specified multiple times to allow multiple network types, e.g.
- ipv4, ipv6 or onion. If you use this option with values other
- than onion you *cannot* disable onion connections; outgoing onion
- connections will be enabled when you use -proxy or -onion. Use
- -noonion or -onion=0 if you want to be sure there are no outbound
- onion connections over the default proxy or your defined -proxy.
+ onlynet=ipv4, onlynet=ipv6, onlynet=onion, onlynet=i2p.
+ Warning: if you use -onlynet with values other than onion, and
+ the -onion or -proxy option is set, then outgoing onion
+ connections will still be made; use -noonion or -onion=0 to
+ disable outbound onion connections in this case.
In a typical situation, this suffices to run behind a Tor proxy: