Skip to content

Commit 250fc79

Browse files
vasildcdecker
authored andcommitted
doc: remove trailing whitespace from doc/TOR.md
1 parent eb2b225 commit 250fc79

File tree

1 file changed

+67
-67
lines changed

1 file changed

+67
-67
lines changed

doc/TOR.md

Lines changed: 67 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ To use any Tor features with c-lightning you must have Tor installed and running
55
```bash
66
sudo apt install tor
77
```
8-
then `/etc/init.d/tor start` or `sudo systemctl start tor` depending
8+
then `/etc/init.d/tor start` or `sudo systemctl start tor` depending
99
on your system configuration.
1010

1111
Most default setting should be sufficient.
@@ -34,11 +34,11 @@ To provide the node with a .onion address you can:
3434
#### Creation of an auto service for non-persistent .onion addresses
3535

3636
To provide the node a non-persistent .onion address it
37-
is necessary to access the Tor auto service. These types of addresses change
37+
is necessary to access the Tor auto service. These types of addresses change
3838
each time the Tor service is restarted.
3939

40-
*NOTE:If the node is required to be reachable only by **persistent** .onion addresses, this
41-
part can be skipped and it is necessary to set up a hidden service with the steps
40+
*NOTE:If the node is required to be reachable only by **persistent** .onion addresses, this
41+
part can be skipped and it is necessary to set up a hidden service with the steps
4242
outlined in the next section.*
4343

4444
To create and use the auto service follow these steps:
@@ -47,7 +47,7 @@ Edit the Tor config file `/etc/tor/torrc`
4747

4848
You can configure the service authenticated by cookie or by password:
4949

50-
##### Service authenticated by cookie
50+
##### Service authenticated by cookie
5151
Add the following lines in the `/etc/tor/torrc` file:
5252

5353
````
@@ -56,12 +56,12 @@ CookieAuthentication 1
5656
CookieAuthFileGroupReadable 1
5757
````
5858

59-
##### Service authenticated by password
59+
##### Service authenticated by password
6060

61-
Alternatively, you can set the authentication
61+
Alternatively, you can set the authentication
6262
to the service with a password by following these steps:
6363

