Skip to content

Commit 19b1ced

Browse files
author
MarcoFalke
committed
Merge #21075: doc: Fix markdown formatting
e1604b3 doc: Replace tabs for spaces (Gunar C. Gessner) 98db48d doc: Fix markdown formatting (Gunar Gessner) Pull request description: Lines were being joined making it hard to read. ACKs for top commit: RandyMcMillan: ACK e1604b3 Tree-SHA512: fd5a7c5e9a1cbbf0fbb13b5c30b87853c84751da7f0fad08151bda07f1933872ab51cad29a0c0a70ced48e60df6d83bff3f84c2f77d00d22723fae9a8c3534fc
2 parents c4214d0 + e1604b3 commit 19b1ced

File tree

3 files changed

+83
-82
lines changed

3 files changed

+83
-82
lines changed

doc/build-unix.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Note
99
Always use absolute paths to configure and compile Bitcoin Core and the dependencies.
1010
For example, when specifying the path of the dependency:
1111

12-
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
12+
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
1313

1414
Here BDB_PREFIX must be an absolute path - it is defined using $(pwd) which ensures
1515
the usage of the absolute path.
@@ -166,9 +166,9 @@ miniupnpc
166166
https://miniupnp.tuxfamily.org/files/). UPnP support is compiled in and
167167
turned off by default. See the configure options for UPnP behavior desired:
168168

169-
--without-miniupnpc No UPnP support, miniupnp not required
170-
--disable-upnp-default (the default) UPnP support turned off by default at runtime
171-
--enable-upnp-default UPnP support turned on by default at runtime
169+
--without-miniupnpc No UPnP support, miniupnp not required
170+
--disable-upnp-default (the default) UPnP support turned off by default at runtime
171+
--enable-upnp-default UPnP support turned on by default at runtime
172172

173173
libnatpmp
174174
---------
@@ -177,9 +177,9 @@ libnatpmp
177177
from [here](https://miniupnp.tuxfamily.org/files/). NAT-PMP support is compiled in and
178178
turned off by default. See the configure options for NAT-PMP behavior desired:
179179

180-
--without-natpmp No NAT-PMP support, libnatpmp not required
181-
--disable-natpmp-default (the default) NAT-PMP support turned off by default at runtime
182-
--enable-natpmp-default NAT-PMP support turned on by default at runtime
180+
--without-natpmp No NAT-PMP support, libnatpmp not required
181+
--disable-natpmp-default (the default) NAT-PMP support turned off by default at runtime
182+
--enable-natpmp-default NAT-PMP support turned on by default at runtime
183183

184184
Berkeley DB
185185
-----------
@@ -199,9 +199,9 @@ Boost
199199
-----
200200
If you need to build Boost yourself:
201201

202-
sudo su
203-
./bootstrap.sh
204-
./bjam install
202+
sudo su
203+
./bootstrap.sh
204+
./bjam install
205205

206206

207207
Security
@@ -212,8 +212,8 @@ This can be disabled with:
212212

213213
Hardening Flags:
214214

215-
./configure --enable-hardening
216-
./configure --disable-hardening
215+
./configure --enable-hardening
216+
./configure --disable-hardening
217217

218218

219219
Hardening enables the following features:
@@ -228,7 +228,7 @@ Hardening enables the following features:
228228

229229
To test that you have built PIE executable, install scanelf, part of paxutils, and use:
230230

231-
scanelf -e ./bitcoin
231+
scanelf -e ./bitcoin
232232

233233
The output should contain:
234234

@@ -245,8 +245,8 @@ Hardening enables the following features:
245245
`scanelf -e ./bitcoin`
246246

247247
The output should contain:
248-
STK/REL/PTL
249-
RW- R-- RW-
248+
STK/REL/PTL
249+
RW- R-- RW-
250250

251251
The STK RW- means that the stack is readable and writeable but not executable.
252252

doc/init.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,12 @@ Paths
5353

5454
All three configurations assume several paths that might need to be adjusted.
5555

56-
Binary: `/usr/bin/bitcoind`
57-
Configuration file: `/etc/bitcoin/bitcoin.conf`
58-
Data directory: `/var/lib/bitcoind`
59-
PID file: `/var/run/bitcoind/bitcoind.pid` (OpenRC and Upstart) or `/run/bitcoind/bitcoind.pid` (systemd)
60-
Lock file: `/var/lock/subsys/bitcoind` (CentOS)
56+
Binary: /usr/bin/bitcoind
57+
Configuration file: /etc/bitcoin/bitcoin.conf
58+
Data directory: /var/lib/bitcoind
59+
PID file: /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart) or
60+
/run/bitcoind/bitcoind.pid (systemd)
61+
Lock file: /var/lock/subsys/bitcoind (CentOS)
6162

