You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 KiB

Zero dependency, small footprint, cross-platform I2P Java Router with GUI, simple tunnel/socks controller and SAM interface

Note that I2P-zero is not a re-implementation of I2P. It uses the exact I2P source code from the official I2P GitHub repository.

I2P-zero is a build script that produces a zero-dependency installation of the official I2P release, and includes a simplified front end interface.

This project will run under Linux, and build native launchers for Linux, MacOS and Windows. The launchers will include the I2P router, a SAM listener, simple tunnel and socks tunnel functionality and a minimal JVM.


Download the latest binary releases for Mac/Windows/Linux here:

GUI Screenshots


The zero-dependency distribution sizes are as follows:

OS Uncompressed size (MB) Compressed size (MB) v1.20 Reproducible build SHA-256
Mac 38.5 26.5 9d35c9d31e7c8c820736f7437e02d928f325f4197cf19c7720196c1e586ce1a1
Windows 47.8 32.4 37c38e66a1f4935a21c2514eb4692827834ec8bd9c2dfc11d6871f7a07dbdd16
Linux 61.3 36.6 7e7216b281624ec464b55217284017576d109eaba7b35f7e4994ae2a78634de7
Mac GUI 61.2 45.9 9278fce1196555fd9823d74b716cb0370bac26b964a50b4e9a11eae0f2107eb4
Windows GUI 70.3 50.7 20723da50684c6a6581b36f8c7a90e9d63baf0e4848e0b781a343ad1791ab2a0
Linux GUI 87.4 56.9 1852ecf426d87c6931b163964fa55ddc09da60ede217da1f033a6f78acce2ad1

Note: Reproducible builds are currently experimental. Due to JDK differences, Builds on Mac will consistently have different hashes than builds on Linux. Official releases will always be built using Docker.

Building the launchers

All binary releases for Windows, Mac and Linux can be built from either Linux or Mac.

Use the Docker build method for reproducible builds.

To build using Docker on Mac:

First install docker from

containerId=$(docker run -td --rm ubuntu)
docker exec -ti $containerId bash -c  '\
  apt-get update \
  && apt-get -y install git wget zip unzip \
  && git clone --depth 1 \
  && cd i2p-zero && bash bin/'
docker cp $containerId:/i2p-zero/dist-zip ./
docker container stop $containerId

To build using Docker on Ubuntu:

sudo apt -y install docker
systemctl start docker

containerId=$(sudo docker run -td --rm ubuntu)
sudo docker exec -ti $containerId bash -c  '\
  apt-get update \
  && apt-get -y install git wget zip unzip \
  && git clone --depth 1 \
  && cd i2p-zero && bash bin/'
sudo docker cp $containerId:/i2p-zero/dist-zip ./
sudo docker container stop $containerId

This will result in a dist-zip directory being copied into the current directory. The dist-zip directory will contain the builds for all platforms.

To build without Docker on Ubuntu:

To build without Docker on a freshly installed Ubuntu system, first ensure git is installed:

sudo apt install git

Then, retrieve this project from git:

git clone

Also note that JDKs for Linux, MacOS and Windows will be downloaded, which will total several hundred megabytes. You may need to ensure your system has zip, unzip and bzip2 installed to run the build script.

Run the bin/ script, which will in turn call the following scripts:

  1. bin/ to retrieve the I2P Java sources, OpenJDK and the Ant build tool

  2. bin/ to build the I2P project retrieved from the I2P repository

  3. bin/ to convert the I2P JARs to modules, compile the Java source code in this project, and then use the jlink tool to build zero-dependency platform-specific launchers.

  4. bin/ to produce the distribution zip files and display their SHA-256 hashes. Note that reproducible builds are currently a work in progress, and that only builds on Linux will show the same hashes as the official releases.

Running the GUI

To run the Linux router, double-click the app located at dist/linux-gui/router/bin/i2p-zero

To run the MacOS router, double-click the app located at dist/mac-gui/router/

For Windows, double-click the app located at dist/win-gui/router/i2p-zero.exe

Running the command line version