64-
1. Create a hash of your password with
64+
1. Create a hash of your password with
6565
```
6666
tor --hash-password yourpassword
6767
```
@@ -78,26 +78,26 @@ HashedControlPassword 16:533E3963988E038560A8C4EE6BBEE8DB106B38F9C8A7F81FE38D2A3
7878
7979
Save the file and restart the Tor service. In linux:
8080
81-
`/etc/init.d/tor restart` or `sudo systemctl start tor` depending
81+
`/etc/init.d/tor restart` or `sudo systemctl start tor` depending
8282
on the configuration of your system.
8383
84-
The auto service is used by adding `--addr=autotor:127.0.0.1:9051` if you
85-
want the address to be public or `--bind-addr=autotor:127.0.0.1:9051` if you
84+
The auto service is used by adding `--addr=autotor:127.0.0.1:9051` if you
85+
want the address to be public or `--bind-addr=autotor:127.0.0.1:9051` if you
8686
don't want to publish it.
8787
88-
In the case where the auto service is authenticated through a password, it will
88+
In the case where the auto service is authenticated through a password, it will
8989
be necessary to add the option `--tor-service-password=yourpassword` (not the hash).
9090
91-
The created non-persistent .onion address wil be shown by the `lightning-cli getinfo`command.
92-
The others nodes will be able to `connect` to this .onion address through the
91+
The created non-persistent .onion address wil be shown by the `lightning-cli getinfo`command.
92+
The others nodes will be able to `connect` to this .onion address through the
9393
9735 port.
9494
9595
#### Creation of a hidden service for a persistent .onion address
9696
97-
To have a persistent .onion address other nodes can connect to, it
97+
To have a persistent .onion address other nodes can connect to, it
9898
is necessary to set up a [Tor Hidden Service].
9999
100-
*NOTE: In the case where only non-persistent addresses are required,
100+
*NOTE: In the case where only non-persistent addresses are required,
101101
you don't have to create the hidden service and you can skip this part.*
102102
103103
Add these lines in the `/etc/tor/torrc` file:
@@ -117,31 +117,31 @@ HiddenServicePort 1234 127.0.0.1:9735
117117
````
118118
119119
The hidden lightning service will be reachable at port 1234 (global port)
120-
of the .onion address, which will be created at the restart of the
120+
of the .onion address, which will be created at the restart of the
121121
Tor service. Both types of addresses can coexist on the same node.
122122
123123
Save the file and restart the Tor service. In linux:
124124
125-
`/etc/init.d/tor restart` or `sudo systemctl start tor` depending
125+
`/etc/init.d/tor restart` or `sudo systemctl start tor` depending
126126
on the configuration of your system.
127127
128128
You will find the newly created address with:
129129
130130
```
131-
sudo cat /var/lib/tor/lightningd-service_v2/hostname
131+
sudo cat /var/lib/tor/lightningd-service_v2/hostname
132132
```
133133
or
134134
```
135-
sudo cat /var/lib/tor/lightningd-service_v3/hostname
135+
sudo cat /var/lib/tor/lightningd-service_v3/hostname
136136
```
137-
in the
137+
in the
138138
case of a version 3 Tor address.
139139
140140
Now you are able to create:
141141
142142
* Non-persistent version 2 .onion address via auto service (temp-v2)
143143
144-
* Persistent version 2 and version 3 .onion addresseses (v2 and v3).
144+
* Persistent version 2 and version 3 .onion addresseses (v2 and v3).
145145
146146
Let's see how to use them.
147147
@@ -160,34 +160,34 @@ Let's see how to use them.
160160
161161
NOTE:
162162
163-
1. v2: The Version 2 onion address is persistent across Tor service restarts.
163+
1. v2: The Version 2 onion address is persistent across Tor service restarts.
164164
It is created when you create the [Tor Hidden Service](#Creation-of-an-hidden-service-for-a-persistent-onion-address).
165165
166-
2. temp-v2: The Version 2 onion address changes at each restart of the Tor service.
166+
2. temp-v2: The Version 2 onion address changes at each restart of the Tor service.
167167
A non-persistent .onion address is generated by accessing an [auto service](#creation-of-an-auto-service-for-non-persistent-onion-addresses).
168168
169169
3. All the v3 addresses referes to [.onion addresses version 3].
170170
171-
4. In all the "Incoming" use case, the node can also make "Outgoing" Tor
172-
connections (connect to a .onion address) by adding the
171+
4. In all the "Incoming" use case, the node can also make "Outgoing" Tor
172+
connections (connect to a .onion address) by adding the
173173
`--proxy=127.0.0.1:9050` option.
174174
175-
#### Case 1 c-lightning has a public IP address and no Tor hidden service address, but can connect to an onion address via a Tor socks 5 proxy.
175+
#### Case 1 c-lightning has a public IP address and no Tor hidden service address, but can connect to an onion address via a Tor socks 5 proxy.
176176
177-
Without a .onion address, the node won't be reachable through Tor by other
178-
nodes but it will always be able to `connect` to a Tor enabled node
179-
(outbound connections), passing the `connect` request through the Tor
180-
service socks5 proxy. When the Tor service starts it creates a socks5
181-
proxy which is by default at the address 127.0.0.1:9050.
177+
Without a .onion address, the node won't be reachable through Tor by other
178+
nodes but it will always be able to `connect` to a Tor enabled node
179+
(outbound connections), passing the `connect` request through the Tor
180+
service socks5 proxy. When the Tor service starts it creates a socks5
181+
proxy which is by default at the address 127.0.0.1:9050.
182182
183-
If the node is started with the option `--proxy=127.0.0.1:9050` the node
184-
will be always able to connect to nodes with .onion address through the socks5
185-
proxy.
183+
If the node is started with the option `--proxy=127.0.0.1:9050` the node
184+
will be always able to connect to nodes with .onion address through the socks5
185+
proxy.
186186
187-
**You can always add this option, also in the other use cases, to add outgoing
187+
**You can always add this option, also in the other use cases, to add outgoing
188188
Tor capabilities.**
189189
190-
If you want to `connect` to nodes ONLY via the Tor proxy, you have to add the
190+
If you want to `connect` to nodes ONLY via the Tor proxy, you have to add the
191191
`--always-use-proxy=true` option.
192192
193193
You can announce your public IP address through the usual method:
@@ -201,7 +201,7 @@ if the node is into an internal network
201201
```
202202
if the node is not inside an internal network.
203203
204-
TIP: If you are unsure which of the two is suitable for you, find your internal
204+
TIP: If you are unsure which of the two is suitable for you, find your internal
205205
and external address and see if they match.
206206
207207
In linux:
@@ -210,28 +210,28 @@ Discover your external IP address with: `curl ipinfo.io/ip`
210210
211211
and your internal IP Address with: `ip route get 1 | awk '{print $NF;exit}'`
212212
213-
If they match you can use the `--addr` command line option.
213+
If they match you can use the `--addr` command line option.
214214
215215
#### Case #2 c-lightning has a public IP address and a fixed Tor hidden service address that is persistent, so that external users can connect to this node.
216216
217217
To have your external IP address and your .onion address announced, you use the
218218
```
219-
--bind-addr=yourInternalIPAddress:port --announce-addr=yourexternalIPAddress:port --announce-addr=your.onionAddress:port`
219+
--bind-addr=yourInternalIPAddress:port --announce-addr=yourexternalIPAddress:port --announce-addr=your.onionAddress:port`
220220
```
221221
option.
222222
223-
If you are not inside an internal network you can use
223+
If you are not inside an internal network you can use
224224
```
225225
--addr=yourIPAddress:port --announce-addr=your.onionAddress:port
226226
```
227-
your.onionAddress is the one created with the Tor hidden service ([see above](#creation-of-an-hidden-service-for-a-persistent-onion-address)).
228-
The port is the one indicated as the hidden service port. If the hidden service creation
229-
line is `HiddenServicePort 1234 127.0.0.1:9735` the .onion address will be reachable at
227+
your.onionAddress is the one created with the Tor hidden service ([see above](#creation-of-an-hidden-service-for-a-persistent-onion-address)).
228+
The port is the one indicated as the hidden service port. If the hidden service creation
229+
line is `HiddenServicePort 1234 127.0.0.1:9735` the .onion address will be reachable at
230230
the 1234 port (the global port).
231231
232232
It will be possible to connect to this node with:
233233
```
234-
lightning-cli connect nodeID .onionAddress globalPort
234+
lightning-cli connect nodeID .onionAddress globalPort
235235
```
236236
through Tor where .onion address is in the form `xxxxxxxxxxxxxxxxxxxxxxxxxx.onion`, Or
237237
```
@@ -249,20 +249,20 @@ To announce your IP address to the network, you add:
249249
```
250250
or `--addr=yourExternalIPAddress`if you are NOT on an internal network.
251251
252-
To get your non-persistent Tor address, add
253-
`--addr=autotor:127.0.0.1:9051` if you want to announce it or
252+
To get your non-persistent Tor address, add
253+
`--addr=autotor:127.0.0.1:9051` if you want to announce it or
254254
`--bind-addr=autotor:127.0.0.1:9051` if you don't want to announce it.
255255
256-
If the auto service is protected by password ([see above](#service-authenticated-by-password)) it is necessary to
257-
specify it with the option `--tor-service-password=yourpassword` (not the hash).
256+
If the auto service is protected by password ([see above](#service-authenticated-by-password)) it is necessary to
257+
specify it with the option `--tor-service-password=yourpassword` (not the hash).
258258
259-
You will obtain the generated non persisten .onion address by reading the results of the
260-
`lightning-cli getinfo` command. Other nodes will be able to connect to the
259+
You will obtain the generated non persisten .onion address by reading the results of the
260+
`lightning-cli getinfo` command. Other nodes will be able to connect to the
261261
.onion address through the 9735 port.
262262
263263
#### Case #4 c-lightning has no public IP address, but has a fixed Tor hidden service address that is persistent
264264
265-
Other nodes can connect to the announced .onion address created with the
265+
Other nodes can connect to the announced .onion address created with the
266266
hidden service ([see above](#creation-of-an-hidden-service-for-a-persistent-onion-address)).
267267
268268
In this case In the `lightningd` command line you will specify:
@@ -281,28 +281,28 @@ You specify just:
281281
In the `lightningd` command line.
282282
283283
Other nodes will not be able to `connect` to you unless you communicate them how to reach you.
284-
You will find your .onion address with the command `lightning-cli getinfo` and the other nodes will
284+
You will find your .onion address with the command `lightning-cli getinfo` and the other nodes will
285285
be able to connect to it through the 9735 port.
286286
287287
#### Case #6 c-lightning has a public IP address and a fixed Tor V3 service address and a Tor V2 service address
288288
289-
You will be reachable via Clearnet, via Tor to the .onion V3 address and the
290-
.onion V2 address if this last is communicated to the node that wants to
289+
You will be reachable via Clearnet, via Tor to the .onion V3 address and the
290+
.onion V2 address if this last is communicated to the node that wants to
291291
connect with our node.
292292
293-
to make your external IP address public you add:
293+
to make your external IP address public you add:
294294
```
295-
--bind-addr=yourInternalAddress:port --announce-addr=yourexternalIPAddress:port`.
295+
--bind-addr=yourInternalAddress:port --announce-addr=yourexternalIPAddress:port`.
296296
```
297297
If the node is not on an internal network the option will be:
298298
`--addr=yourexternalIPAddress:port`.
299299
300-
Once the .onion addresses have been created with the procedures [oulined above](#creation-of-an-hidden-service-for-a-persistent-onion-address),
300+
Once the .onion addresses have been created with the procedures [oulined above](#creation-of-an-hidden-service-for-a-persistent-onion-address),
301301
the node is already reachable at the .onion address.
302302
303-
To make your external .onion addresses public you add:
303+
To make your external .onion addresses public you add:
304304
```
305-
--announce-addr=.onionAddressV2:port --announce-addr=.onionAddressV3:port
305+
--announce-addr=.onionAddressV2:port --announce-addr=.onionAddressV3:port
306306
```
307307
to the options to publish your IP number.
308308
@@ -312,27 +312,27 @@ External users can connect to this node by Tor V2 and V3 and a random V2 until n
312312
313313
The Persistent addresses can be created with the steps [outlined above](#creation-of-an-hidden-service-for-a-persistent-onion-address).
314314
315-
To create your non-persistent Tor address, add
316-
`--addr=autotor:127.0.0.1:9051` if you want to announce it or
315+
To create your non-persistent Tor address, add
316+
`--addr=autotor:127.0.0.1:9051` if you want to announce it or
317317
`--bind-addr=autotor:127.0.0.1:9051` if you don't want to announce it.
318318
319-
Also you must specify `--tor-service-password=yourpassword` (not the hash) to access the
319+
Also you must specify `--tor-service-password=yourpassword` (not the hash) to access the
320320
Tor service at 9051 If you have protected them with the password (no additional options if
321321
they are protected with a cookie file. [See above](#creation-of-an-auto-service-for-non-persistent-onion-addresses)).
322322
323-
To make your external .onion address (V2 and V3) public you add:
323+
To make your external .onion address (V2 and V3) public you add:
324324
```
325325
--bind-addr=yourInternalIPAddress:port --announce-addr=your.onionAddressV2:port --announce-addr=your.onionAddressV3:port
326326
```
327327
#### Case #8 c-lightning has a public IP address and no Tor addresses
328328
329-
The external address is communicated by the
329+
The external address is communicated by the
330330
```
331331
--bind-addr=internalIPAddress:port --announce-addr=yourexternalIPAddress:port`
332332
```
333333
or `--addr=yourexternalIPAddress:port` if the node is not inside an internal network.
334334
335-
The node can connect to any V4/6 ip address via a IPV4/6 socks 5 proxy by specifing
335+
The node can connect to any V4/6 ip address via a IPV4/6 socks 5 proxy by specifing
336336
```
337337
--proxy=127.0.0.1:9050 --always-use-proxy=true
338338
```
@@ -345,4 +345,4 @@ The node can connect to any V4/6 ip address via a IPV4/6 socks 5 proxy by specif
345345
346346
[Tor Hidden Service]: https://www.torproject.org/docs/onion-services.html.en
347347
348-
[.onion addresses version 3]: https://blog.torproject.org/we-want-you-test-next-gen-onion-services
348+
[.onion addresses version 3]: https://blog.torproject.org/we-want-you-test-next-gen-onion-services

0 commit comments

Comments
 (0)