The Invisible Internet Project (I2P, the project of the invisible Internet) is the leader among technologies for private information transfer. Full decentralization and independence make the I2P network architecturally complex, but unique in its kind. The article is devoted to the question: can a programmer ignorant of cryptography and networks write an application that works over I2P.
Modern implementations of I2P routers support the Simple Anonymous Messaging (SAM) API, which allows external applications to communicate over I2P using just a few simple commands. Within the framework of this article, we will consider the minimum necessary to start your own experiments.
Small retrospective
The history of I2P begins in the first half of the 2000s. Good software development practices in the era of videotapes were not widely disseminated. At that time , it was difficult to present modern concepts of interacting with external applications through a user - friendly interface (API).
. , - , , , , «example.i2p», . , .
, « – »! – - : , IRC- . peer-to-peer , ?
I2P- I2CP (I2P Control Protocol), . , : I2CP . - , . , - !
I2P Java- BitTorrent Email, I2P- .
API- SAM BOB (Basic Open Bridge). I2P ( SHA1), Java- . , .
, , C++ (i2pd) BOB SAM. PurpleI2P , ( ) . , .
SAM – . netcat i2pd (Java- ). telnet , (\n\r
), SAM \n
.
i2pd SAM , , . , - (http://127.0.0.1:7070
), . SAM - , sam.enabled = true
. 127.0.0.1:7656
.
Hello hidden world
, SAM, (handshake). HELLO VERSION
. SAM. RESULT=OK
, . HELLO VERSION
: HELLO VERSION MIN=3.0 MAX=3.3
. , . , 3.0 .
(id), , , (destination). – , . TRANSIENT
, , ( base64), . , (, ). , SAM , .
DEST GENERATE
, (SIGNATURE_TYPE=7
). , , . I2P.
, (PUB) (PRIV). .
. SAM : STREAM ( TCP), DATAGRAM ( UDP) RAW ( UDP). TCP. , STREAM-.
SESSION CREATE STYLE=STREAM ID=HabraHabr DESTINATION=__
STYLE
( STREAM
), DESTINATION
– ( PRIV
), ID
– , ( : HabraHabr
).
. , , . . , , , .
. «HabraHabr»: , , . , , STREAM ACCEPT ID=HabraHabr
.
. , «Novosibirsk» , , TRANSIENT
DESTINATION
. .
«HabraHabr», , :
STREAM CONNECT ID=Novosibirsk DESTINATION=___HabraHabr
, , ( ). , , .
. , I2P-, , . .
, , , . P2P (--) - .
, . , , . , . , .
: , . , , .
, , . , SAM .
- ITSOFT.