HomePhabricator

net: extend CNetAddr::SetSpecial() to support I2P

Description

net: extend CNetAddr::SetSpecial() to support I2P

Summary:
Recognize also I2P addresses in the form base32hashofpublickey.b32.i2p
from CNetAddr::SetSpecial().

This makes Lookup() support them, which in turn makes it possible to
manually connect to an I2P node by using
-proxy=i2p_socks5_proxy:port -addnode=i2p_address.b32.i2p:port

Co-authored-by: Lucas Ontivero <lucasontivero@gmail.com>

This is a backport of core#20685 [8/20]
https://github.com/bitcoin/bitcoin/pull/20685/commits/cff65c4a270887ec171293409ab84f5d0d0be7fc
Depends on D11016

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D11017

Details

Provenance
Vasil Dimov <vd@FreeBSD.org>Authored on Oct 21 2020, 09:35
PiRKCommitted on Feb 10 2022, 09:12
PiRKPushed on Feb 10 2022, 09:12
Reviewer
Restricted Project
Differential Revision
D11017: net: extend CNetAddr::SetSpecial() to support I2P
Parents
rABC1e55ff33b8be: net: avoid unnecessary GetBindAddress() call
Branches
Unknown
Tags
Unknown