This PR is mostly for experiments, testing and discussion. It works but see below.
Add I2P support:
- Outgoing connections to I2P destinations use the I2P socks5 proxy i2pd, i2p from the newly added option
-i2pproxy=addr:port
. - Incoming connections from I2P (listen) use statically configured destinations i2pd, i2p, similarly to statically configured Tor hidden services where the I2P/Tor daemon redirects incoming connections to an application listening on a normal TCP port. The user has to configure the I2P/Tor daemon separately from
bitcoind
.
What’s missing:
-onlynet=i2p
-bind=127.0.0.1:8335=i2p
in order to distinguish incoming I2P from incoming clearnet connections
It is possible to accept incoming connections using the SAM I2P protocol. This would make it possible to configure the destination (hidden service) automatically (so the user does not have to extra-configure the I2P daemon). It would also resolve the problem with distinguishing incoming I2P connections. I am looking into doing that.
If that is done, it will supersede this PR because both outgoing and incoming connections would be made via SAM. Thus this PR is a draft.
A bitcoin node is running at yfsvsy467mt5xafaq7zaukkjyzehvmew445yaaejvrwpk53acejq.b32.i2p:31872
.