HomePhabricator

net: add I2P to the reachability map, make outgoing and accept incoming…

Description

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

Details

Provenance
Vasil Dimov <vd@FreeBSD.org>Authored on Dec 9 2020, 04:24
PiRKCommitted on Feb 15 2022, 18:07
PiRKPushed on Feb 15 2022, 18:07
Reviewer
Restricted Project
Differential Revision
D11029: net: add I2P to the reachability map, make outgoing and accept incoming connections from CConnman
Parents
rABCbdcf5ed386bb: init: introduce I2P connectivity options
Branches
Unknown
Tags
Unknown