It's a c++: use string.clear()
[novacoin.git] / doc / tor.md
1 TOR SUPPORT IN NOVACOIN
2 ======================
3
4 It is possible to run Novacoin as a Tor hidden service, and connect to such services.
5
6 The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on a random port. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly
7 configure Tor.
8
9
10 1. Run novacoin behind a Tor proxy
11 ---------------------------------
12
13 The first step is running Novacoin behind a Tor proxy. This will already make all
14 outgoing connections be anonymized, but more is possible.
15
16         -proxy=ip:port  Set the proxy server. If SOCKS5 is selected (default), this proxy
17                         server will be used to try to reach .onion addresses as well.
18         
19         -onion=ip:port  Set the proxy server to use for tor hidden services. You do not
20                         need to set this if it's the same as -proxy. You can use -noonion
21                         to explicitly disable access to hidden service.
22         
23         -listen         When using -proxy, listening is disabled by default. If you want
24                         to run a hidden service (see next section), you'll need to enable
25                         it explicitly.
26         
27         -connect=X      When behind a Tor proxy, you can specify .onion addresses instead
28         -addnode=X      of IP addresses or hostnames in these parameters. It requires
29         -seednode=X     SOCKS5. In Tor mode, such addresses can also be exchanged with
30                         other P2P nodes.
31
32 In a typical situation, this suffices to run behind a Tor proxy:
33
34         ./novacoin -proxy=127.0.0.1:9050
35
36
37 2. Run a novacoin hidden server
38 ------------------------------
39
40 If you configure your Tor system accordingly, it is possible to make your node also
41 reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equivalent
42 config file):
43
44         HiddenServiceDir /var/lib/tor/novacoin-service/
45         HiddenServicePort 7777 127.0.0.1:7777
46         HiddenServicePort 17777 127.0.0.1:17777
47
48 The directory can be different of course, but (both) port numbers should be equal to
49 your novacoind's P2P listen port (7777 by default, 17777 by default for testnet).
50
51         -externalip=X   You can tell novacoin about its publicly reachable address using
52                         this option, and this can be a .onion address. Given the above
53                         configuration, you can find your onion address in
54                         /var/lib/tor/novacoin-service/hostname. Onion addresses are given
55                         preference for your node to advertize itself with, for connections
56                         coming from unroutable addresses (such as 127.0.0.1, where the
57                         Tor proxy typically runs).
58         
59         -listen         You'll need to enable listening for incoming connections, as this
60                         is off by default behind a proxy.
61         
62         -discover       When -externalip is specified, no attempt is made to discover local
63                         IPv4 or IPv6 addresses. If you want to run a dual stack, reachable
64                         from both Tor and IPv4 (or IPv6), you'll need to either pass your
65                         other addresses using -externalip, or explicitly enable -discover.
66                         Note that both addresses of a dual-stack system may be easily
67                         linkable using traffic analysis.
68
69 In a typical situation, where you're only reachable via Tor, this should suffice:
70
71         ./novacoind -proxy=127.0.0.1:9050 -externalip=youraddress.onion -listen
72
73 (obviously, replace the Onion address with your own). If you don't care too much
74 about hiding your node, and want to be reachable on IPv4 as well, additionally
75 specify:
76
77         ./novacoind ... -discover
78
79 and open port 7777 on your firewall.
80
81 If you only want to use Tor to reach onion addresses, but not use it as a proxy
82 for normal IPv4/IPv6 communication, use:
83
84         ./novacoin -onion=127.0.0.1:9050 -externalip=youraddress.onion -discover
85
86 Known addresses of novacoin nodes
87
88         seedp4knqnoei57u.onion
89         seedr3hhlepyi7fd.onion
90         seed3uuomkclbiz4.onion
91         seedeh7qck3ouff5.onion
92         seedt3sraf53ajiy.onion
93         seedg4qyccsg42oq.onion
94         novaqrtoywpg7jly.onion
95         seed3d5wolqbgrcb.onion
96         seed24u5dwph3qw4.onion
97         mj26ulzbs2oskgym.onion
98         eqon4usunavt76m7.onion
99         5rg3vq4jagckeckf.onion