Browse Source

update TOR.md to latest changes

Signed-off-by: Saibato <saibato.naga@protonmail.com>
ppa-0.6.1
Saibato 7 years ago
committed by Rusty Russell
parent
commit
8659745ca6
  1. 62
      doc/TOR.md

62
doc/TOR.md

@ -22,7 +22,7 @@ what do we support
that (changes at each restart and that vanish at restart of tor)
so that external users can connect to this node by TOR V2 and V3 and IP
7 c-lightning has nop public IP address and a fixed TOR V3 service address and fixed TOR V2 service address
7 c-lightning has no public IP address and a fixed TOR V3 service address and fixed TOR V2 service address
a 3rd V2 address that (changes at each restart and that vanish at restart of tor)
so that external users can connect to this node by TOR V2 and V3 and a random V2 until next tor release then also (V3 randomly)
@ -72,67 +72,73 @@ and
then you can use c-lightning with following options
--tor-service-password=yourpassword to access the tor service at 9051
--tor-service-password=yourpassword (not the hash) to access the tor service at 9051
--proxy=127.0.0.1:9050 : set the Tor proxy to use
or the password for the service if cookiefile is not accessable
--announce-addr=autotor:<torservice> : try to generate an temp V2 onion addr.
--announce-addr=autotor:<torservice_ip:port> : try to generate an temp V2 onion addr.
NOTE if --always-use-proxy set all traffic will be rooted over the proxy, or if no non-TOR addresses are announced.
you can also set a fixed onion addr by option
--addr=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion (V2 or V3 is allowed)
you can also set a fixed announce onion addr by option
--announce-addr=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion[:port] (V2 or V3 is allowed)
this addr can be created by
this addr can be created
in /etc/tor/torrc
HiddenServiceDir /var/lib/tor/bitcoin-service_v2/
HiddenServiceVersion 2
HiddenServicePort 8333 127.0.0.1:8333
HiddenServicePort 1234 127.0.0.1:9735
and in later v3 enabled tor version's you can use for V3
HiddenServiceDir /var/lib/tor/other_hidden_service_v3/
HiddenServiceVersion 3
HiddenServicePort 9735 127.0.0.1:9735
HiddenServicePort 1234 127.0.0.1:9735
in /etc/tor/torrc
the addr for
the --addr option
the --announce-addr option
or legacy use
you find after /etc/init.d/tor restart
i.e.
in /var/lib/tor/other_hidden_service_v3/hostname
to see your onion addr use
cli/lightning-cli getinfo
the .onion addr has not to be announced to other nodes
but you can with --announce-addr=xxxxxxxxxxxxxxxxxxxxxxx.onion[:port]
if the < port_global: 127.0.0.1:port_local > in torrc fit with your
lightningd options
--bind-addr=xxx.xxx.xxx.xxx:port_local
--addr=xxx.xxx.xxx.xxx:port_local
you can use the cli command : connect peerid xxxxxxxxxxxxxxxx.onion port_global
some examples:
sudo lightningd/lightningd --network=testnet --bind-addr=127.0.0.1:1234
--proxy=127.0.0.1:9050 --addr=autotor:127.0.0.1:9051
--proxy=127.0.0.1:9050 --addr=autotor:127.0.0.1:9051 (auto binds 9735 global <--> local 1234)
this will try to generate an V2 auto hidden-service by reading the tor cookie file and
also create an not announced local ip address at port 1234
the .onion addr will show with the cli command getinfo
this will try to generate an V2 auto hidden-service by reading the tor cookie and
also create local ipaddr at port 1234
so the node is accessableby connect peerid xxxxxxxxxxxxxxxx.onion 9735
or local by connect ID 127.0.0.1 1234
the node is accessible by connect peerid xxxxxxxxxxxxxxxx.onion 9735
or local by connect peerID 127.0.0.1 1234
lightningd/lightningd --network=testnet --bind-addr=127.0.0.1
--proxy=127.0.0.1:9050 --addr=xxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion:1234
--proxy=127.0.0.1:9050 --announce-addr=xxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion:1234
this will use the hidden-service set by /etc/tor/torrc and use the hidden service
so the node is accessable by connect peerid xxxxxxxxxxxxxxxxxxxxxxxx.onion 1234
or
lightningd/lightningd --network=testnet --bind-addr=127.0.0.1:1234
--proxy=127.0.0.1:9050 --addr=xxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion:1234
this will use the hidden-service set by /etc/tor/torrc and use the hidden service
so the node is only accessable by connect peerid xxxxxxxxxxxxxxxxxxxxxxxonion 1234
this will use the hidden-service V2 or V3 set by /etc/tor/torrc and use the hidden service
so the node is accessable by connect peerID xxxxxxxxxxxxxxxxxxxxxxxx.onion 1234
for connects you can use
for connects to a tor enabled node you can use
i.e cli/lightning-cli connect peerID xxxxxxxxxxxxxxxxxxxxxxx.onion 1234

Loading…
Cancel
Save