mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-26 01:04:20 +01:00
doc/TOR.md: Make it clear that Tor == Torv3.
And switch ```` to ``` (emacs colorization was confused!). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
2f247c7bfb
commit
2a35f33cb0
32
doc/TOR.md
32
doc/TOR.md
@@ -2,10 +2,7 @@
|
|||||||
|
|
||||||
To use any Tor features with c-lightning you must have Tor installed and running.
|
To use any Tor features with c-lightning you must have Tor installed and running.
|
||||||
|
|
||||||
Note that [Tor v2 onion services are deprecated since mid-2020](https://blog.torproject.org/v2-deprecation-timeline)
|
Note that we only support Tor v3: you can check your installed Tor version with `tor --version` or `sudo tor --version`
|
||||||
and that C-lightning deprecated their support since mid-2021.
|
|
||||||
|
|
||||||
You can check your installed Tor version with `tor --version` or `sudo tor --version`
|
|
||||||
|
|
||||||
If Tor is not installed you can install it on Debian based Linux systems (Ubuntu, Debian, etc) with the following command:
|
If Tor is not installed you can install it on Debian based Linux systems (Ubuntu, Debian, etc) with the following command:
|
||||||
|
|
||||||
@@ -198,11 +195,11 @@ You can configure the service authenticated by cookie or by password:
|
|||||||
##### Service authenticated by cookie
|
##### Service authenticated by cookie
|
||||||
Add the following lines in the `/etc/tor/torrc` file:
|
Add the following lines in the `/etc/tor/torrc` file:
|
||||||
|
|
||||||
````
|
```
|
||||||
ControlPort 9051
|
ControlPort 9051
|
||||||
CookieAuthentication 1
|
CookieAuthentication 1
|
||||||
CookieAuthFileGroupReadable 1
|
CookieAuthFileGroupReadable 1
|
||||||
````
|
```
|
||||||
|
|
||||||
##### Service authenticated by password
|
##### Service authenticated by password
|
||||||
|
|
||||||
@@ -222,7 +219,7 @@ This returns a line like
|
|||||||
```
|
```
|
||||||
ControlPort 9051
|
ControlPort 9051
|
||||||
HashedControlPassword 16:533E3963988E038560A8C4EE6BBEE8DB106B38F9C8A7F81FE38D2A3B1F
|
HashedControlPassword 16:533E3963988E038560A8C4EE6BBEE8DB106B38F9C8A7F81FE38D2A3B1F
|
||||||
````
|
```
|
||||||
|
|
||||||
Save the file and restart the Tor service. In linux:
|
Save the file and restart the Tor service. In linux:
|
||||||
|
|
||||||
@@ -256,15 +253,14 @@ Add the following lines in the `/etc/tor/torrc` file
|
|||||||
(you might already have done this if for example you connected Bitcoin
|
(you might already have done this if for example you connected Bitcoin
|
||||||
over Tor):
|
over Tor):
|
||||||
|
|
||||||
````
|
```
|
||||||
ControlPort 9051
|
ControlPort 9051
|
||||||
CookieAuthentication 1
|
CookieAuthentication 1
|
||||||
CookieAuthFileGroupReadable 1
|
CookieAuthFileGroupReadable 1
|
||||||
````
|
```
|
||||||
|
|
||||||
Then you can use `--addr=statictor:127.0.0.1:9051` instead of
|
Then you can use `--addr=statictor:127.0.0.1:9051` instead of
|
||||||
`--announce-addr=.onionAddressV3`.
|
`--announce-addr=.onionAddressV3`.
|
||||||
By default V3 onion addresses are generated.
|
|
||||||
|
|
||||||
Note that you have to specify a `--bind-addr` first before using
|
Note that you have to specify a `--bind-addr` first before using
|
||||||
`--addr=statictor:`.
|
`--addr=statictor:`.
|
||||||
@@ -280,9 +276,6 @@ incoming data to your node via this .onion address.
|
|||||||
You can then specify multiple `statictor:` options with different
|
You can then specify multiple `statictor:` options with different
|
||||||
`BLOB`s.
|
`BLOB`s.
|
||||||
|
|
||||||
However, even if you have multiple persistent addresses, you can
|
|
||||||
only announce up to one onion service (v3).
|
|
||||||
This is a limitation of the BOLT spec.
|
|
||||||
It is still possible for other nodes to contact you by those
|
It is still possible for other nodes to contact you by those
|
||||||
other hidden services.
|
other hidden services.
|
||||||
|
|
||||||
@@ -293,14 +286,13 @@ address.
|
|||||||
|
|
||||||
##### Explicit Control
|
##### Explicit Control
|
||||||
|
|
||||||
If you want to create a version 3 address, you must also add `HiddenServiceVersion 3` so
|
If you want to create your own hidden address, the whole section will be:
|
||||||
the whole section will be:
|
|
||||||
|
|
||||||
````
|
```
|
||||||
HiddenServiceDir /var/lib/tor/lightningd-service_v3/
|
HiddenServiceDir /var/lib/tor/lightningd-service_v3/
|
||||||
HiddenServiceVersion 3
|
HiddenServiceVersion 3
|
||||||
HiddenServicePort 1234 127.0.0.1:9735
|
HiddenServicePort 1234 127.0.0.1:9735
|
||||||
````
|
```
|
||||||
|
|
||||||
The hidden lightning service will be reachable at port 1234 (global port)
|
The hidden lightning service will be reachable at port 1234 (global port)
|
||||||
of the .onion address, which will be created at the restart of the
|
of the .onion address, which will be created at the restart of the
|
||||||
@@ -416,7 +408,7 @@ lightning-cli connect nodeID yourexternalIPAddress Port
|
|||||||
```
|
```
|
||||||
through Clearnet.
|
through Clearnet.
|
||||||
|
|
||||||
#### Case #3 c-lightning has a public IP address and a non-persisten Tor service address
|
#### Case #3 c-lightning has a public IP address and a non-persistent Tor service address
|
||||||
|
|
||||||
In this case other nodes can connect to you via Clearnet or Tor.
|
In this case other nodes can connect to you via Clearnet or Tor.
|
||||||
|
|
||||||
@@ -461,7 +453,7 @@ Other nodes will not be able to `connect` to you unless you communicate them how
|
|||||||
You will find your .onion address with the command `lightning-cli getinfo` and the other nodes will
|
You will find your .onion address with the command `lightning-cli getinfo` and the other nodes will
|
||||||
be able to connect to it through the 9735 port.
|
be able to connect to it through the 9735 port.
|
||||||
|
|
||||||
#### Case #6 c-lightning has a public IP address and a fixed Tor v3 hidden service
|
#### Case #6 c-lightning has a public IP address and a fixed Tor hidden service
|
||||||
|
|
||||||
You will be reachable via Clearnet, via Tor to the .onion if it is communicated to the node that wants to
|
You will be reachable via Clearnet, via Tor to the .onion if it is communicated to the node that wants to
|
||||||
connect with our node.
|
connect with our node.
|
||||||
@@ -482,7 +474,7 @@ To make your external hidden service public you add:
|
|||||||
```
|
```
|
||||||
to the options to publish your IP number.
|
to the options to publish your IP number.
|
||||||
|
|
||||||
#### Case #7 c-lightning has no public IP address, a fixed Tor V3 service address
|
#### Case #7 c-lightning has no public IP address, a fixed Tor hidden service
|
||||||
|
|
||||||
The Persistent addresses can be created with the steps [outlined above](#creation-of-an-hidden-service-for-a-persistent-onion-address).
|
The Persistent addresses can be created with the steps [outlined above](#creation-of-an-hidden-service-for-a-persistent-onion-address).
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user