Skip to content

Commit

Permalink
i2p: lower the number of tunnels for transient sessions
Browse files Browse the repository at this point in the history
This will lower the load on the I2P network. Since we use one transient
session for connecting to just one peer, a higher number of tunnels is
unnecessary.

This was suggested in:
#26754 (comment)
#26754 (comment)

The options are documented in:
https://geti2p.net/en/docs/protocol/i2cp#options

A tunnel is unidirectional, so even if we make a single outbound
connection we still need an inbound tunnel to receive the messages sent
to us over that connection.

Alleviates: #26754

Github-Pull: #26837
Rebased-From: 801b405
  • Loading branch information
vasild authored and fanquake committed Feb 27, 2023
1 parent 5027e93 commit 29cdf42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/i2p.cpp
Expand Up @@ -379,7 +379,9 @@ void Session::CreateIfNotCreatedAlready()
// in the reply in DESTINATION=.
const Reply& reply = SendRequestAndGetReply(
*sock,
strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=TRANSIENT SIGNATURE_TYPE=7", session_id));
strprintf("SESSION CREATE STYLE=STREAM ID=%s DESTINATION=TRANSIENT SIGNATURE_TYPE=7 "
"inbound.quantity=1 outbound.quantity=1",
session_id));

m_private_key = DecodeI2PBase64(reply.Get("DESTINATION"));
} else {
Expand Down

0 comments on commit 29cdf42

Please sign in to comment.