Skip to content

Commit 825bba1

Browse files
32f8fda merge bitcoin#24991: allow startup with -onlynet=onion -listenonion=1 (Kittywhiskers Van Gogh) e67ed92 merge bitcoin#25173: add coverage for unknown network in -onlynet (Kittywhiskers Van Gogh) 77efd36 merge bitcoin#24687: Check an invalid -i2psam will raise an init error (Kittywhiskers Van Gogh) fb1416f merge bitcoin#24205: improve network reachability test coverage and safety (Kittywhiskers Van Gogh) 7cb7479 merge bitcoin#24663: add links to doc/cjdns.md (Kittywhiskers Van Gogh) c736ebf merge bitcoin#24555: create initial doc/cjdns.md for CJDNS how-to documentation (Kittywhiskers Van Gogh) 554bd24 partial bitcoin#24468: improve -onlynet help and related tor/i2p documentation (Kittywhiskers Van Gogh) 5436b6a merge bitcoin#24165: extend inbound eviction protection by network to CJDNS peers (Kittywhiskers Van Gogh) d52724d merge bitcoin#22834: respect -onlynet= when making outbound connections (Kittywhiskers Van Gogh) f9d1a9a merge bitcoin#23077: Full CJDNS support (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * Depends on #6034 * Depends on #6035 * If `-proxy=` is given together with `-noonion` then the provided proxy will not be set as a proxy for reaching the Tor network. So it will not be possible to open manual connections to the Tor network for example with the `addnode` RPC. To mimic the old behavior use `-proxy=` together with `-onlynet=` listing all relevant networks except `onion`. * [bitcoin#24165](bitcoin#24165) has been backported _before_ [bitcoin#23758](bitcoin#23758) and to account for this, minor changes were made in `src/test/net_peer_eviction_tests.cpp` (using `nTimeConnected` instead of `m_connected`). When backporting [bitcoin#23758](bitcoin#23758), these changes will have to be reversed as they won't be covered by the cherry-pick diff. * CJDNS support has been labelled as being introduced in Dash Core 21.0, in line with the milestone designation of the PR. Should `develop` be used for a new minor/patch release, `doc/cjdns.md` will have to be modified to reflect the correct version number. ## Breaking changes No expected protocol or consensus changes. ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK 32f8fda Tree-SHA512: e23b22ca5edbe4c4abeab0bc07780303e68e7c4cc46b7697300b0837c5acd3a98649b6b03bd07a23c827bd85f64210173027b0b0eea31872c031fa4ed04eeb0c
2 parents d7413ff + 32f8fda commit 825bba1

25 files changed

+546
-115
lines changed

contrib/seeds/generate-seeds.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def name_to_bip155(addr):
5454
raise ValueError('Invalid onion %s' % vchAddr)
5555
elif '.' in addr: # IPv4
5656
return (BIP155Network.IPV4, bytes((int(x) for x in addr.split('.'))))
57-
elif ':' in addr: # IPv6
57+
elif ':' in addr: # IPv6 or CJDNS
5858
sub = [[], []] # prefix, suffix
5959
x = 0
6060
addr = addr.split(':')
@@ -70,7 +70,14 @@ def name_to_bip155(addr):
7070
sub[x].append(val & 0xff)
7171
nullbytes = 16 - len(sub[0]) - len(sub[1])
7272
assert((x == 0 and nullbytes == 0) or (x == 1 and nullbytes > 0))
73-
return (BIP155Network.IPV6, bytes(sub[0] + ([0] * nullbytes) + sub[1]))
73+
addr_bytes = bytes(sub[0] + ([0] * nullbytes) + sub[1])
74+
if addr_bytes[0] == 0xfc:
75+
# Assume that seeds with fc00::/8 addresses belong to CJDNS,
76+
# not to the publicly unroutable "Unique Local Unicast" network, see
77+
# RFC4193: https://datatracker.ietf.org/doc/html/rfc4193#section-8
78+
return (BIP155Network.CJDNS, addr_bytes)
79+
else:
80+
return (BIP155Network.IPV6, addr_bytes)
7481
else:
7582
raise ValueError('Could not parse address %s' % addr)
7683

