### i2pd.conf Example Configuration Source: https://docs.i2pd.website/en/latest/user-guide/configuration An example of the i2pd.conf file demonstrating INI-like syntax for configuration. It shows comments, general settings like logging and IPv6, and module-specific settings for httpproxy and sam. ```ini # comment log = true # use stdout (default) ipv6 = true # settings for specific module [httpproxy] port = 4444 # ^^ this will be --httproxy.port= in cmdline # another comment [sam] enabled = true ``` -------------------------------- ### Setup Android SDK and Dependencies Source: https://docs.i2pd.website/en/latest/devs/building/android Downloads and sets up the Android SDK command-line tools, and installs essential build tools, CMake, and the NDK. This prepares the environment for Android application development. ```bash mkdir /tmp/android-sdk cd /tmp/android-sdk wget unzip commandlinetools-linux-*_latest.zip # install required tools ./cmdline-tools/bin/sdkmanager --sdk_root=/opt/android-sdk "build-tools;31.0.0" "cmake;3.18.1" "ndk;21.4.7075529" ``` -------------------------------- ### Start and Help Options for i2pd Daemon Source: https://docs.i2pd.website/en/latest/user-guide/run Demonstrates the basic command to start the i2pd daemon and how to display all available command-line options for further configuration. ```bash ./i2pd ``` ```bash ./i2pd --help ``` -------------------------------- ### Install libraries on Arch/Manjaro Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the Boost libraries, OpenSSL, and zlib packages on Arch Linux and its derivatives using pacman. ```bash sudo pacman -S --needed boost openssl zlib ``` -------------------------------- ### Install libraries on Debian/Ubuntu Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs required Boost libraries, OpenSSL development files, and zlib development files on Debian-based systems using apt. ```bash sudo apt install \ libboost-date-time-dev \ libboost-filesystem-dev \ libboost-program-options-dev \ libboost-system-dev \ libssl-dev \ zlib1g-dev ``` -------------------------------- ### Install UPnP support on FreeBSD Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the 'miniupnpc' package on FreeBSD, which is an optional dependency for enabling UPnP support in i2pd. ```bash pkg install miniupnpc ``` -------------------------------- ### Install UPnP support on OpenBSD Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the 'miniupnpc' package on OpenBSD, which is an optional dependency for enabling UPnP support in i2pd. ```bash pkg_add miniupnpc ``` -------------------------------- ### Install build tools and libraries on OpenBSD Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs Boost, CMake, and GNU Make ('gmake') on OpenBSD using the 'pkg_add' command. The base system includes LibreSSL and zlib. ```bash pkg_add boost cmake gmake ``` -------------------------------- ### Incoming Server Tunnel Configuration Example Source: https://docs.i2pd.website/en/latest/user-guide/tunnels Configuration for an incoming server tunnel to a local service. Requires type, host, port, and keys. Optional parameters include inport for the I2P service port and accesslist for allowed I2P addresses. ```ini [IRC-SERVER] type = server host = 127.0.0.1 port = 6667 keys = irc.dat ``` -------------------------------- ### Build i2pd Flatpak Package Source: https://docs.i2pd.website/en/latest/devs/building/qt-desktop-gui Installs Flatpak and Flatpak Builder, adds the Flathub remote repository, installs the necessary SDK, clones the i2pd Flatpak repository, and then builds the Flatpak package for i2pd. The number of build jobs can be configured. ```bash sudo apt install flatpak flatpak-builder flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo flatpak --user install flathub org.kde.Sdk/x86_64/5.14 # required SDK version might be higher, check the manifest at https://github.com/flathub/website.i2pd.i2pd/blob/master/website.i2pd.i2pd.json git clone https://github.com/flathub/website.i2pd.i2pd && cd website.i2pd.i2pd export FLATPAK_BUILDER_N_JOBS=4 # build process jobs count flatpak-builder --user --install --force-clean i2pd_build_dir website.i2pd.i2pd.json ``` -------------------------------- ### Install build tools and libraries on FreeBSD Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the necessary Boost libraries, CMake, and GNU Make ('gmake') on FreeBSD using the 'pkg' package manager. The base system includes OpenSSL and zlib. ```bash pkg install boost-libs cmake gmake ``` -------------------------------- ### Install static build support on Fedora/RHEL/CentOS Stream Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the 'boost-static' package, which is required for creating static builds of i2pd on Fedora and RHEL-based systems. ```bash sudo dnf install boost-static ``` -------------------------------- ### Install build tools on Fedora/RHEL/CentOS Stream Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the 'make', 'cmake', 'gcc', and 'gcc-c++' packages on Fedora and RHEL-based systems using the dnf package manager. ```bash sudo dnf install make cmake gcc gcc-c++ ``` -------------------------------- ### Install libraries on Fedora/RHEL/CentOS Stream Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the Boost development files, OpenSSL development files, zlib development files, and the 'atomic' library on Fedora and RHEL-based systems using dnf. ```bash sudo dnf install boost-devel openssl-devel zlib-devel atomic ``` -------------------------------- ### Recommended Setup for Running i2pd from Source Source: https://docs.i2pd.website/en/latest/user-guide/run Details the recommended steps for setting up and running i2pd when built from source without a package manager. This includes creating a distribution directory, copying necessary files, and adjusting system limits. ```bash mkdir $HOME/dist cp i2pd $HOME/dist cp -R contrib/certificates $HOME/dist cp contrib/i2pd.conf $HOME/dist cd $HOME/dist ulimit -n 4096 # only on Linux, increasing open file limit ``` ```bash ./i2pd --datadir . ``` -------------------------------- ### Install Kali Dependencies and Build i2pd Qt GUI Source: https://docs.i2pd.website/en/latest/devs/building/qt-desktop-gui Installs required development packages on Kali Linux and clones the i2pd-qt repository. It then configures the build using qmake for release or debug modes and compiles the application using make with UPnP support. ```bash sudo apt-get install build-essential g++ make libcrypto++-dev libssl-dev \ libboost-all-dev libminiupnpc-dev libwebsocketpp-dev qtbase5-dev \ libqt5gui5 git zlib1g-dev mkdir git cd git git clone --recursive https://github.com/PurpleI2P/i2pd-qt.git cd i2pd-qt # For release build, qmake # For debug build, qmake i2pd_qt.pro "CONFIG += debug" # When qmake completed, run: make USE_UPNP=yes ``` -------------------------------- ### Incoming HTTP Tunnel Configuration Example Source: https://docs.i2pd.website/en/latest/user-guide/tunnels Configuration for an incoming HTTP tunnel to a local service. Requires type, host, port, and keys. Optional parameters include inport for the I2P service port and accesslist for allowed I2P addresses. ```ini [LOCALSITE] type = http host = 127.0.0.1 port = 80 keys = site-keys.dat ``` -------------------------------- ### Install i2pd after build Source: https://docs.i2pd.website/en/latest/devs/building/unix This command installs the compiled i2pd application to the system after a successful build. It typically requires root privileges. ```bash sudo make install ``` -------------------------------- ### Install i2pd to Homebrew prefix on macOS Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the compiled i2pd application to the Homebrew installation prefix on macOS. This command dynamically determines the correct prefix for Intel or Apple Silicon. ```bash sudo make install HOMEBREW=1 PREFIX="$(brew --prefix)" ``` -------------------------------- ### Install build tools on Arch/Manjaro Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the 'base-devel' group and 'cmake' package on Arch Linux and its derivatives using the pacman package manager. ```bash sudo pacman -S --needed base-devel cmake ``` -------------------------------- ### Install UPnP support on Fedora/RHEL/CentOS Stream Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the 'miniupnpc-devel' package, which is an optional dependency for enabling UPnP support in i2pd on Fedora and RHEL-based systems. ```bash sudo dnf install miniupnpc-devel ``` -------------------------------- ### Install MSYS2 Dependencies for i2pd GUI on Windows Source: https://docs.i2pd.website/en/latest/devs/building/qt-desktop-gui Installs necessary packages using pacman within MSYS2 mingw32 environment for building the i2pd GUI on Windows. This includes git, make, tar, GCC, Boost, libpng, OpenSSL, and zlib. ```bash pacman -S git make tar mingw-w64-i64-gcc mingw-w64-i64-boost mingw-w64-i64-libpng mingw-w64-i64-openssl mingw-w64-i64-zlib ``` ```bash pacman -S mingw-w64-i64-qt5-static ``` ```bash pacman -S openssl-devel mingw-w64-i64-miniupnpc ``` -------------------------------- ### Install build tools on Debian/Ubuntu Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs essential build tools like 'build-essential', 'debhelper', and 'cmake' on Debian-based systems using the apt package manager. ```bash sudo apt install build-essential debhelper cmake ``` -------------------------------- ### Install Debian/Ubuntu Dependencies for i2pd GUI Source: https://docs.i2pd.website/en/latest/devs/building/qt-desktop-gui Installs development packages required for building the i2pd Qt GUI on Debian and Ubuntu systems. This includes build tools, libraries for crypto, SSL, Boost, miniupnpc, websockets, Qt5 GUI and widgets, git, and zlib. ```bash # Debian sudo apt-get install build-essential g++ make libcrypto++-dev libssl-dev \ libboost-all-dev libminiupnpc-dev libwebsocketpp-dev libqt5gui5 \ libqt5widgets5 git zlib1g-dev qt5-qmake qtbase5-dev ``` ```bash # Ubuntu sudo apt install qtcreator qt5-default build-essential g++ make libcrypto++-dev \ libssl-dev libboost-all-dev libminiupnpc-dev libwebsocketpp-dev libqt5gui5 git \ zlib1g-dev ``` -------------------------------- ### Install Build Tools on Ubuntu Source: https://docs.i2pd.website/en/latest/devs/building/android Installs necessary tools like g++, rename, OpenJDK 11, and Gradle on Ubuntu systems for building i2pd. This is a foundational step for the build process. ```bash sudo apt-get install g++ rename openjdk-11-jdk gradle ``` -------------------------------- ### Install UPnP support on Debian/Ubuntu Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the miniupnpc development package, which is an optional dependency for enabling UPnP support in i2pd on Debian-based systems. ```bash sudo apt install libminiupnpc-dev ``` -------------------------------- ### Install MinGW-w64 Cross-Compiler on Ubuntu Source: https://docs.i2pd.website/en/latest/devs/building/cross Installs the necessary cross-compiler toolchain for building Windows binaries on a Linux system. This is a prerequisite for cross-compilation. ```bash sudo apt-get install g++-mingw-w64-x86-64 ``` -------------------------------- ### Build OpenSSL for Windows with NASM Source: https://docs.i2pd.website/en/latest/devs/building/windows This sequence of commands builds OpenSSL for Windows using the Visual Studio command prompt and NASM assembler. It configures the build for a 32-bit DLL, compiles it, and installs it to a specified directory. ```batch set "PATH=%PATH%;C:\Program Files (x86)\nasm" perl Configure VC-WIN32 --prefix=c:\OpenSSL-Win32 ms\do_nasm nmake -f ms\ntdll.mak nmake -f ms\ntdll.mak install ``` -------------------------------- ### Install required packages on Solaris/OpenIndiana Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs GCC 14, CMake, Boost libraries, and GNU Make on Solaris or OpenIndiana systems using the 'pkg' command. These are necessary for building i2pd. ```bash pkg install developer/gcc-14 pkg install developer/build/cmake pkg install system/library/boost pkg install developer/build/gnu-make ``` -------------------------------- ### Install dependencies on macOS Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs Boost, OpenSSL (version 3), CMake, and Make using the Homebrew package manager on macOS. Xcode Command Line Tools are also a prerequisite. ```bash brew install boost openssl@3 cmake make ``` -------------------------------- ### Build a .deb package on Debian/Ubuntu Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs necessary tools for building Debian packages and then initiates the package build process using 'debuild'. This is for creating installable .deb files. ```bash sudo apt install fakeroot devscripts dh-apparmor cd i2pd debuild --no-tgz-check -us -uc -b ``` -------------------------------- ### Configure and Build i2pd with CMake (Visual Studio 2013) Source: https://docs.i2pd.website/en/latest/devs/building/windows This command configures the i2pd build using CMake, targeting the Visual Studio 2013 generator. It enables UPnP support and precompiled headers, and specifies the installation prefix. This is an alternative to using the CMake GUI. ```bash mkdir i2pd\out cd i2pd\out cmake ..\build -G "Visual Studio 12 2013" -DWITH_UPNP=ON -DWITH_PCH=ON -DCMAKE_INSTALL_PREFIX:PATH=C:\dev\Debug_Win32_stage ``` -------------------------------- ### Build zlib for Windows with MinGW-w64 Source: https://docs.i2pd.website/en/latest/devs/building/cross Clones, checks out a specific version, and builds zlib statically for Windows using MinGW-w64. It configures zlib with static linking and a specified installation prefix. ```bash git clone https://github.com/madler/zlib cd zlib git checkout v1.2.8 CC=x86_64-w64-mingw32-gcc CFLAGS=-O3 ./configure --static --64 --prefix=~/dev/stage make make install ``` -------------------------------- ### Install i2pd to system root on macOS Source: https://docs.i2pd.website/en/latest/devs/building/unix Installs the compiled i2pd application to the system root directory ('/') on macOS, using 'sudo' for elevated privileges. ```bash sudo make install HOMEBREW=1 ``` -------------------------------- ### Display i2pd Help Message Source: https://docs.i2pd.website/en/latest/user-guide/configuration Command to display the built-in help message for i2pd, which includes all available options and their default values. This is useful for understanding configuration parameters. ```bash ./i2pd --help ``` -------------------------------- ### Clone and Build i2pd using CMake Source: https://docs.i2pd.website/en/latest/devs/building/unix This snippet shows how to clone the i2pd repository, navigate to the build directory, configure the build with CMake, and compile the project. It requires Git and CMake to be installed. ```bash git clone https://github.com/PurpleI2P/i2pd.git cd i2pd mkdir -p build && cd build cmake .. cmake --build . -j ``` -------------------------------- ### Build i2pd Qt GUI without Qt Creator on Debian/Ubuntu Source: https://docs.i2pd.website/en/latest/devs/building/qt-desktop-gui Installs necessary development packages and clones the i2pd-qt repository. It then uses qmake to configure the build (release or debug) and make to compile the application with UPnP support enabled. ```bash # Debian sudo apt-get install build-essential g++ make libcrypto++-dev libssl-dev \ libboost-all-dev libminiupnpc-dev libwebsocketpp-dev libqt5gui5 \ libqt5widgets5 git zlib1g-dev qt5-qmake qtbase5-dev # Ubuntu sudo apt-get install build-essential g++ make libcrypto++-dev libssl-dev \ libboost-all-dev libminiupnpc-dev libwebsocketpp-dev qt5-default \ libqt5gui5 git zlib1g-dev mkdir git cd git git clone --recursive https://github.com/PurpleI2P/i2pd-qt.git cd i2pd-qt # For release build, qmake # For debug build, qmake i2pd_qt.pro "CONFIG += debug" # When qmake completed, run: make USE_UPNP=yes ``` -------------------------------- ### Manage i2pd Service with systemd Source: https://docs.i2pd.website/en/latest/user-guide/run Provides commands for managing the i2pd service using systemd, including starting, stopping, enabling, and disabling the service. The stop command initiates a graceful shutdown. ```bash sudo systemctl start i2pd.service ``` ```bash sudo systemctl stop i2pd.service --no-block ``` ```bash sudo systemctl enable i2pd.service ``` ```bash sudo systemctl disable i2pd.service ``` -------------------------------- ### Outgoing Tunnel Configuration Example Source: https://docs.i2pd.website/en/latest/user-guide/tunnels Configuration for an outgoing client tunnel to a remote service. Requires type, port, and destination. Optional parameters include keys for identity, address for binding, and signaturetype for new destinations. ```ini [IRC] type = client address = 127.0.0.1 port = 6668 destination = irc.ilita.i2p keys = irc-keys.dat ``` -------------------------------- ### Clone and Build i2pd Qt GUI on Windows Source: https://docs.i2pd.website/en/latest/devs/building/qt-desktop-gui Clones the i2pd repository, checks out the OpenSSL branch, sets up environment variables, and builds the i2pd Qt GUI application using qmake and make. It's crucial to restrict the PATH to avoid conflicts with other installed software. ```bash mkdir -p /c/dev/ cd /c/dev/ git clone https://github.com/PurpleI2P/i2pd.git cd i2pd git checkout openssl export MINGW='mingw32' export PATH=/$MINGW/bin:/usr/bin:/mingw32/qt5-static/bin cd qt/i2pd_qt qmake make USE_UPNP=yes ``` -------------------------------- ### Clone i2pd Qt GUI Repository on Debian/Ubuntu Source: https://docs.i2pd.website/en/latest/devs/building/qt-desktop-gui Clones the i2pd-qt repository recursively to ensure all submodules are downloaded. This is a prerequisite for building the GUI application on Debian or Ubuntu systems. ```bash mkdir git cd git git clone --recursive https://github.com/PurpleI2P/i2pd-qt.git ``` -------------------------------- ### BOB Protocol Extensions - Tunnel Control Source: https://docs.i2pd.website/en/latest/devs/i2pd-specifics Commands for controlling tunnels within the BOB protocol, including starting, stopping, status checks, listing, and clearing tunnels. ```APIDOC ## BOB Protocol Extensions - Tunnel Control ### Description This section details commands for managing tunnels via the BOB protocol, enabling users to control tunnel lifecycles and view their status. ### Method N/A (BOB commands) ### Endpoint N/A (BOB commands) ### Parameters #### Commands - `start` - Initiates the tunnel associated with the current nickname. - `stop` - Stops the tunnel associated with the current nickname. - `status ` (string) - Displays the status of the tunnel identified by the specified nickname. - `list` - Lists all configured tunnels. - `clear` - Removes the current nickname from the list of configured tunnels. ### Request Example ``` status mytunnel ``` ### Response #### Success Response N/A (Command execution confirmation or status details) #### Response Example ``` Tunnel 'mytunnel' is active. ``` ``` -------------------------------- ### Build i2pd on macOS with Homebrew Source: https://docs.i2pd.website/en/latest/devs/building/unix Builds i2pd on macOS using the 'make' command, specifying 'HOMEBREW=1' to indicate Homebrew installations and '-j8' for parallel compilation. ```bash make HOMEBREW=1 -j8 ``` -------------------------------- ### Build i2pd on FreeBSD using GNU Make Source: https://docs.i2pd.website/en/latest/devs/building/unix Builds i2pd on FreeBSD using the GNU Make utility ('gmake'), which is recommended when using the BSD Makefile path. ```bash gmake ``` -------------------------------- ### Build i2pd using plain Make Source: https://docs.i2pd.website/en/latest/devs/building/unix A simplified method to build i2pd using the 'make' command directly within the project directory. This is a quick alternative to the CMake build process. ```bash cd i2pd/ make ``` -------------------------------- ### Create Static i2pd Libraries for iOS using libtool Source: https://docs.i2pd.website/en/latest/devs/building/ios Uses the `libtool` command to create static libraries (`libi2pdclient.a` and `libi2pd.a`) for iOS by combining the output from the simulator and device builds. This ensures compatibility across different iOS targets. ```bash libtool -static -o lib/libi2pdclient.a build/*/libi2pdclient.a libtool -static -o lib/libi2pd.a build/*/libi2pd.a cp i2pd/*.h include/i2pd ``` -------------------------------- ### Configure HTTP Server Tunnel in i2pd Source: https://docs.i2pd.website/en/latest/user-guide/tunnels Configures an HTTP server tunnel, which is a specialized server tunnel. It requires the 'Host:' field to be set to the provided address. i2pd can also resolve the host if necessary. ```ini [http-in] type = http host = 127.0.0.1 port = 80 keys = our-website.dat ``` -------------------------------- ### Configure Client for PSK Authentication with Encrypted LeaseSet2 Source: https://docs.i2pd.website/en/latest/tutorials/blinded-addresse This configuration is for the client side when using Pre-Shared Key (PSK) authentication for Encrypted LeaseSet2. It requires setting the `i2cp.leaseSetPrivKey` parameter with the shared PSK. ```ini i2cp.leaseSetPrivKey = dGhpcyBpcyBhIHJhbmRvbSAzMi1ieXRlIHByZS1zaGFyZWQga2V5Cg== ``` -------------------------------- ### Generate PSK for PSK Authentication Source: https://docs.i2pd.website/en/latest/tutorials/blinded-addresse This command generates a random 32-byte Pre-Shared Key (PSK) using OpenSSL, suitable for PSK authentication with Encrypted LeaseSet2. The output should be a Base64 encoded string. ```bash openssl rand -base64 32 ``` -------------------------------- ### Build Boost for Windows with MinGW-w64 Source: https://docs.i2pd.website/en/latest/devs/building/cross Builds the Boost libraries statically for a 64-bit Windows target using the configured MinGW-w64 toolchain. It specifies required components and a staging directory. ```bash ./bootstrap.sh ./b2 toolset=gcc-mingw target-os=windows variant=release link=static runtime-link=static address-model=64 \ --build-type=minimal --with-filesystem --with-program_options --with-date_time \ --stagedir=stage-mingw-64 ``` -------------------------------- ### Configure Chromium for Anonymous Browsing Source: https://docs.i2pd.website/en/latest/tutorials/http This snippet shows how to launch the Chromium browser with a specific proxy setting to access anonymous websites via i2pd. It requires the i2pd proxy to be running on the default port. ```bash chromium --proxy-server="http://127.0.0.1:4444" ``` -------------------------------- ### Clone and Checkout OpenSSL Version Source: https://docs.i2pd.website/en/latest/devs/building/windows This snippet demonstrates how to clone the OpenSSL repository and checkout a specific version (3.0.0). This is a prerequisite for building i2pd with OpenSSL support. ```bash git clone https://github.com/openssl/openssl.git cd openssl git checkout openssl-3.0.0 ``` -------------------------------- ### Configure UDP Client Tunnel in i2pd Source: https://docs.i2pd.website/en/latest/user-guide/tunnels Sets up a UDP client tunnel to forward a local UDP endpoint to a remote I2P destination. This requires specifying the destination I2P address and the local port to bind to. ```ini [openvpn-client-simple] type = udpclient destination = something.b32.i2p port = 1194 ``` -------------------------------- ### Configure Client for DH Authentication with Encrypted LeaseSet2 Source: https://docs.i2pd.website/en/latest/tutorials/blinded-addresse This configuration is for the client side when using Diffie-Hellman (DH) authentication for Encrypted LeaseSet2. It requires setting the `i2cp.leaseSetPrivKey` parameter with the client's private DH key. ```ini i2cp.leaseSetPrivKey = 8HlgzxO-pJ3A1rtcc~7nnz774nyKXLLsVeuDGGlc63o= ```