1
0
mirror of https://github.com/PurpleI2P/i2pd-tools synced 2025-01-15 17:20:08 +00:00
i2pd-tools/README.md

165 lines
3.7 KiB
Markdown
Raw Normal View History

# 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 08:13:05 -04:00
## Building
### Dependencies
* boost chrono
* boost date-time
* boost filesystem
* boost program-options
* libssl
2020-03-21 00:08:55 +00:00
* zlib1g
2016-10-10 08:13:05 -04:00
```bash
2018-06-12 01:00:59 +07:00
depend="libboost-chrono-dev \
2016-10-10 08:13:05 -04:00
libboost-date-time-dev \
libboost-filesystem-dev \
libboost-program-options-dev \
libboost-system-dev \
libboost-thread-dev \
2020-03-21 00:08:55 +00:00
libssl-dev \
zlib1g-dev"
2018-06-12 01:00:59 +07:00
kernel=`uname -a`
case "$kernel" in
*Ubuntu*)
2018-06-12 01:00:59 +07:00
sudo apt install $depend;;
*debian*)
sudo aptitude install $depend;;
*gentoo*)
sudo emerge --deep --newuse dev-libs/boost dev-libs/openssl;;
*)
echo "Just install libboost and libopenssl dev packages on your pc";;
esac
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
## 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
### keygen
Generate an i2p private key
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 |
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.) |
| -------------------- | --------------- |
| 1 | ~0.082s |
| 2 | ~0.075s |
| 3 | ~0.100s |
| 4 | ~0.394s |
| 5 | ~6.343s |
| 6 | ~1m-5m |
| 7 | ~30m |
### keyinfo
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
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
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
2021-05-16 03:45:06 -04:00
Generate authentication string to register a subdomain on reg.i2p and stats.i2p in 3 steps
./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