To run the Linux router, type:


To run the MacOS router, type:


For Windows, run: (note that the Windows build will run in the background and not show a success message)


If it launches successfully, you'll see the message:

I2P router launched.
Press Ctrl-C to gracefully shut down the router (or send the SIGINT signal to the process).

Tunnel control

Note that it may take a short while for new tunnels to be set up.

Call the dist/linux/router/bin/ script as follows to create and destroy tunnels:

Get the router reachability status. Returns a string such as "Testing", "Firewalled", "Running", "Error" router.reachability

Find out if the router is running (where "running" means it has warmed up and is allowing I2P connections to be created). Returns "true" or "false" router.isRunning

Listen for I2P connections and forward them to the specified host and port. Returns the I2P base 32 destination address for the server tunnel created.

Optionally, specify a directory for storing/reading the server key file. If the directory doesn't exist with a file named *.b32.i2p.keys in it, returns a newly created destination address and writes the secret key for the new address to a file called .keys in the specified directory. Otherwise, read the existing secret key from that directory. The server tunnel will listen for I2P connections and forward them to the specified host and port. Note that the base 32 I2P destination address deterministically depends on the contents of the .keys file). server.create <host> <port> <(optional) directory>

or, if you would like a vanity b32 address for your server tunnel that begins with a 3 character (alphanumeric) prefix, type: server.create.vanity <host> <port> <directory> <prefix>

If you do not want to specify the directory parameter above, specify none as the directory. Note that this command may take several minutes to complete.

Check the state of a tunnel. Returns "opening" or "open" server.state <base 32 I2P address> client.state <local port> http.state <local port> socks.state <local port>

Close the tunnel listening for connections on the specified I2P destination address. Returns "OK". server.destroy <base 32 I2P address>

Create a tunnel that listens for connections on localhost on the specified port and forwards connections over I2P to the specified destination public key. client.create <I2P destination> <local port>

Close the tunnel listening for connections on the specified port. Returns "OK". client.destroy <local port>

Create an http proxy (for accessing .i2p web sites), listening on the specified port http.create <local port>

Destroy the http proxy listening on the specified port http.destroy <local port>

Create a socks tunnel, listening on the specified port socks.create <local port>

Destroy the socks tunnel listening on the specified port socks.destroy <local port>

Destroy all tunnels. Returns "OK" all.destroy

List all tunnels. Returns JSON string containing information about all tunnels currently in existence all.list

Start a SAM listener on port 7656. Returns "OK" sam.create

Get the external port randomly assigned to this router when first run, which the firewall should allow incoming UDP and TCP connections on. Returns the port number. router.externalPort

Set the bandwidth limit, measured in KBps. Returns "OK". router.setBandwidthLimitKBps <KBps>

Get the bandwidth limit, measured in KBps router.getBandwidthLimitKBps

Get bandwidth statistics. Returns a comma separated list of statistics router.getBandwidthStats

example response:


or, for pleasant viewing on the command line, automatically updating every 2 seconds:

watch " router.getBandwidthStats | tr ',' '\n' | sort"

Get the I2P-zero version version

example response:

i2p-zero 1.8

Watch the I2P log for messages

tail -f dist/linux/router/i2p.config/wrapper.log

Note on bundled windows launcher.exe executable

There is a bundled resources/launcher.exe file in the source tree. This allows the windows distributable to be built even on a non-windows platform.

#This file can be deterministically recreated by following these steps on a Windows machine:

  1. Download AdoptOpenJDK14 from
  2. Create a new folder, and place inside the resources/icons.ico file and the router folder from an I2P-zero for Windows GUI build
  3. Run `\bin\jpackage.exe --type app-image --icon icons.ico --name i2p-zero -m --runtime-image router\runtime
  4. Run certUtil -hashfile i2p-zero/i2p-zero.exe SHA256 to get the SHA256 hash.
  5. This hash should exactly match the SHA256 hash of the resources/launcher.exe file, which should be 3d5d00eeff5cb9d63ea415c593d67f201a7d024b6378d22d702b001e6693a93a