doc/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The Dash Core repo's [root README](/README.md) contains relevant information on
6969
### Miscellaneous
7070
- [Assets Attribution](assets-attribution.md)
7171
- [dash.conf Configuration File](dash-conf.md)
72+
- [CJDNS Support](cjdns.md)
7273
- [Files](files.md)
7374
- [Fuzz-testing](fuzzing.md)
7475
- [I2P Support](i2p.md)

doc/cjdns.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# CJDNS support in Dash Core
2+
3+
It is possible to run Dash Core over CJDNS, an encrypted IPv6 network that
4+
uses public-key cryptography for address allocation and a distributed hash table
5+
for routing.
6+
7+
## What is CJDNS?
8+
9+
CJDNS is like a distributed, shared VPN with multiple entry points where every
10+
participant can reach any other participant. All participants use addresses from
11+
the `fc00::/8` network (reserved IPv6 range). Installation and configuration is
12+
done outside of Dash Core, similarly to a VPN (either in the host/OS or on
13+
the network router).
14+
15+
Compared to IPv4/IPv6, CJDNS provides end-to-end encryption and protects nodes
16+
from traffic analysis and filtering.
17+
18+
Used with Tor and I2P, CJDNS is a complementary option that can enhance network
19+
redundancy and robustness for both the Dash network and individual nodes.
20+
21+
Each network has different characteristics. For instance, Tor is widely used but
22+
somewhat centralized. I2P connections have a source address and I2P is slow.
23+
CJDNS is fast but does not hide the sender and the recipient from intermediate
24+
routers.
25+
26+
## Installing CJDNS and connecting to the network
27+
28+
To install and set up CJDNS, follow the instructions at
29+
https://github.com/cjdelisle/cjdns#cjdns.
30+
31+
Don't skip steps
32+
["2. Find a friend"](https://github.com/cjdelisle/cjdns#2-find-a-friend) and
33+
["3. Connect your node to your friend's
34+
node"](https://github.com/cjdelisle/cjdns#3-connect-your-node-to-your-friends-node).
35+
You need to be connected to the CJDNS network before it will work with your
36+
Dash Core node.
37+
38+
Typically, CJDNS might be launched from its directory with
39+
`sudo ./cjdroute < cjdroute.conf` and it sheds permissions after setting up the
40+
[TUN](https://en.wikipedia.org/wiki/TUN/TAP) interface. You may also [launch it as an
41+
unprivileged user](https://github.com/cjdelisle/cjdns/blob/master/doc/non-root-user.md)
42+
with some additional setup.
43+
44+
The network connection can be checked by running `./tools/peerStats` from the
45+
CJDNS directory.
46+
47+
## Run Dash Core with CJDNS
48+
49+
Once you are connected to the CJDNS network, the following Dash Core
50+
configuration option makes CJDNS peers automatically reachable:
51+
52+
```
53+
-cjdnsreachable
54+
```
55+
56+
When enabled, this option tells Dash Core that it is running in an
57+
environment where a connection to an `fc00::/8` address will be to the CJDNS
58+
network instead of to an [RFC4193](https://datatracker.ietf.org/doc/html/rfc4193)
59+
IPv6 local network. This helps Dash Core perform better address management:
60+
- Your node can consider incoming `fc00::/8` connections to be from the CJDNS
61+
network rather than from an IPv6 private one.
62+
- If one of your node's local addresses is `fc00::/8`, then it can choose to
63+
gossip that address to peers.
64+
65+
## Additional configuration options related to CJDNS
66+
67+
```
68+
-onlynet=cjdns
69+
```
70+
71+
Make automatic outbound connections only to CJDNS addresses. Inbound and manual
72+
connections are not affected by this option. It can be specified multiple times
73+
to allow multiple networks, e.g. onlynet=cjdns, onlynet=i2p, onlynet=onion.
74+
75+
CJDNS support was added to Dash Core in version 21.0 and there may be fewer
76+
CJDNS peers than Tor or IP ones. You can use `dash-cli -addrinfo` to see the
77+
number of CJDNS addresses known to your node.
78+
79+
In general, a node can be run with both an onion service and CJDNS (or any/all
80+
of IPv4/IPv6/onion/I2P/CJDNS), which can provide a potential fallback if one of
81+
the networks has issues. There are a number of ways to configure this; see
82+
[doc/tor.md](https://github.com/dashpay/dash/blob/master/doc/tor.md) for
83+
details.
84+
85+
## CJDNS-related information in Dash Core
86+
87+
There are several ways to see your CJDNS address in Dash Core:
88+
- in the "Local addresses" output of CLI `-netinfo`
89+
- in the "localaddresses" output of RPC `getnetworkinfo`
90+
91+
To see which CJDNS peers your node is connected to, use `dash-cli -netinfo 4`
92+
or the `getpeerinfo` RPC (i.e. `dash-cli getpeerinfo`).
93+
94+
To see which CJDNS addresses your node knows, use the `getnodeaddresses 0 cjdns`
95+
RPC.

doc/i2p.md

+8-12
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,9 @@ logging` for more information.
5858
-onlynet=i2p
5959
```
6060

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.
61+
Make automatic outbound connections only to I2P addresses. Inbound and manual
62+
connections are not affected by this option. It can be specified multiple times
63+
to allow multiple networks, e.g. onlynet=onion, onlynet=i2p.
6864

6965
I2P support was added to Dash Core in version 20.0 and there may be fewer I2P
7066
peers than Tor or IP ones. Therefore, using I2P alone without other networks may
@@ -77,8 +73,8 @@ phase when syncing up a new node can be very slow. This phase can be sped up by
7773
using other networks, for instance `onlynet=onion`, at the same time.
7874

7975
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.
76+
any/all of IPv4/IPv6/onion/I2P/CJDNS), which can provide a potential fallback if
77+
one of the networks has issues.
8278

8379
## Persistent vs transient I2P addresses
8480

@@ -106,9 +102,9 @@ listening should only be turned off if really needed.
106102

107103
There are several ways to see your I2P address in Dash Core if accepting
108104
incoming I2P connections (`-i2pacceptincoming`):
109-
- in the debug log (grep for `AddLocal`, the I2P address ends in `.b32.i2p`)
110-
- in the output of the `getnetworkinfo` RPC in the "localaddresses" section
111-
- in the output of `dash-cli -netinfo` peer connections dashboard
105+
- in the "Local addresses" output of CLI `-netinfo`
106+
- in the "localaddresses" output of RPC `getnetworkinfo`
107+
- in the debug log (grep for `AddLocal`; the I2P address ends in `.b32.i2p`)
112108

113109
To see which I2P peers your node is connected to, use `dash-cli -netinfo 4`
114110
or the `getpeerinfo` RPC (e.g. `dash-cli getpeerinfo`).

doc/release-notes-22834.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Updated settings
2+
----------------
3+
4+
- If `-proxy=` is given together with `-noonion` then the provided proxy will
5+
not be set as a proxy for reaching the Tor network. So it will not be
6+
possible to open manual connections to the Tor network for example with the
7+
`addnode` RPC. To mimic the old behavior use `-proxy=` together with
8+
`-onlynet=` listing all relevant networks except `onion`.

doc/tor.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ for how to properly configure Tor.
1111
## How to see information about your Tor configuration via Dash Core
1212

1313
There are several ways to see your local onion address in Dash Core:
14-
- in the debug log (grep for "tor:" or "AddLocal")
15-
- in the output of RPC `getnetworkinfo` in the "localaddresses" section
16-
- in the output of the CLI `-netinfo` peer connections dashboard
14+
- in the "Local addresses" output of CLI `-netinfo`
15+
- in the "localaddresses" output of RPC `getnetworkinfo`
16+
- in the debug log (grep for "AddLocal"; the Tor address ends in `.onion`)
1717

1818
You may set the `-debug=tor` config logging option to have additional
1919
information in the debug log about your Tor configuration.
@@ -22,6 +22,9 @@ CLI `-addrinfo` returns the number of addresses known to your node per
2222
network. This can be useful to see how many onion peers your node knows,
2323
e.g. for `-onlynet=onion`.
2424

25+
To fetch a number of onion addresses that your node knows, for example seven
26+
addresses, use the `getnodeaddresses 7 onion` RPC.
27+
2528
## 1. Run Dash Core behind a Tor proxy
2629

2730
The first step is running Dash Core behind a Tor proxy. This will already anonymize all
@@ -50,14 +53,10 @@ outgoing connections, but more is possible.
5053
-seednode=X SOCKS5. In Tor mode, such addresses can also be exchanged with
5154
other P2P nodes.
5255

53-
-onlynet=onion Make outgoing connections only to .onion addresses. Incoming
54-
connections are not affected by this option. This option can be
55-
specified multiple times to allow multiple network types, e.g.
56-
onlynet=ipv4, onlynet=ipv6, onlynet=onion, onlynet=i2p.
57-
Warning: if you use -onlynet with values other than onion, and
58-
the -onion or -proxy option is set, then outgoing onion
59-
connections will still be made; use -noonion or -onion=0 to
60-
disable outbound onion connections in this case.
56+
-onlynet=onion Make automatic outbound connections only to .onion addresses.
57+
Inbound and manual connections are not affected by this option.
58+
It can be specified multiple times to allow multiple networks,
59+
e.g. onlynet=onion, onlynet=i2p, onlynet=cjdns.
6160

6261
An example how to start the client if the Tor proxy is running on local host on
6362
port 9050 and only allows .onion nodes to connect:

src/init.cpp

+43-15
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,7 @@ void SetupServerArgs(NodeContext& node)
567567
argsman.AddArg("-allowprivatenet", strprintf("Allow RFC1918 addresses to be relayed and connected to (default: %u)", DEFAULT_ALLOWPRIVATENET), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
568568
argsman.AddArg("-bantime=<n>", strprintf("Default duration (in seconds) of manually configured bans (default: %u)", DEFAULT_MISBEHAVING_BANTIME), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
569569
argsman.AddArg("-bind=<addr>[:<port>][=onion]", strprintf("Bind to given address and always listen on it (default: 0.0.0.0). Use [host]:port notation for IPv6. Append =onion to tag any incoming connections to that address and port as incoming Tor connections (default: 127.0.0.1:%u=onion, testnet: 127.0.0.1:%u=onion, regtest: 127.0.0.1:%u=onion)", defaultBaseParams->OnionServiceTargetPort(), testnetBaseParams->OnionServiceTargetPort(), regtestBaseParams->OnionServiceTargetPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
570+
argsman.AddArg("-cjdnsreachable", "If set, then this host is configured for CJDNS (connecting to fc00::/8 addresses would lead us to the CJDNS network, see doc/cjdns.md) (default: 0)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
570571
argsman.AddArg("-connect=<ip>", "Connect only to the specified node; -noconnect disables automatic connections (the rules for this peer are the same as for -addnode). This option can be specified multiple times to connect to multiple nodes.", ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::CONNECTION);
571572
argsman.AddArg("-discover", "Discover own IP addresses (default: 1 when listening and no -externalip or -proxy)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
572573
argsman.AddArg("-dns", strprintf("Allow DNS lookups for -addnode, -seednode and -connect (default: %u)", DEFAULT_NAME_LOOKUP), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
@@ -584,7 +585,7 @@ void SetupServerArgs(NodeContext& node)
584585
argsman.AddArg("-onion=<ip:port>", "Use separate SOCKS5 proxy to reach peers via Tor onion services, set -noonion to disable (default: -proxy)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
585586
argsman.AddArg("-i2psam=<ip:port>", "I2P SAM proxy to reach I2P peers and accept I2P connections (default: none)", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
586587
argsman.AddArg("-i2pacceptincoming", strprintf("Whether to accept inbound I2P connections (default: %i). Ignored if -i2psam is not set. Listening for inbound I2P connections is done through the SAM proxy, not by binding to a local address and port.", DEFAULT_I2P_ACCEPT_INCOMING), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
587-
argsman.AddArg("-onlynet=<net>", "Make outgoing connections only through network <net> (" + Join(GetNetworkNames(), ", ") + "). Incoming connections are not affected by this option. This option can be specified multiple times to allow multiple networks. Warning: if it is used with non-onion networks and the -onion or -proxy option is set, then outbound onion connections will still be made; use -noonion or -onion=0 to disable outbound onion connections in this case.", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
588+
argsman.AddArg("-onlynet=<net>", "Make automatic outbound connections only to network <net> (" + Join(GetNetworkNames(), ", ") + "). Inbound and manual connections are not affected by this option. It can be specified multiple times to allow multiple networks.", ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
588589
argsman.AddArg("-peerblockfilters", strprintf("Serve compact block filters to peers per BIP 157 (default: %u)", DEFAULT_PEERBLOCKFILTERS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
589590
argsman.AddArg("-peerbloomfilters", strprintf("Support filtering of blocks and transaction with bloom filters (default: %u)", DEFAULT_PEERBLOOMFILTERS), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
590591
argsman.AddArg("-peertimeout=<n>", strprintf("Specify a p2p connection timeout delay in seconds. After connecting to a peer, wait this amount of time before considering disconnection based on inactivity (minimum: 1, default: %d)", DEFAULT_PEER_CONNECT_TIMEOUT), ArgsManager::ALLOW_ANY, OptionsCategory::CONNECTION);
@@ -1825,54 +1826,82 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
18251826
}
18261827
for (int n = 0; n < NET_MAX; n++) {
18271828
enum Network net = (enum Network)n;
1829+
assert(IsReachable(net));
18281830
if (!nets.count(net))
18291831
SetReachable(net, false);
18301832
}
18311833
}
18321834

1835+
if (!args.IsArgSet("-cjdnsreachable")) {
1836+
SetReachable(NET_CJDNS, false);
1837+
}
1838+
// Now IsReachable(NET_CJDNS) is true if:
1839+
// 1. -cjdnsreachable is given and
1840+
// 2.1. -onlynet is not given or
1841+
// 2.2. -onlynet=cjdns is given
1842+
18331843
// Check for host lookup allowed before parsing any network related parameters
18341844
fNameLookup = args.GetBoolArg("-dns", DEFAULT_NAME_LOOKUP);
18351845

1846+
Proxy onion_proxy;
1847+
18361848
bool proxyRandomize = args.GetBoolArg("-proxyrandomize", DEFAULT_PROXYRANDOMIZE);
18371849
// -proxy sets a proxy for all outgoing network traffic
18381850
// -noproxy (or -proxy=0) as well as the empty string can be used to not set a proxy, this is the default
18391851
std::string proxyArg = args.GetArg("-proxy", "");
1840-
SetReachable(NET_ONION, false);
18411852
if (proxyArg != "" && proxyArg != "0") {
18421853
CService proxyAddr;
18431854
if (!Lookup(proxyArg, proxyAddr, 9050, fNameLookup)) {
18441855
return InitError(strprintf(_("Invalid -proxy address or hostname: '%s'"), proxyArg));
18451856
}
18461857

1847-
proxyType addrProxy = proxyType(proxyAddr, proxyRandomize);
1858+
Proxy addrProxy = Proxy(proxyAddr, proxyRandomize);
18481859
if (!addrProxy.IsValid())
18491860
return InitError(strprintf(_("Invalid -proxy address or hostname: '%s'"), proxyArg));
18501861

18511862
SetProxy(NET_IPV4, addrProxy);
18521863
SetProxy(NET_IPV6, addrProxy);
1853-
SetProxy(NET_ONION, addrProxy);
1864+
SetProxy(NET_CJDNS, addrProxy);
18541865
SetNameProxy(addrProxy);
1855-
SetReachable(NET_ONION, true); // by default, -proxy sets onion as reachable, unless -noonion later
1866+
onion_proxy = addrProxy;
18561867
}
18571868

1869+
const bool onlynet_used_with_onion{args.IsArgSet("-onlynet") && IsReachable(NET_ONION)};
1870+
18581871
// -onion can be used to set only a proxy for .onion, or override normal proxy for .onion addresses
18591872
// -noonion (or -onion=0) disables connecting to .onion entirely
18601873
// An empty string is used to not override the onion proxy (in which case it defaults to -proxy set above, or none)
18611874
std::string onionArg = args.GetArg("-onion", "");
18621875
if (onionArg != "") {
18631876
if (onionArg == "0") { // Handle -noonion/-onion=0
1864-
SetReachable(NET_ONION, false);
1877+
onion_proxy = Proxy{};
1878+
if (onlynet_used_with_onion) {
1879+
return InitError(
1880+
_("Outbound connections restricted to Tor (-onlynet=onion) but the proxy for "
1881+
"reaching the Tor network is explicitly forbidden: -onion=0"));
1882+
}
18651883
} else {
1866-
CService onionProxy;
1867-
if (!Lookup(onionArg, onionProxy, 9050, fNameLookup)) {
1884+
CService addr;
1885+
if (!Lookup(onionArg, addr, 9050, fNameLookup) || !addr.IsValid()) {
18681886
return InitError(strprintf(_("Invalid -onion address or hostname: '%s'"), onionArg));
18691887
}
1870-
proxyType addrOnion = proxyType(onionProxy, proxyRandomize);
1871-
if (!addrOnion.IsValid())
1872-
return InitError(strprintf(_("Invalid -onion address or hostname: '%s'"), onionArg));
1873-
SetProxy(NET_ONION, addrOnion);
1874-
SetReachable(NET_ONION, true);
1888+
onion_proxy = Proxy{addr, proxyRandomize};
1889+
}
1890+
}
1891+
1892+
if (onion_proxy.IsValid()) {
1893+
SetProxy(NET_ONION, onion_proxy);
1894+
} else {
1895+
// If -listenonion is set, then we will (try to) connect to the Tor control port
1896+
// later from the torcontrol thread and may retrieve the onion proxy from there.
1897+
const bool listenonion_disabled{!args.GetBoolArg("-listenonion", DEFAULT_LISTEN_ONION)};
1898+
if (onlynet_used_with_onion && listenonion_disabled) {
1899+
return InitError(
1900+
_("Outbound connections restricted to Tor (-onlynet=onion) but the proxy for "
1901+
"reaching the Tor network is not provided: none of -proxy, -onion or "
1902+
"-listenonion is given"));
18751903
}
1904+
SetReachable(NET_ONION, false);
18761905
}
18771906

18781907
for (const std::string& strAddr : args.GetArgs("-externalip")) {
@@ -2560,8 +2589,7 @@ bool AppInitMain(const CoreContext& context, NodeContext& node, interfaces::Bloc
25602589
if (!Lookup(i2psam_arg, addr, 7656, fNameLookup) || !addr.IsValid()) {
25612590
return InitError(strprintf(_("Invalid -i2psam address or hostname: '%s'"), i2psam_arg));
25622591
}
2563-
SetReachable(NET_I2P, true);
2564-
SetProxy(NET_I2P, proxyType{addr});
2592+
SetProxy(NET_I2P, Proxy{addr});
25652593
} else {
25662594
SetReachable(NET_I2P, false);
25672595
}

0 commit comments

Comments
 (0)