6263
The PID directory (if applicable) and data directory should both be owned by the
6364
bitcoin user and group. It is advised for security reasons to make the
@@ -83,10 +84,10 @@ OpenRC).
8384

8485
### macOS
8586

86-
Binary: `/usr/local/bin/bitcoind`
87-
Configuration file: `~/Library/Application Support/Bitcoin/bitcoin.conf`
88-
Data directory: `~/Library/Application Support/Bitcoin`
89-
Lock file: `~/Library/Application Support/Bitcoin/.lock`
87+
Binary: /usr/local/bin/bitcoind
88+
Configuration file: ~/Library/Application Support/Bitcoin/bitcoin.conf
89+
Data directory: ~/Library/Application Support/Bitcoin
90+
Lock file: ~/Library/Application Support/Bitcoin/.lock
9091

9192
Installing Service Configuration
9293
-----------------------------------

doc/tor.md

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -21,39 +21,39 @@ information in the debug log about your Tor configuration.
2121
The first step is running Bitcoin Core behind a Tor proxy. This will already anonymize all
2222
outgoing connections, but more is possible.
2323

24-
-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy
25-
server will be used to try to reach .onion addresses as well.
26-
You need to use -noonion or -onion=0 to explicitly disable
27-
outbound access to onion services.
28-
29-
-onion=ip:port Set the proxy server to use for Tor onion services. You do not
30-
need to set this if it's the same as -proxy. You can use -onion=0
31-
to explicitly disable access to onion services.
32-
Note: Only the -proxy option sets the proxy for DNS requests;
33-
with -onion they will not route over Tor, so use -proxy if you
34-
have privacy concerns.
35-
36-
-listen When using -proxy, listening is disabled by default. If you want
37-
to manually configure an onion service (see section 3), you'll
38-
need to enable it explicitly.
39-
40-
-connect=X When behind a Tor proxy, you can specify .onion addresses instead
41-
-addnode=X of IP addresses or hostnames in these parameters. It requires
42-
-seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with
43-
other P2P nodes.
44-
45-
-onlynet=onion Make outgoing connections only to .onion addresses. Incoming
46-
connections are not affected by this option. This option can be
47-
specified multiple times to allow multiple network types, e.g.
48-
ipv4, ipv6 or onion. If you use this option with values other
49-
than onion you *cannot* disable onion connections; outgoing onion
50-
connections will be enabled when you use -proxy or -onion. Use
51-
-noonion or -onion=0 if you want to be sure there are no outbound
52-
onion connections over the default proxy or your defined -proxy.
24+
-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy
25+
server will be used to try to reach .onion addresses as well.
26+
You need to use -noonion or -onion=0 to explicitly disable
27+
outbound access to onion services.
28+
29+
-onion=ip:port Set the proxy server to use for Tor onion services. You do not
30+
need to set this if it's the same as -proxy. You can use -onion=0
31+
to explicitly disable access to onion services.
32+
Note: Only the -proxy option sets the proxy for DNS requests;
33+
with -onion they will not route over Tor, so use -proxy if you
34+
have privacy concerns.
35+
36+
-listen When using -proxy, listening is disabled by default. If you want
37+
to manually configure an onion service (see section 3), you'll
38+
need to enable it explicitly.
39+
40+
-connect=X When behind a Tor proxy, you can specify .onion addresses instead
41+
-addnode=X of IP addresses or hostnames in these parameters. It requires
42+
-seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with
43+
other P2P nodes.
44+
45+
-onlynet=onion Make outgoing connections only to .onion addresses. Incoming
46+
connections are not affected by this option. This option can be
47+
specified multiple times to allow multiple network types, e.g.
48+
ipv4, ipv6 or onion. If you use this option with values other
49+
than onion you *cannot* disable onion connections; outgoing onion
50+
connections will be enabled when you use -proxy or -onion. Use
51+
-noonion or -onion=0 if you want to be sure there are no outbound
52+
onion connections over the default proxy or your defined -proxy.
5353

