I2P Network

I2P is an anonymizing network, offering a simple layer that identity-sensitive applications can use to securely communicate. All data is wrapped with several layers of encryption, and the network is both distributed and dynamic, with no trusted parties. Many applications are available that interface with I2P, including mail, peer-peer, IRC chat, and others. Anonymous Torrenting via i2psnark is also possible.

Usage

Install i2pd (deamon written in C++) and enable the service. Router Interface is at 127.0.0.1:7070 with HTTP Proxy at 127.0.0.1:4444

Configuration

There are two separate config files: i2pd.conf and tunnels.conf. i2pd.conf is the main configuration file, where you configure all options. tunnels.conf is the tunnel configuration file, where you configure I2P hidden services and client tunnels.

Example i2pd.conf:

logfile = /var/log/i2pd/i2pd.log
ipv4 = true
ipv6 = false
ssu = true
bandwidth = X
 
[ssu2]
enabled = true
published = true
 
[http]
enabled = true
address = 0.0.0.0
port = 7070
auth = true
user = i2pd
pass = pass
strictheaders = false
lang = english
 
[httpproxy]
address = 0.0.0.0
port = 4444
# StormyCloud
#outproxy = http://5d4s7pcvfdpftfk7npc7hllyujhufsdprtrf4o53i44rgsa2xbwa.b32.i2p
 
# Purokishi
outproxy = http://purokishi.i2p
 
[socksproxy]
address = 0.0.0.0
port = 4447
 
[sam]
enabled = true
address = 127.0.0.1
port = 7656
 
[i2cp]
enabled = true
address = 0.0.0.0
port = 7654
 
[reseed]
verify = true
 
[addressbook]
subscriptions = http://reg.i2p/hosts.txt,http://identiguy.i2p/hosts.txt,http://stats.i2p/cgi-bin/newhosts.txt,http://rus.i2p/hosts.txt

General options

OptionDescription
confConfig file (default: ~/.i2pd/i2pd.conf or /var/lib/i2pd/i2pd.conf). This parameter will be silently ignored if the specified config file does not exist.
tunconfTunnels config file (default: ~/.i2pd/tunnels.conf or /var/lib/i2pd/tunnels.conf)
pidfileWhere to write pidfile (default: i2pd.pid, not used in Windows)
logLogs destination: stdout, file, syslog (stdout if not set or invalid) (if daemon, stdout/unspecified are replaced by file in some cases)
logfilePath to logfile (default - autodetect)
loglevelLog messages above this level (debug, info, warn, error, none; default - warn)
logclftimeWrite full CLF-formatted date and time to log (default: false (write only time))
datadirPath to storage of i2pd data (RouterInfos, destinations keys, peer profiles, etc …)
hostRouter external IP for incoming connections (default: auto if SSU2 is enabled)
portPort to listen for incoming connections (default: auto (random))
daemonRouter will go to background after start (default: true)
serviceRouter will use system folders like ‘/var/lib/i2pd’ (on unix) or ‘C:\ProgramData\i2pd’ (on Windows). Ignored on MacOS and Android (default: false)
ifnameNetwork interface to bind to
ifname4Network interface to bind to for IPv4
ifname6Network interface to bind to for IPv6
address4Local address to bind to for IPv4
address6Local address to bind to for clearnet IPv6
natIf true, assume we are behind NAT (default: true)
ipv4Enable communication through IPv4 (default: true)
ipv6Enable communication through clearnet IPv6 (default: false)
notransitRouter will not accept transit tunnels, disabling transit traffic completely. G router cap will be published (default: false)
floodfillRouter will be floodfill (default: false)
bandwidthBandwidth limit: integer in KBps or letters: L (32), O (256), P (2048), X (unlimited).
shareMax % of bandwidth limit for transit. 0-100 (default: 100)
familyName of a family, router belongs to
netidNetwork ID, router belongs to. Main I2P is 2.

NTCP2

OptionDescription
ntcp2.enabledEnable NTCP2 (default: true)
ntcp2.publishedEnable incoming NTCP2 connections (default: true)
ntcp2.portPort to listen for incoming NTCP2 connections (default: auto - port from general section)
ntcp2.addressv6External IPv6 for incoming connections
ntcp2.proxySpecify proxy server for NTCP2. Should be http://address:port or socks://address:port

SSU2

OptionDescription
ssu2.enabledEnable SSU2 (default: true)
ssu2.publishedEnable incoming SSU2 connections. (default: true)
ssu2.portPort to listen for incoming SSU2 connections (default: auto - ‘port’ from general section)
ssu2.proxySpecify UDP socks5 proxy server for NTCP2. Should be socks://address:port
ssu2.mtu4MTU for local ipv4. (default: auto)
ssu2.mtu6MTU for local ipv6. (default: auto)

HTTP webconsole

