This commit fixes [issue #2570](https://github.com/PurpleI2P/i2pd/issues/2570). The [specification of the SAM protocol](https://i2p.net/en/docs/api/samv3/) says the following: - "As of version 3.1 (I2P 0.9.14), the MIN and MAX parameters are optional." - "SAM will always return the highest version possible given the MIN and MAX constraints" Given this, the following handshakes do not change: ``` printf "HELLO VERSION MIN=3.1 MAX=3.3\n" | nc -q 0 127.0.0.1 7656 HELLO REPLY RESULT=OK VERSION=3.3 printf "HELLO VERSION MAX=3.3\n" | nc -q 0 127.0.0.1 7656 HELLO REPLY RESULT=OK VERSION=3.3 printf "HELLO VERSION MIN=31 MAX=31\n" | nc -q 0 127.0.0.1 7656 HELLO REPLY RESULT=OK VERSION=3.1 (periods are still optional) ``` But the following ones do (the responses before and after this commit are included): ``` printf "HELLO VERSION MAX=3.4\n" | nc -q 0 127.0.0.1 7656 before: HELLO REPLY RESULT=NOVERSION after: HELLO REPLY RESULT=OK VERSION=3.3 printf "HELLO VERSION MIN=3.0\n" | nc -q 0 127.0.0.1 7656 before: HELLO REPLY RESULT=OK VERSION=3.0 after: HELLO REPLY RESULT=OK VERSION=3.3 printf "HELLO VERSION MIN=3.1\n" | nc -q 0 127.0.0.1 7656 before: HELLO REPLY RESULT=OK VERSION=3.1 after: HELLO REPLY RESULT=OK VERSION=3.3 printf "HELLO VERSION MIN=2.9\n" | nc -q 0 127.0.0.1 7656 before: HELLO REPLY RESULT=NOVERSION after: HELLO REPLY RESULT=OK VERSION=3.3 printf "HELLO VERSION\n" | nc -q 0 127.0.0.1 7656 before: HELLO REPLY RESULT=NOVERSION after: HELLO REPLY RESULT=OK VERSION=3.3 printf "HELLO VERSION MIN=3.3 MAX=3.1\n" | nc -q 0 127.0.0.1 7656 before: HELLO REPLY RESULT=OK VERSION=3.1 after: HELLO REPLY RESULT=NOVERSION printf "HELLO VERSION MIN=3.5 MAX=2.7\n" | nc -q 0 127.0.0.1 7656 before: HELLO REPLY RESULT=OK VERSION=2.7 after: HELLO REPLY RESULT=NOVERSION printf "HELLO VERSION MIN=2.7 MAX=3.5\n" | nc -q 0 127.0.0.1 7656 before: HELLO REPLY RESULT=NOVERSION after: HELLO REPLY RESULT=OK VERSION=3.3 printf "HELLO VERSION MIN=aab3vsg1df MAX=fd3gfbgf1bf\n" | nc -q 0 127.0.0.1 7656 before: HELLO REPLY RESULT=OK VERSION=3.1 after: HELLO REPLY RESULT=NOVERSION ``` I included a script to automatically test these handshakes.
Note: i2pd for Android can be found in the i2pd-android repository and with a Qt GUI in the i2pd-qt repository. For macOS, a GUI version can be found in the gui-i2pd repository.
i2pd
i2pd (I2P Daemon) is a full-featured C++ implementation of I2P client.
I2P (Invisible Internet Protocol) is a universal anonymous network layer.
All communications over I2P are anonymous and end-to-end encrypted, participants
don't reveal their real IP addresses.
I2P client is a software used for building and using anonymous I2P networks. Such networks are commonly used for anonymous peer-to-peer applications (filesharing, cryptocurrencies) and anonymous client-server applications (websites, instant messengers, chat-servers).
I2P allows people from all around the world to communicate and share information without restrictions.
Features
- Distributed anonymous networking framework
- End-to-end encrypted communications
- Small footprint, simple dependencies, fast performance
- Rich set of APIs for developers of secure applications
Resources
Installing
The easiest way to install i2pd is by using precompiled packages and binaries.
You can fetch most of them on release page.
Please see documentation for more info.
Building
See documentation for how to build i2pd from source on your OS.
note: i2pd with Qt GUI can be found in i2pd-qt repository and for android in i2pd-android repository.
Build instructions:
Supported systems:
- GNU/Linux (Debian, Ubuntu, etc) -
- CentOS, Fedora, Mageia -

- Alpine, ArchLinux, openSUSE, Gentoo, etc.
- Windows -
- Mac OS -
- Docker image -
- Snap -
- FreeBSD -
- Android
- iOS
Using i2pd
See documentation and example config file.
Localization
You can help us with translation i2pd to your language using Crowdin platform! Translation project can be found here.
New languages can be requested on project's discussion page.
No LLM/AI policy
No LLM/AI generated code for pull requests
No LLM/AI generated texts for issues
Donations
E-Mail: i2porignal at yandex.com
BTC: 3MDoGJW9TLMTCDGrR9bLgWXfm6sjmgy86f
LTC: LKQirrYrDeTuAPnpYq5y7LVKtywfkkHi59
ETH: 0x9e5bac70d20d1079ceaa111127f4fb3bccce379d
GST: GbD2JSQHBHCKLa9WTHmigJRpyFgmBj4woG
DASH: Xw8YUrQpYzP9tZBmbjqxS3M97Q7v3vJKUF
ZEC: t1cTckLuXsr1dwVrK4NDzfhehss4NvMadAJ
ANC: AQJYweYYUqM1nVfLqfoSMpUMfzxvS4Xd7z
XMR: 497pJc7X4xqKvcLBLpSUtRgWqMMyo24u4btCos3cak6gbMkpobgSU6492ztUcUBghyeHpYeczB55s38NpuHoH5WGNSPDRMH
License
This project is licensed under the BSD 3-clause license, which can be found in the file LICENSE in the root of the project source code.