5454
In a typical situation, this suffices to run behind a Tor proxy:
5555

56-
./bitcoind -proxy=127.0.0.1:9050
56+
./bitcoind -proxy=127.0.0.1:9050
5757

5858
## 2. Automatically create a Bitcoin Core onion service
5959

@@ -152,57 +152,57 @@ details).
152152
You can also manually configure your node to be reachable from the Tor network.
153153
Add these lines to your `/etc/tor/torrc` (or equivalent config file):
154154

155-
HiddenServiceDir /var/lib/tor/bitcoin-service/
156-
HiddenServicePort 8333 127.0.0.1:8334
155+
HiddenServiceDir /var/lib/tor/bitcoin-service/
156+
HiddenServicePort 8333 127.0.0.1:8334
157157

158158
The directory can be different of course, but virtual port numbers should be equal to
159159
your bitcoind's P2P listen port (8333 by default), and target addresses and ports
160160
should be equal to binding address and port for inbound Tor connections (127.0.0.1:8334 by default).
161161

162-
-externalip=X You can tell bitcoin about its publicly reachable addresses using
163-
this option, and this can be an onion address. Given the above
164-
configuration, you can find your onion address in
165-
/var/lib/tor/bitcoin-service/hostname. For connections
166-
coming from unroutable addresses (such as 127.0.0.1, where the
167-
Tor proxy typically runs), onion addresses are given
168-
preference for your node to advertise itself with.
169-
170-
You can set multiple local addresses with -externalip. The
171-
one that will be rumoured to a particular peer is the most
172-
compatible one and also using heuristics, e.g. the address
173-
with the most incoming connections, etc.
174-
175-
-listen You'll need to enable listening for incoming connections, as this
176-
is off by default behind a proxy.
177-
178-
-discover When -externalip is specified, no attempt is made to discover local
179-
IPv4 or IPv6 addresses. If you want to run a dual stack, reachable
180-
from both Tor and IPv4 (or IPv6), you'll need to either pass your
181-
other addresses using -externalip, or explicitly enable -discover.
182-
Note that both addresses of a dual-stack system may be easily
183-
linkable using traffic analysis.
162+
-externalip=X You can tell bitcoin about its publicly reachable addresses using
163+
this option, and this can be an onion address. Given the above
164+
configuration, you can find your onion address in
165+
/var/lib/tor/bitcoin-service/hostname. For connections
166+
coming from unroutable addresses (such as 127.0.0.1, where the
167+
Tor proxy typically runs), onion addresses are given
168+
preference for your node to advertise itself with.
169+
170+
You can set multiple local addresses with -externalip. The
171+
one that will be rumoured to a particular peer is the most
172+
compatible one and also using heuristics, e.g. the address
173+
with the most incoming connections, etc.
174+
175+
-listen You'll need to enable listening for incoming connections, as this
176+
is off by default behind a proxy.
177+
178+
-discover When -externalip is specified, no attempt is made to discover local
179+
IPv4 or IPv6 addresses. If you want to run a dual stack, reachable
180+
from both Tor and IPv4 (or IPv6), you'll need to either pass your
181+
other addresses using -externalip, or explicitly enable -discover.
182+
Note that both addresses of a dual-stack system may be easily
183+
linkable using traffic analysis.
184184

185185
In a typical situation, where you're only reachable via Tor, this should suffice:
186186

187-
./bitcoind -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen
187+
./bitcoind -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen
188188

189189
(obviously, replace the .onion address with your own). It should be noted that you still
190190
listen on all devices and another node could establish a clearnet connection, when knowing
191191
your address. To mitigate this, additionally bind the address of your Tor proxy:
192192

193-
./bitcoind ... -bind=127.0.0.1
193+
./bitcoind ... -bind=127.0.0.1
194194

195195
If you don't care too much about hiding your node, and want to be reachable on IPv4
196196
as well, use `discover` instead:
197197

198-
./bitcoind ... -discover
198+
./bitcoind ... -discover
199199

200200
and open port 8333 on your firewall (or use port mapping, i.e., `-upnp` or `-natpmp`).
201201

202202
If you only want to use Tor to reach .onion addresses, but not use it as a proxy
203203
for normal IPv4/IPv6 communication, use:
204204

205-
./bitcoind -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover
205+
./bitcoind -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover
206206

207207
## 4. Privacy recommendations
208208

0 commit comments

Comments
 (0)