mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-23 06:35:17 +01:00
PeerAddress: Add I2P hostname parsing (WIP)
Note: this is not verified as correct encoding yet.
This commit is contained in:
parent
94ad7dd344
commit
c0ba6a9f53
1 changed files with 5 additions and 0 deletions
|
@ -282,6 +282,11 @@ public class PeerAddress extends ChildMessage {
|
||||||
addr = null;
|
addr = null;
|
||||||
break;
|
break;
|
||||||
case I2P:
|
case I2P:
|
||||||
|
if (addrLen != 32)
|
||||||
|
throw new ProtocolException("invalid length of I2P address: " + addrLen);
|
||||||
|
hostname = BASE32.encode(addrBytes).replace("=","") + ".b32.i2p";
|
||||||
|
addr = null;
|
||||||
|
break;
|
||||||
case CJDNS:
|
case CJDNS:
|
||||||
// ignore unimplemented network IDs for now
|
// ignore unimplemented network IDs for now
|
||||||
addr = null;
|
addr = null;
|
||||||
|
|
Loading…
Add table
Reference in a new issue