OptionDescription
http.enabledIf webconsole is enabled. (default: true)
http.addressThe address to listen on (HTTP server)
http.portThe port to listen on (HTTP server) (default: 7070)
http.authEnable basic HTTP auth for webconsole (default: false)
http.userUsername for basic auth (default: i2pd)
http.passPassword for basic auth (default: random, see logs)
http.strictheadersEnable strict host checking on WebUI. (default: true)
http.hostnameExpected hostname for WebUI (default: localhost)

HTTP Proxy

OptionDescription
httpproxy.enabledIf HTTP proxy is enabled. (default: true)
httpproxy.addressThe address to listen on (HTTP Proxy)
httpproxy.portThe port to listen on (HTTP Proxy) (default: 4444)
httpproxy.addresshelperEnable address helper (jump). (default: true)
httpproxy.keysOptional keys file for HTTP proxy local destination
httpproxy.signaturetypeSignature type for new keys if keys file is set. (default: 7)
httpproxy.inbound.lengthInbound tunnels length if keys is set. (default: 3)
httpproxy.inbound.quantityInbound tunnels quantity if keys is set. (default: 5)
httpproxy.inbound.lengthVarianceInbound tunnels length variance if keys is set. (default: 0)
httpproxy.outbound.lengthOutbound tunnels length if keys is set. (default: 3)
httpproxy.outbound.quantityOutbound tunnels quantity if keys is set. (default: 5)
httpproxy.outbound.lengthVarianceOutbound tunnels length variance if keys is set. (default: 0)
httpproxy.outproxyHTTP proxy upstream out proxy url (like http://false.i2p)
httpproxy.i2cp.leaseSetTypeType of LeaseSet to be sent. 1, 3 or 5. (default: 3)
httpproxy.i2cp.leaseSetEncTypeComma separated encryption types to be used in LeaseSet type 3 or 5

Socks proxy

OptionDescription
socksproxy.enabledIf SOCKS proxy is enabled. (default: true)
socksproxy.addressThe address to listen on (SOCKS Proxy)
socksproxy.portThe port to listen on (SOCKS Proxy). (default: 4447)
socksproxy.keysOptional keys file for SOCKS proxy local destination
socksproxy.signaturetypeSignature type for new keys if keys file is set. (default: 7)
socksproxy.inbound.lengthInbound tunnels length if keys is set. (default: 3)
socksproxy.inbound.quantityInbound tunnels quantity if keys is set. (default: 5)
socksproxy.inbound.lengthVarianceInbound tunnels length variance if keys is set. (default: 0)
socksproxy.outbound.lengthOutbound tunnels length if keys is set. (default: 3)
socksproxy.outbound.quantityOutbound tunnels quantity if keys is set. (default: 5)
socksproxy.outbound.lengthVarianceOutbound tunnels length variance if keys is set. (default: 0)
socksproxy.outproxy.enabledEnable or disable SOCKS outproxy. (default: false)
socksproxy.outproxyAddress of outproxy. Requests outside I2P will go there.
socksproxy.outproxyportOutproxy remote port
socksproxy.i2cp.leaseSetTypeType of LeaseSet to be sent. 1, 3 or 5. (default: 3)
socksproxy.i2cp.leaseSetEncTypeComma separated encryption types to be used in LeaseSet type 3 or 5

SAM interface

OptionDescription
sam.enabledIf SAM is enabled. (default: true)
sam.addressThe address to listen on (SAM bridge)
sam.portPort of SAM bridge. Usually 7656. SAM is off if not specified
sam.singlethreadIf false every SAM session runs in own thread. (default: true)

BOB interface

OptionDescription
bob.enabledIf BOB is enabled. (default: false)
bob.addressThe address to listen on (BOB command channel)
bob.portPort of BOB command channel. Usually 2827. BOB is off if not specified

I2CP interface

OptionDescription
i2cp.enabledIf I2CP is enabled. (default: true)
i2cp.addressThe address to listen on or an abstract address for Android LocalSocket
i2cp.portPort of I2CP server. Usually 7654. Ignored for Andorid
i2cp.singlethreadIf false every I2CP session runs in own thread. (default: true)

I2PControl interface

OptionDescription
i2pcontrol.enabledIf I2P control is enabled. (default: false)
i2pcontrol.addressThe address to listen on (I2P control service)
i2pcontrol.portPort of I2P control service. Usually 7650. I2PControl is off if not specified
i2pcontrol.passwordI2P control authentication password. (default: itoopie)
i2pcontrol.certI2P control HTTPS certificate file name. (default: i2pcontrol.crt.pem)
i2pcontrol.keyI2P control HTTPS certificate key file name. (default: i2pcontrol.key.pem)

Reseeding

OptionDescription
reseed.verifyVerify .su3 signature. (default: false)
reseed.urlsReseed URLs, separated by comma
reseed.yggurlsReseed Yggdrasil’s URLs, separated by comma
reseed.filePath to local .su3 file or HTTPS URL to reseed from
reseed.zipfilePath to local .zip file to reseed from
reseed.thresholdMinimum number of known routers before requesting reseed. (default: 25)
reseed.proxyUrl for https/socks reseed proxy

Addressbook options

OptionDescription
addressbook.defaulturlAddressBook subscription URL. Only used to initialize the AddressBook.
addressbook.subscriptionsAddressBook subscriptions URLs, separated by comma. Note that defaulturl is not added to subscriptions URLs
addressbook.hostsfileFile to dump AddressesBook in hosts.txt format

Trust options

OptionDescription
trust.enabledEnable explicit trust options. (default: false)
trust.familyMake direct I2P connections only to routers in specified Family.
trust.routersMake direct I2P connections only to routers specified here. Comma separated list of base64 identities.
trust.hiddenShould we hide our router from other routers? (default: false)

Exploratory tunnels

OptionDescription
exploratory.inbound.lengthExploratory inbound tunnels length. (default: 2)
exploratory.inbound.quantityExploratory inbound tunnels quantity. (default: 3)
exploratory.outbound.lengthExploratory outbound tunnels length. (default: 2)
exploratory.outbound.quantityExploratory outbound tunnels quantity. (default: 3)

Tunnel Configuration

Available tunnel types:

TypeDescription
clientClient tunnel to remote I2P destination (TCP)
serverGeneric server tunnel to setup any TCP service in I2P network
httpHTTP server tunnel to setup a website in I2P

Client Tunnel

[irc-out]
type = client
address = 127.0.0.1
port = 6668
destination = irc.ilita.i2p
keys = irc.dat

Optional parameters

OptionDescription
addressLocal interface tunnel binds to, ‘127.0.0.1’ for connections from local host only, ‘0.0.0.0’ for connections from everywhere. (default: 127.0.0.1)
portPort of client tunnel.
signaturetypeSignature type for new keys. RSA signatures (4,5,6) are not allowed and will be changed to 7. (default: 7)
cryptotypeCrypto type for new keys. Experimental. Should be always 0
destinationportConnect to particular port at destination. 0 by default (targeting first tunnel on server side for destination)
keepaliveintervalSend ping to the destination after this interval in seconds. (default: 0 - no pings)
keysKeys for destination. When same for several tunnels, will be using same destination for every tunnel.

Server Tunnel

[smtp-in]
type = server
host = 127.0.0.1
port = 25
keys = smtp-in.dat

Optional parameters

OptionDescription
hostIP address of server (on this address i2pd will send data from I2P)
portPort of server tunnel.
inport(non-TCP non-UDP) I2P local destination port to listen to; an unsigned 16-bit integer. What port at local destination server tunnel listens to (default: same as port)
accesslistList of comma-separated of b32 address (without .b32.i2p) allowed to connect. Everybody is allowed by default
gzipTurns internal compression off if set to false. (default: false)
signaturetypeSignature type for new keys. (default: 7)
cryptotypeCrypto type for new keys. Experimental. Should be always 0
enableuniquelocalIf true, connection to local address will look like 127.x.x.x where x.x.x is first 3 bytes of incoming connection peer’s ident hash. (default: true)
addressIP address of an interface tunnel is connected to host from. Usually not used
keysKeys for destination. When same for several tunnels, will be using same destination for every tunnel.

HTTP Tunnel

[http-in]
type = http
host = 127.0.0.1  
port = 80
keys = our-website.dat

Tools

There are several tools available here.

keygen

Generate an I2P private key.

Usage

Make a EDDSA-SHA512-ED25519 destination key

./keygen privkey.dat

Make an destination key with a certain key type

./keygen privkey.dat <number>
./keygen privkey.dat <key name>
key namenumber
DSA-SHA10
ECDSA-SHA256-P2561
ECDSA-SHA384-P3842
ECDSA-SHA512-P5213
RSA-SHA256-20484
RSA-SHA384-30725
RSA-SHA512-40966
EDDSA-SHA512-ED255197
GOSTR3410_CRYPTO_PRO_A-GOSTR3411-2569
GOSTR3410_TC26_A_512-GOSTR3411-51210
RED25519-SHA51211

vain

Vanity generation address.

Time to Generate on a 2.70GHz Processor:

characterstime to generate (approx.)
1~0.082s
2~0.075s
3~0.100s
4~0.394s
5~6.343s
6~1m-5m
7~30m

Usage

./vain pattern [options]

Options

OptionDescription
-r, --regregex instead of text pattern
-t, --threadsUse this many threads (default all)
-o, --output output_fileOutput file
-m, --multiplymodemultiple addresses search

keyinfo

Prints information about an I2P private key

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