net: add I2P to the reachability map, make outgoing and accept incoming connections from CConnman
Summary:
net: add I2P to the reachability map
Update CNetAddr::GetReachabilityFrom() to recognize the I2P network so
that we would prefer to advertise our I2P address to I2P peers.
https://github.com/bitcoin/bitcoin/pull/20685/commits/9559bd1404fbf74b0d09fe9019a9305cb4e151ce
net: make outgoing I2P connections from CConnman
https://github.com/bitcoin/bitcoin/pull/20685/commits/0635233a1e7e8c303073430092afd3e0fb0d927b
net: accept incoming I2P connections from CConnman
https://github.com/bitcoin/bitcoin/pull/20685/commits/b905363fa8b0bb03fe34b53b5410880f42e0af39i
net: use stronger AddLocal() for our I2P address
https://github.com/bitcoin/bitcoin/pull/21914/commits/105941b726c078642e785ecb7b6834ba814381b0
This is a backport of core#20685 [16,17,18/20] and core#21914
Depends on D11027
Test Plan:
ninja all check-all
Run bitcoind using I2P (see detailed test plan in D11027).
ninja && src/bitcoind -regtest -i2psam=127.0.0.1:7656 -debug=i2p
Now you can see new interesting log messages:
2022-02-11T14:35:42Z i2paccept thread start 2022-02-11T14:35:42Z I2P: Creating SAM session with 127.0.0.1:7656 2022-02-11T14:35:45Z I2P: SAM session created: session id=xxxxxxxxxx, my address=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.b32.i2p:18444 2022-02-11T14:35:45Z AddLocal(xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.b32.i2p:18444,2)
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D11029