Table of Contents
The MuWire "Host Cache" is a component that serves as an entry point to the MuWire network. MuWire nodes ping this component when they do not know of any other MuWire nodes to connect to. In turn, the HostCache pings back MuWire nodes to verify they are alive.
If you run a HostCache you will help the MuWire network maintain connectivity, and will be able to acquire insights about the network size and topology.
Building from source
- Clone the latest MuWire source code either from github or from gitlab
- Build using
./gradlew clean assemble
. You need to have JDK 11 installed on the build box. - Look inside
host-cache/build/distributions
. Untarhost-cache-x.y.z.tar
- The hostcache requires an I2P router with I2CP interface enabled to run. Edit
$HOME/.MuWireHostCache/i2p.properties
and set the appropriate i2cp options there. Example options:i2cp.tcp.host
- host of the i2p router i2cp interfacei2cp.tcp.port
- port of the i2p router i2cp interfaceinbound.length
andoutbound.length
- what length tunnels to createinbound.quantity
andoutbound.quantity
- how many tunnels to createi2cp.leaseSetEncType
- encryption type for the tunnels. Recommended value is "4,0" for dual ECIES + ELGAMAL keys.
- It is a good idea to enable logging to observe what the host cache is doing. Copy the file from
host-cache/logging/logging.properties
to PWD before starting the host cache.
Running hostcache
The first time you start the MW hostcache it will create a new destination and print it out on stdout. Copy-paste that b64 destination and give it to me so I can include it in the source code. The private key for the destination is stored in $HOME/.MuWireHostCache/key.dat
. Naturally you want to backup that key.
If you have enabled logging from step 5 above, you should be able to see what the hostcache is doing. The log file will be $PWD/hostcache.log
. The first line that gets printed usually looks like:
2020-06-11 17:51:08.354 INFO java_util_logging_Logger$info$0 call connected, going to sleep
That indicates the hostcache has successfully connected to your I2P router.
The hostcache creates two directories - $PWD/verified
and $PWD/unverified
. Every hour it will "dump" the hosts that it knows about in a file with name formatted as yyyyMMdd-HH (for example "20200427-01"). I will be adding scripts in host-cache/scripts
to analyze those dumps and to produce useful statistics. For now the only script there counts how many total unique hosts are on the MuWire network.