@@ -9,25 +9,33 @@ started with I2P terminology.
9
9
10
10
## Run Dash Core with an I2P router (proxy)
11
11
12
- A running I2P router (proxy) with [ SAM] ( https://geti2p.net/en/docs/api/samv3 )
13
- enabled is required (there is an [ official one] ( https://geti2p.net ) and
14
- [ a few alternatives] ( https://en.wikipedia.org/wiki/I2P#Routers ) ). Notice the IP
15
- address and port the SAM proxy is listening to; usually, it is
16
- ` 127.0.0.1:7656 ` . Once it is up and running with SAM enabled, use the following
17
- Dash Core options:
12
+ A running I2P router (proxy) is required with the [ SAM] ( https://geti2p.net/en/docs/api/samv3 )
13
+ application bridge enabled. The following routers are recommended for use with Dash Core:
14
+
15
+ - [ i2prouter (I2P Router)] ( https://geti2p.net ) , the official implementation in
16
+ Java. The SAM bridge is not enabled by default; it must be started manually,
17
+ or configured to start automatically, in the Clients page in the
18
+ router console (` http://127.0.0.1:7657/configclients ` ) or in the ` clients.config ` file.
19
+ - [ i2pd (I2P Daemon)] ( https://github.com/PurpleI2P/i2pd )
20
+ ([ documentation] ( https://i2pd.readthedocs.io/en/latest ) ), a lighter
21
+ alternative in C++. It enables the SAM bridge by default.
22
+
23
+ Note the IP address and port the SAM proxy is listening to; usually, it is
24
+ ` 127.0.0.1:7656 ` .
25
+
26
+ Once an I2P router with SAM enabled is up and running, use the following Dash
27
+ Core configuration options:
18
28
19
29
```
20
30
-i2psam=<ip:port>
21
31
I2P SAM proxy to reach I2P peers and accept I2P connections (default:
22
32
none)
23
33
24
34
-i2pacceptincoming
25
- If set and -i2psam is also set then incoming I2P connections are
26
- accepted via the SAM proxy. If this is not set but -i2psam is set
27
- then only outgoing connections will be made to the I2P network.
28
- Ignored if -i2psam is not set. Listening for incoming I2P
29
- connections is done through the SAM proxy, not by binding to a
30
- local address and port (default: 1)
35
+ Whether to accept inbound I2P connections (default: 1). Ignored if
36
+ -i2psam is not set. Listening for inbound I2P connections is
37
+ done through the SAM proxy, not by binding to a local address and
38
+ port.
31
39
```
32
40
33
41
In a typical situation, this suffices:
@@ -36,26 +44,68 @@ In a typical situation, this suffices:
36
44
dashd -i2psam=127.0.0.1:7656
37
45
```
38
46
39
- The first time Dash Core connects to the I2P router, its I2P address (and
40
- corresponding private key) will be automatically generated and saved in a file
41
- named ` i2p_private_key ` in the Dash Core data directory.
42
-
43
47
## Additional configuration options related to I2P
44
48
45
- You may set the ` debug=i2p ` config logging option to have additional
46
- information in the debug log about your I2P configuration and connections. Run
47
- ` dash-cli help logging ` for more information.
49
+ ```
50
+ -debug=i2p
51
+ ```
52
+
53
+ Set the ` debug=i2p ` config logging option to see additional information in the
54
+ debug log about your I2P configuration and connections. Run `dash-cli help
55
+ logging` for more information.
56
+
57
+ ```
58
+ -onlynet=i2p
59
+ ```
60
+
61
+ Make outgoing connections only to I2P addresses. Incoming connections are not
62
+ affected by this option. It can be specified multiple times to allow multiple
63
+ network types, e.g. onlynet=ipv4, onlynet=ipv6, onlynet=onion, onlynet=i2p.
64
+
65
+ Warning: if you use -onlynet with values other than onion, and the -onion or
66
+ -proxy option is set, then outgoing onion connections will still be made; use
67
+ -noonion or -onion=0 to disable outbound onion connections in this case.
48
68
49
- It is possible to restrict outgoing connections in the usual way with
50
- ` onlynet=i2p ` . I2P support was added to Dash Core in version 20.0 (fall 2023)
51
- and there may be fewer I2P peers than Tor or IP ones. Therefore, using
52
- ` onlynet=i2p ` alone (without other ` onlynet= ` ) may make a node more susceptible
53
- to [ Sybil attacks] ( https://en.dash.it/wiki/Weaknesses#Sybil_attack ) . Use
69
+ I2P support was added to Dash Core in version 20.0 and there may be fewer I2P
70
+ peers than Tor or IP ones. Therefore, using I2P alone without other networks may
71
+ make a node more susceptible to [ Sybil
72
+ attacks] ( https://en.bitcoin.it/wiki/Weaknesses#Sybil_attack ) . You can use
54
73
` dash-cli -addrinfo ` to see the number of I2P addresses known to your node.
55
74
56
- ## I2P related information in Dash Core
75
+ Another consideration with ` onlynet=i2p ` is that the initial blocks download
76
+ phase when syncing up a new node can be very slow. This phase can be sped up by
77
+ using other networks, for instance ` onlynet=onion ` , at the same time.
78
+
79
+ In general, a node can be run with both onion and I2P hidden services (or
80
+ any/all of IPv4/IPv6/onion/I2P), which can provide a potential fallback if one
81
+ of the networks has issues.
82
+
83
+ ## Persistent vs transient I2P addresses
84
+
85
+ The first time Dash Core connects to the I2P router, it automatically
86
+ generates a persistent I2P address and its corresponding private key by default
87
+ or if ` -i2pacceptincoming=1 ` is set. The private key is saved in a file named
88
+ ` i2p_private_key ` in the Dash Core data directory. The persistent I2P
89
+ address is used for making outbound connections and accepting inbound
90
+ connections.
91
+
92
+ In the I2P network, the receiver of an inbound connection sees the address of
93
+ the initiator. This is unlike the Tor network, where the recipient does not
94
+ know who is connecting to it.
57
95
58
- There are several ways to see your I2P address in Dash Core:
96
+ If your node is configured by setting ` -i2pacceptincoming=0 ` to not accept
97
+ inbound I2P connections, then it will use a random transient I2P address for
98
+ itself on each outbound connection to make it harder to discriminate,
99
+ fingerprint or analyze it based on its I2P address.
100
+
101
+ I2P addresses are designed to be long-lived. Waiting for tunnels to be built
102
+ for every peer connection adds delay to connection setup time. Therefore, I2P
103
+ listening should only be turned off if really needed.
104
+
105
+ ## Fetching I2P-related information from Dash Core
106
+
107
+ There are several ways to see your I2P address in Dash Core if accepting
108
+ incoming I2P connections (` -i2pacceptincoming ` ):
59
109
- in the debug log (grep for ` AddLocal ` , the I2P address ends in ` .b32.i2p ` )
60
110
- in the output of the ` getnetworkinfo ` RPC in the "localaddresses" section
61
111
- in the output of ` dash-cli -netinfo ` peer connections dashboard
@@ -73,8 +123,7 @@ to connect to the I2P network. Any I2P router that supports it can be used.
73
123
74
124
## Ports in I2P and Dash Core
75
125
76
- Dash Core uses the [ SAM v3.1] ( https://geti2p.net/en/docs/api/samv3 )
77
- protocol. One particularity of SAM v3.1 is that it does not support ports,
126
+ One particularity of SAM v3.1 is that it does not support ports,
78
127
unlike newer versions of SAM (v3.2 and up) that do support them and default the
79
128
port numbers to 0. From the point of view of peers that use newer versions of
80
129
SAM or other protocols that support ports, a SAM v3.1 peer is connecting to them
@@ -85,3 +134,40 @@ listening port to 0 when listening for incoming I2P connections and advertises
85
134
its own I2P address with port 0. Furthermore, it will not attempt to connect to
86
135
I2P addresses with a non-zero port number because with SAM v3.1 the destination
87
136
port (` TO_PORT ` ) is always set to 0 and is not in the control of Dash Core.
137
+
138
+ ## Bandwidth
139
+
140
+ By default, your node shares bandwidth and transit tunnels with the I2P network
141
+ in order to increase your anonymity with cover traffic, help the I2P router used
142
+ by your node integrate optimally with the network, and give back to the network.
143
+ It's important that the nodes of a popular application like Dash contribute
144
+ as much to the I2P network as they consume.
145
+
146
+ It is possible, though strongly discouraged, to change your I2P router
147
+ configuration to limit the amount of I2P traffic relayed by your node.
148
+
149
+ With ` i2pd ` , this can be done by adjusting the ` bandwidth ` , ` share ` and
150
+ ` transittunnels ` options in your ` i2pd.conf ` file. For example, to limit total
151
+ I2P traffic to 256KB/s and share 50% of this limit for a maximum of 20 transit
152
+ tunnels:
153
+
154
+ ```
155
+ bandwidth = 256
156
+ share = 50
157
+
158
+ [limits]
159
+ transittunnels = 20
160
+ ```
161
+
162
+ Similar bandwidth configuration options for the Java I2P router can be found in
163
+ ` http://127.0.0.1:7657/config ` under the "Bandwidth" tab.
164
+
165
+ Before doing this, please see the "Participating Traffic Considerations" section
166
+ in [ Embedding I2P in your Application] ( https://geti2p.net/en/docs/applications/embedding ) .
167
+
168
+ In most cases, the default router settings should work fine.
169
+
170
+ ## Bundling I2P in a Dash application
171
+
172
+ Please see the "General Guidance for Developers" section in https://geti2p.net/en/docs/api/samv3
173
+ if you are developing a downstream application that may be bundling I2P with Dash.
0 commit comments