mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-04 13:55:23 -05:00
doc: Replace tabs for spaces
This commit is contained in:
parent
98db48d349
commit
e1604b3d50
3 changed files with 80 additions and 80 deletions
|
@ -9,7 +9,7 @@ Note
|
||||||
Always use absolute paths to configure and compile Bitcoin Core and the dependencies.
|
Always use absolute paths to configure and compile Bitcoin Core and the dependencies.
|
||||||
For example, when specifying the path of the dependency:
|
For example, when specifying the path of the dependency:
|
||||||
|
|
||||||
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
|
../dist/configure --enable-cxx --disable-shared --with-pic --prefix=$BDB_PREFIX
|
||||||
|
|
||||||
Here BDB_PREFIX must be an absolute path - it is defined using $(pwd) which ensures
|
Here BDB_PREFIX must be an absolute path - it is defined using $(pwd) which ensures
|
||||||
the usage of the absolute path.
|
the usage of the absolute path.
|
||||||
|
@ -166,9 +166,9 @@ miniupnpc
|
||||||
https://miniupnp.tuxfamily.org/files/). UPnP support is compiled in and
|
https://miniupnp.tuxfamily.org/files/). UPnP support is compiled in and
|
||||||
turned off by default. See the configure options for UPnP behavior desired:
|
turned off by default. See the configure options for UPnP behavior desired:
|
||||||
|
|
||||||
--without-miniupnpc No UPnP support, miniupnp not required
|
--without-miniupnpc No UPnP support, miniupnp not required
|
||||||
--disable-upnp-default (the default) UPnP support turned off by default at runtime
|
--disable-upnp-default (the default) UPnP support turned off by default at runtime
|
||||||
--enable-upnp-default UPnP support turned on by default at runtime
|
--enable-upnp-default UPnP support turned on by default at runtime
|
||||||
|
|
||||||
libnatpmp
|
libnatpmp
|
||||||
---------
|
---------
|
||||||
|
@ -177,9 +177,9 @@ libnatpmp
|
||||||
from [here](https://miniupnp.tuxfamily.org/files/). NAT-PMP support is compiled in and
|
from [here](https://miniupnp.tuxfamily.org/files/). NAT-PMP support is compiled in and
|
||||||
turned off by default. See the configure options for NAT-PMP behavior desired:
|
turned off by default. See the configure options for NAT-PMP behavior desired:
|
||||||
|
|
||||||
--without-natpmp No NAT-PMP support, libnatpmp not required
|
--without-natpmp No NAT-PMP support, libnatpmp not required
|
||||||
--disable-natpmp-default (the default) NAT-PMP support turned off by default at runtime
|
--disable-natpmp-default (the default) NAT-PMP support turned off by default at runtime
|
||||||
--enable-natpmp-default NAT-PMP support turned on by default at runtime
|
--enable-natpmp-default NAT-PMP support turned on by default at runtime
|
||||||
|
|
||||||
Berkeley DB
|
Berkeley DB
|
||||||
-----------
|
-----------
|
||||||
|
@ -199,9 +199,9 @@ Boost
|
||||||
-----
|
-----
|
||||||
If you need to build Boost yourself:
|
If you need to build Boost yourself:
|
||||||
|
|
||||||
sudo su
|
sudo su
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
./bjam install
|
./bjam install
|
||||||
|
|
||||||
|
|
||||||
Security
|
Security
|
||||||
|
@ -212,8 +212,8 @@ This can be disabled with:
|
||||||
|
|
||||||
Hardening Flags:
|
Hardening Flags:
|
||||||
|
|
||||||
./configure --enable-hardening
|
./configure --enable-hardening
|
||||||
./configure --disable-hardening
|
./configure --disable-hardening
|
||||||
|
|
||||||
|
|
||||||
Hardening enables the following features:
|
Hardening enables the following features:
|
||||||
|
@ -228,7 +228,7 @@ Hardening enables the following features:
|
||||||
|
|
||||||
To test that you have built PIE executable, install scanelf, part of paxutils, and use:
|
To test that you have built PIE executable, install scanelf, part of paxutils, and use:
|
||||||
|
|
||||||
scanelf -e ./bitcoin
|
scanelf -e ./bitcoin
|
||||||
|
|
||||||
The output should contain:
|
The output should contain:
|
||||||
|
|
||||||
|
@ -245,8 +245,8 @@ Hardening enables the following features:
|
||||||
`scanelf -e ./bitcoin`
|
`scanelf -e ./bitcoin`
|
||||||
|
|
||||||
The output should contain:
|
The output should contain:
|
||||||
STK/REL/PTL
|
STK/REL/PTL
|
||||||
RW- R-- RW-
|
RW- R-- RW-
|
||||||
|
|
||||||
The STK RW- means that the stack is readable and writeable but not executable.
|
The STK RW- means that the stack is readable and writeable but not executable.
|
||||||
|
|
||||||
|
|
28
doc/init.md
28
doc/init.md
|
@ -4,11 +4,11 @@ Sample init scripts and service configuration for bitcoind
|
||||||
Sample scripts and configuration files for systemd, Upstart and OpenRC
|
Sample scripts and configuration files for systemd, Upstart and OpenRC
|
||||||
can be found in the contrib/init folder.
|
can be found in the contrib/init folder.
|
||||||
|
|
||||||
contrib/init/bitcoind.service: systemd service unit configuration
|
contrib/init/bitcoind.service: systemd service unit configuration
|
||||||
contrib/init/bitcoind.openrc: OpenRC compatible SysV style init script
|
contrib/init/bitcoind.openrc: OpenRC compatible SysV style init script
|
||||||
contrib/init/bitcoind.openrcconf: OpenRC conf.d file
|
contrib/init/bitcoind.openrcconf: OpenRC conf.d file
|
||||||
contrib/init/bitcoind.conf: Upstart service configuration file
|
contrib/init/bitcoind.conf: Upstart service configuration file
|
||||||
contrib/init/bitcoind.init: CentOS compatible SysV style init script
|
contrib/init/bitcoind.init: CentOS compatible SysV style init script
|
||||||
|
|
||||||
Service User
|
Service User
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
@ -53,12 +53,12 @@ Paths
|
||||||
|
|
||||||
All three configurations assume several paths that might need to be adjusted.
|
All three configurations assume several paths that might need to be adjusted.
|
||||||
|
|
||||||
Binary: /usr/bin/bitcoind
|
Binary: /usr/bin/bitcoind
|
||||||
Configuration file: /etc/bitcoin/bitcoin.conf
|
Configuration file: /etc/bitcoin/bitcoin.conf
|
||||||
Data directory: /var/lib/bitcoind
|
Data directory: /var/lib/bitcoind
|
||||||
PID file: /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart) or
|
PID file: /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart) or
|
||||||
/run/bitcoind/bitcoind.pid (systemd)
|
/run/bitcoind/bitcoind.pid (systemd)
|
||||||
Lock file: /var/lock/subsys/bitcoind (CentOS)
|
Lock file: /var/lock/subsys/bitcoind (CentOS)
|
||||||
|
|
||||||
The PID directory (if applicable) and data directory should both be owned by the
|
The PID directory (if applicable) and data directory should both be owned by the
|
||||||
bitcoin user and group. It is advised for security reasons to make the
|
bitcoin user and group. It is advised for security reasons to make the
|
||||||
|
@ -84,10 +84,10 @@ OpenRC).
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
Binary: /usr/local/bin/bitcoind
|
Binary: /usr/local/bin/bitcoind
|
||||||
Configuration file: ~/Library/Application Support/Bitcoin/bitcoin.conf
|
Configuration file: ~/Library/Application Support/Bitcoin/bitcoin.conf
|
||||||
Data directory: ~/Library/Application Support/Bitcoin
|
Data directory: ~/Library/Application Support/Bitcoin
|
||||||
Lock file: ~/Library/Application Support/Bitcoin/.lock
|
Lock file: ~/Library/Application Support/Bitcoin/.lock
|
||||||
|
|
||||||
Installing Service Configuration
|
Installing Service Configuration
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
102
doc/tor.md
102
doc/tor.md
|
@ -21,39 +21,39 @@ information in the debug log about your Tor configuration.
|
||||||
The first step is running Bitcoin Core behind a Tor proxy. This will already anonymize all
|
The first step is running Bitcoin Core behind a Tor proxy. This will already anonymize all
|
||||||
outgoing connections, but more is possible.
|
outgoing connections, but more is possible.
|
||||||
|
|
||||||
-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy
|
-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy
|
||||||
server will be used to try to reach .onion addresses as well.
|
server will be used to try to reach .onion addresses as well.
|
||||||
You need to use -noonion or -onion=0 to explicitly disable
|
You need to use -noonion or -onion=0 to explicitly disable
|
||||||
outbound access to onion services.
|
outbound access to onion services.
|
||||||
|
|
||||||
-onion=ip:port Set the proxy server to use for Tor onion services. You do not
|
-onion=ip:port Set the proxy server to use for Tor onion services. You do not
|
||||||
need to set this if it's the same as -proxy. You can use -onion=0
|
need to set this if it's the same as -proxy. You can use -onion=0
|
||||||
to explicitly disable access to onion services.
|
to explicitly disable access to onion services.
|
||||||
Note: Only the -proxy option sets the proxy for DNS requests;
|
Note: Only the -proxy option sets the proxy for DNS requests;
|
||||||
with -onion they will not route over Tor, so use -proxy if you
|
with -onion they will not route over Tor, so use -proxy if you
|
||||||
have privacy concerns.
|
have privacy concerns.
|
||||||
|
|
||||||
-listen When using -proxy, listening is disabled by default. If you want
|
-listen When using -proxy, listening is disabled by default. If you want
|
||||||
to manually configure an onion service (see section 3), you'll
|
to manually configure an onion service (see section 3), you'll
|
||||||
need to enable it explicitly.
|
need to enable it explicitly.
|
||||||
|
|
||||||
-connect=X When behind a Tor proxy, you can specify .onion addresses instead
|
-connect=X When behind a Tor proxy, you can specify .onion addresses instead
|
||||||
-addnode=X of IP addresses or hostnames in these parameters. It requires
|
-addnode=X of IP addresses or hostnames in these parameters. It requires
|
||||||
-seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with
|
-seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with
|
||||||
other P2P nodes.
|
other P2P nodes.
|
||||||
|
|
||||||
-onlynet=onion Make outgoing connections only to .onion addresses. Incoming
|
-onlynet=onion Make outgoing connections only to .onion addresses. Incoming
|
||||||
connections are not affected by this option. This option can be
|
connections are not affected by this option. This option can be
|
||||||
specified multiple times to allow multiple network types, e.g.
|
specified multiple times to allow multiple network types, e.g.
|
||||||
ipv4, ipv6 or onion. If you use this option with values other
|
ipv4, ipv6 or onion. If you use this option with values other
|
||||||
than onion you *cannot* disable onion connections; outgoing onion
|
than onion you *cannot* disable onion connections; outgoing onion
|
||||||
connections will be enabled when you use -proxy or -onion. Use
|
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
|
-noonion or -onion=0 if you want to be sure there are no outbound
|
||||||
onion connections over the default proxy or your defined -proxy.
|
onion connections over the default proxy or your defined -proxy.
|
||||||
|
|
||||||
In a typical situation, this suffices to run behind a Tor proxy:
|
In a typical situation, this suffices to run behind a Tor proxy:
|
||||||
|
|
||||||
./bitcoind -proxy=127.0.0.1:9050
|
./bitcoind -proxy=127.0.0.1:9050
|
||||||
|
|
||||||
## 2. Automatically create a Bitcoin Core onion service
|
## 2. Automatically create a Bitcoin Core onion service
|
||||||
|
|
||||||
|
@ -152,57 +152,57 @@ details).
|
||||||
You can also manually configure your node to be reachable from the Tor network.
|
You can also manually configure your node to be reachable from the Tor network.
|
||||||
Add these lines to your `/etc/tor/torrc` (or equivalent config file):
|
Add these lines to your `/etc/tor/torrc` (or equivalent config file):
|
||||||
|
|
||||||
HiddenServiceDir /var/lib/tor/bitcoin-service/
|
HiddenServiceDir /var/lib/tor/bitcoin-service/
|
||||||
HiddenServicePort 8333 127.0.0.1:8334
|
HiddenServicePort 8333 127.0.0.1:8334
|
||||||
|
|
||||||
The directory can be different of course, but virtual port numbers should be equal to
|
The directory can be different of course, but virtual port numbers should be equal to
|
||||||
your bitcoind's P2P listen port (8333 by default), and target addresses and ports
|
your bitcoind's P2P listen port (8333 by default), and target addresses and ports
|
||||||
should be equal to binding address and port for inbound Tor connections (127.0.0.1:8334 by default).
|
should be equal to binding address and port for inbound Tor connections (127.0.0.1:8334 by default).
|
||||||
|
|
||||||
-externalip=X You can tell bitcoin about its publicly reachable addresses using
|
-externalip=X You can tell bitcoin about its publicly reachable addresses using
|
||||||
this option, and this can be an onion address. Given the above
|
this option, and this can be an onion address. Given the above
|
||||||
configuration, you can find your onion address in
|
configuration, you can find your onion address in
|
||||||
/var/lib/tor/bitcoin-service/hostname. For connections
|
/var/lib/tor/bitcoin-service/hostname. For connections
|
||||||
coming from unroutable addresses (such as 127.0.0.1, where the
|
coming from unroutable addresses (such as 127.0.0.1, where the
|
||||||
Tor proxy typically runs), onion addresses are given
|
Tor proxy typically runs), onion addresses are given
|
||||||
preference for your node to advertise itself with.
|
preference for your node to advertise itself with.
|
||||||
|
|
||||||
You can set multiple local addresses with -externalip. The
|
You can set multiple local addresses with -externalip. The
|
||||||
one that will be rumoured to a particular peer is the most
|
one that will be rumoured to a particular peer is the most
|
||||||
compatible one and also using heuristics, e.g. the address
|
compatible one and also using heuristics, e.g. the address
|
||||||
with the most incoming connections, etc.
|
with the most incoming connections, etc.
|
||||||
|
|
||||||
-listen You'll need to enable listening for incoming connections, as this
|
-listen You'll need to enable listening for incoming connections, as this
|
||||||
is off by default behind a proxy.
|
is off by default behind a proxy.
|
||||||
|
|
||||||
-discover When -externalip is specified, no attempt is made to discover local
|
-discover When -externalip is specified, no attempt is made to discover local
|
||||||
IPv4 or IPv6 addresses. If you want to run a dual stack, reachable
|
IPv4 or IPv6 addresses. If you want to run a dual stack, reachable
|
||||||
from both Tor and IPv4 (or IPv6), you'll need to either pass your
|
from both Tor and IPv4 (or IPv6), you'll need to either pass your
|
||||||
other addresses using -externalip, or explicitly enable -discover.
|
other addresses using -externalip, or explicitly enable -discover.
|
||||||
Note that both addresses of a dual-stack system may be easily
|
Note that both addresses of a dual-stack system may be easily
|
||||||
linkable using traffic analysis.
|
linkable using traffic analysis.
|
||||||
|
|
||||||
In a typical situation, where you're only reachable via Tor, this should suffice:
|
In a typical situation, where you're only reachable via Tor, this should suffice:
|
||||||
|
|
||||||
./bitcoind -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen
|
./bitcoind -proxy=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -listen
|
||||||
|
|
||||||
(obviously, replace the .onion address with your own). It should be noted that you still
|
(obviously, replace the .onion address with your own). It should be noted that you still
|
||||||
listen on all devices and another node could establish a clearnet connection, when knowing
|
listen on all devices and another node could establish a clearnet connection, when knowing
|
||||||
your address. To mitigate this, additionally bind the address of your Tor proxy:
|
your address. To mitigate this, additionally bind the address of your Tor proxy:
|
||||||
|
|
||||||
./bitcoind ... -bind=127.0.0.1
|
./bitcoind ... -bind=127.0.0.1
|
||||||
|
|
||||||
If you don't care too much about hiding your node, and want to be reachable on IPv4
|
If you don't care too much about hiding your node, and want to be reachable on IPv4
|
||||||
as well, use `discover` instead:
|
as well, use `discover` instead:
|
||||||
|
|
||||||
./bitcoind ... -discover
|
./bitcoind ... -discover
|
||||||
|
|
||||||
and open port 8333 on your firewall (or use port mapping, i.e., `-upnp` or `-natpmp`).
|
and open port 8333 on your firewall (or use port mapping, i.e., `-upnp` or `-natpmp`).
|
||||||
|
|
||||||
If you only want to use Tor to reach .onion addresses, but not use it as a proxy
|
If you only want to use Tor to reach .onion addresses, but not use it as a proxy
|
||||||
for normal IPv4/IPv6 communication, use:
|
for normal IPv4/IPv6 communication, use:
|
||||||
|
|
||||||
./bitcoind -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover
|
./bitcoind -onion=127.0.0.1:9050 -externalip=7zvj7a2imdgkdbg4f2dryd5rgtrn7upivr5eeij4cicjh65pooxeshid.onion -discover
|
||||||
|
|
||||||
## 4. Privacy recommendations
|
## 4. Privacy recommendations
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue