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.
i2p-zero/README.md

122 lines
4.1 KiB

5 years ago
<img src="https://github.com/knaccc/i2p-zero/blob/master/i2p-zero.png" align="left" width="336" height="124">
5 years ago
## Zero dependency, small footprint, cross-platform I2P Java Router with GUI and simple tunnel/socks controller and SAM interface
##
5 years ago
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.
5 years ago
## GUI Screenshots
<img src="https://github.com/knaccc/i2p-zero/blob/master/screenshot1.png" align="center" width="472" height="451">
<br/>
<img src="https://github.com/knaccc/i2p-zero/blob/master/screenshot2.png" align="center" width="892" height="498">
5 years ago
## Footprint
The zero-dependency distribution sizes are as follows:
OS | Uncompressed size (MB) | xz Compressed size (MB)
------------ | ------------- | -------------
Linux | 42.6 | 23.4
MacOS | 40.2 | 21.1
Windows | 33.1 | 20.8
5 years ago
5 years ago
## Building the launchers
5 years ago
From a freshly installed Ubuntu system, first ensure git is installed:
5 years ago
`sudo apt install git`
Then, retrieve this project from git:
`git clone https://github.com/knaccc/i2p-zero.git`
5 years ago
Note that the current version of this script uses jdk-11.0.2. If this version of Java becomes no longer available for
download, then update the references to jdk-11.0.2 in java-config.sh to the later version. To locate a recent
5 years ago
JDK download URL, see https://jdk.java.net/11/
5 years ago
5 years ago
Also note that JDKs for Linux, MacOS and Windows will be downloaded, which will total several hundred megabytes.
Run the `bin/build-all.sh` script, which will in turn call the following scripts:
5 years ago
1. `bin/import-packages.sh` to retrieve the I2P Java sources, OpenJDK and the Ant build tool
5 years ago
5 years ago
2. `bin/build-original-i2p.sh` to build the I2P project retrieved from the I2P repository
5 years ago
5 years ago
3. `build-launcher.sh` to convert the I2P JARs to modules, compile the Java source code in this project, and then use
5 years ago
the jlink tool to build zero-dependency platform-specific launchers.
5 years ago
## Running the launchers
5 years ago
To run the Linux router, type:
5 years ago
5 years ago
`dist/linux/router/bin/launch.sh`
or `dist/linux/router/bin/launch-gui.sh`
5 years ago
5 years ago
To run the MacOS router, type:
`dist/mac/router/bin/launch.sh`
or `dist/mac/router/bin/launch-gui.sh`
5 years ago
5 years ago
For Windows, run:
5 years ago
5 years ago
`dist/windows/router/bin/launch.bat`
or `dist/windows/router/bin/launch-gui.bat`
Note that for the Windows GUI to run, you may need to install the latest <a href="https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads">Microsoft Visual C++ Redistributable</a>
5 years ago
5 years ago
If it launches successfully, you'll see the message:
5 years ago
5 years ago
```
I2P router launched. SAM listening on port 7656.
Press Ctrl-C to gracefully shut down the router (or send the SIGINT signal to the process).
```
5 years ago
5 years ago
## Check that the I2P router is running and that it is listening for SAM connections
`fuser 7656/tcp`
## Tunnel control
5 years ago
Note that it may take a short while for new tunnels to be set up.
Call the `dist/linux/router/bin/tunnel-control.sh` script as follows to create and destroy tunnels:
#### Listen for i2p connections and forward them to the specified host and port. Returns a newly created destination public key.
`tunnel-control.sh server.create <host> <port>`
#### Close the tunnel listening for connections on the specified destination public key. Returns "OK".
`tunnel-control.sh server.destroy <i2p destination public key>`
#### Create a tunnel that listens for connections on localhost and forwards connections over I2P to the specified destination public key. Returns a newly created localhost port number.
`tunnel-control.sh client.create <i2p destination public key>`
#### Close the tunnel listening for connections on the specified port. Returns "OK".
`tunnel-control.sh client.destroy <port>`
#### Create a socks tunnel, listening on the specified port
`tunnel-control.sh socks.create <port>`
#### Destroy the socks tunnel listening on the specified port
`tunnel-control.sh socks.destroy <port>`
#### Start a SAM listener on port 7656. Returns "OK"
`tunnel-control.sh sam.create`
## Watch the I2P log for messages
5 years ago
`tail -f dist/linux/router/i2p.config/wrapper.log`