Implement the following commands from the I2P SAM protocol:
- HELLO: needed for all of the remaining ones
- DEST GENERATE: to generate our private key and destination
- NAMING LOOKUP: to convert .i2p addresses to destinations
- SESSION CREATE: needed for STREAM CONNECT and STREAM ACCEPT
- STREAM CONNECT: to make outgoing connections
- STREAM ACCEPT: to accept incoming connections
This is a backport of core#20685 [14/20]
https://github.com/bitcoin/bitcoin/pull/20685/commits/c22daa2ecff1acd25426cd46f98f2587d1d324c3
Notes:
- because of out of sequence backports, I had to apply a change from core#22937 to i2p.cpp (line 323) to explicitely convert a fs::path to a string.
- This includes a change from https://github.com/bitcoin/bitcoin/pull/21407/commits/80a5a8ea2b7ad512c74c29df5b504e9be6cf23a0 i2p: limit the size of incoming messages. The rest of that commit was included in D11023