2016-10-10 07:16:42 -04:00
|
|
|
# i2pd-tools
|
|
|
|
|
|
|
|
This repository contains tools that supplement i2pd.
|
|
|
|
|
|
|
|
Notice: git submodules are used so make sure to clone this repository recursively
|
|
|
|
|
2017-06-15 15:23:11 +03:00
|
|
|
git clone --recursive https://github.com/purplei2p/i2pd-tools
|
2016-10-10 07:16:42 -04:00
|
|
|
|
2016-10-10 08:13:05 -04:00
|
|
|
## Building
|
|
|
|
|
|
|
|
### Dependencies
|
|
|
|
|
|
|
|
* boost chrono
|
2021-06-02 13:50:38 -04:00
|
|
|
|
2016-10-10 08:13:05 -04:00
|
|
|
* boost date-time
|
2021-06-02 13:50:38 -04:00
|
|
|
|
2016-10-10 08:13:05 -04:00
|
|
|
* boost filesystem
|
2021-06-02 13:50:38 -04:00
|
|
|
|
2016-10-10 08:13:05 -04:00
|
|
|
* boost program-options
|
2021-06-02 13:50:38 -04:00
|
|
|
|
2016-10-10 08:13:05 -04:00
|
|
|
* libssl
|
2021-06-02 13:50:38 -04:00
|
|
|
|
2020-03-21 00:08:55 +00:00
|
|
|
* zlib1g
|
2016-10-10 08:13:05 -04:00
|
|
|
|
2021-06-02 13:50:38 -04:00
|
|
|
(run `dependencies.sh`)
|
2016-10-10 08:13:05 -04:00
|
|
|
|
|
|
|
### Building
|
|
|
|
|
2020-03-21 00:21:32 +00:00
|
|
|
make
|
2016-10-10 08:13:05 -04:00
|
|
|
|
2016-10-10 07:16:42 -04:00
|
|
|
## Tools included
|
|
|
|
|
2016-11-25 10:02:16 -05:00
|
|
|
### routerinfo
|
|
|
|
|
|
|
|
print information about a router info file
|
|
|
|
|
|
|
|
#### usage
|
|
|
|
|
|
|
|
|
|
|
|
print ip and port for router info excluding ipv6
|
|
|
|
|
|
|
|
./routerinfo -p ~/.i2pd/netDb/r6/routerInfo-blah.dat
|
|
|
|
|
|
|
|
print iptables firewall rules to allow 1 nodes in netdb through firewall including ipv6 addresses
|
|
|
|
|
|
|
|
./routerinfo -6 -f ~/.i2pd/netDb/r6/routerInfo-blah.dat
|
|
|
|
|
2016-10-10 07:16:42 -04:00
|
|
|
### keygen
|
|
|
|
|
2021-06-03 03:54:28 -04:00
|
|
|
Generate an I2P private key
|
2016-10-10 07:16:42 -04:00
|
|
|
|
2016-10-10 07:31:57 -04:00
|
|
|
#### Usage
|
|
|
|
|
2021-02-02 15:53:20 +03:00
|
|
|
Make a EDDSA-SHA512-ED25519 destination key
|
2016-10-10 07:31:57 -04:00
|
|
|
|
|
|
|
./keygen privkey.dat
|
|
|
|
|
|
|
|
Make an destination key with a certain key type
|
|
|
|
|
|
|
|
./keygen privkey.dat <number>
|
|
|
|
|
2016-10-10 08:03:33 -04:00
|
|
|
or
|
2016-10-10 07:31:57 -04:00
|
|
|
|
2016-10-10 08:03:33 -04:00
|
|
|
./keygen privkey.dat <key name>
|
|
|
|
|
|
|
|
|
2021-02-02 15:53:20 +03:00
|
|
|
| key name | number |
|
|
|
|
| ------------------------------------ | ------ |
|
|
|
|
| DSA-SHA1 | 0 |
|
|
|
|
| ECDSA-SHA256-P256 | 1 |
|
|
|
|
| ECDSA-SHA384-P384 | 2 |
|
|
|
|
| ECDSA-SHA512-P521 | 3 |
|
|
|
|
| RSA-SHA256-2048 | 4 |
|
|
|
|
| RSA-SHA384-3072 | 5 |
|
|
|
|
| RSA-SHA512-4096 | 6 |
|
|
|
|
| EDDSA-SHA512-ED25519 | 7 |
|
|
|
|
| GOSTR3410_CRYPTO_PRO_A-GOSTR3411-256 | 9 |
|
|
|
|
| GOSTR3410_TC26_A_512-GOSTR3411-512 | 10 |
|
2021-06-03 00:34:30 -04:00
|
|
|
| RED25519-SHA512 | 11 |
|
|
|
|
|
|
|
|
For more information on the types of signatures, see the [documentation](https://i2pd.readthedocs.io/en/latest/user-guide/tunnels/#signature-types).
|
2016-10-10 07:31:57 -04:00
|
|
|
|
2017-08-09 00:35:02 +07:00
|
|
|
### vain
|
|
|
|
|
2021-05-16 03:45:06 -04:00
|
|
|
Vanity generation address.
|
2017-08-09 00:35:02 +07:00
|
|
|
|
|
|
|
#### Usage
|
|
|
|
|
2018-06-12 00:21:45 +07:00
|
|
|
./vain --usage
|
2017-08-16 12:16:40 +07:00
|
|
|
|
|
|
|
#### Time to Generate on a 2.70GHz Processor
|
|
|
|
| characters| time to generate (approx.) |
|
|
|
|
| -------------------- | --------------- |
|
2021-06-03 03:45:27 -04:00
|
|
|
| 1 | ~0.082s |
|
|
|
|
| 2 | ~0.075s |
|
|
|
|
| 3 | ~0.100s |
|
|
|
|
| 4 | ~0.394s |
|
|
|
|
| 5 | ~6.343s |
|
|
|
|
| 6 | ~1m-5m |
|
|
|
|
| 7 | ~30m |
|
2016-10-10 07:16:42 -04:00
|
|
|
|
|
|
|
### keyinfo
|
|
|
|
|
2021-06-03 03:54:28 -04:00
|
|
|
Prints information about an I2P private key
|
2016-10-10 07:31:57 -04:00
|
|
|
|
|
|
|
#### Usage
|
|
|
|
|
|
|
|
Print just the b32 address for this key
|
|
|
|
|
|
|
|
./keyinfo privatekey.dat
|
|
|
|
|
|
|
|
... just the base64 address
|
|
|
|
|
|
|
|
./keyinfo -d privatekey.dat
|
|
|
|
|
|
|
|
Print all info about the public key
|
|
|
|
|
|
|
|
./keyinfo -v privatekey.dat
|
2018-08-29 21:52:56 +00:00
|
|
|
|
2020-03-21 00:21:32 +00:00
|
|
|
### regaddr
|
|
|
|
|
2021-05-16 03:45:06 -04:00
|
|
|
Generate authentication string to register a domain on reg.i2p and stats.i2p
|
2020-03-21 00:21:32 +00:00
|
|
|
|
|
|
|
./regaddr domain.dat domain.i2p > auth_string.txt
|
|
|
|
cat auth_string.txt
|
2018-08-29 21:52:56 +00:00
|
|
|
|
2021-05-16 03:45:06 -04:00
|
|
|
Send output of auth_string to http://reg.i2p/add and http://stats.i2p/i2p/addkey.html
|
2020-03-21 05:00:44 +00:00
|
|
|
|
2020-03-21 00:21:32 +00:00
|
|
|
To register a subdomain, use [`regaddr_3ld`](#regaddr_3ld)
|
|
|
|
|
|
|
|
### regaddr_3ld
|
2018-08-29 21:52:56 +00:00
|
|
|
|
2021-05-16 03:45:06 -04:00
|
|
|
Generate authentication string to register a subdomain on reg.i2p and stats.i2p in 3 steps
|
2018-08-29 21:52:56 +00:00
|
|
|
|
|
|
|
./regaddr_3ld step1 sub_domain.dat sub.domain.i2p > step1.txt
|
|
|
|
./regaddr_3ld step2 step1.txt domain.dat domain.i2p > step2.txt
|
|
|
|
./regaddr_3ld step3 step2.txt sub_domain.dat > step3.txt
|
|
|
|
cat step3.txt
|
|
|
|
|
2021-05-16 03:45:06 -04:00
|
|
|
Send output of auth_string to http://reg.i2p/add and http://stats.i2p/i2p/addkey.html
|
2020-11-14 21:45:06 -05:00
|
|
|
|
|
|
|
### regaddralias
|
|
|
|
|
2021-05-16 03:45:06 -04:00
|
|
|
Generate authentication string to register an alias address for existing domain on reg.i2p and stats.i2p
|
2020-11-14 21:45:06 -05:00
|
|
|
|
|
|
|
./regaddralias domain-oldkeys.dat domain-newkeys.i2p domain > auth_string.txt
|
|
|
|
cat auth_string.txt
|
|
|
|
|
2021-05-16 03:45:06 -04:00
|
|
|
Send output of auth_string to http://reg.i2p/add and http://stats.i2p/i2p/addkey.html
|
2021-06-02 13:50:38 -04:00
|
|
|
|
|
|
|
### x25519
|
|
|
|
|
|
|
|
Generate key pair with output in base64 encoding. Now the x25519 keys are used for authentication with an encrypted LeaseSet.
|