I2P integration #7
Labels
💰 bounty
Get paid by completing a task
🆘 help wanted
Extra attention is needed
urgent
Required to move forward
👍 enhancement
New feature or request
Milestone
By default all peers will be anonymized through the use of i2pd. Like how Monero has mandatory privacy, i2pd will be mandatory for routing the network traffic of users. This is the only way to make neroshop truly private and decentralized.
Currently, I'm facing issues relating to bypassing NAT routers and firewalls while using the low-level C API (POSIX) sockets provided by the operating system and I need urgent help with i2pd integration.
Tor is primarily focused on TCP-based traffic and does not provide native support for routing UDP traffic so i2p is the only way forward since the neroshop DHT is based on the UDP protocol. Also, I believe i2p is a much more suitable option when it comes to DHT networks, torrenting, etc.
i2pd and i2psam are already bundled with the code as submodules and can be built into static libraries. However, neither is currently being utilized due to a lack of documentation and understanding of the i2p network☹️ .
libi2pd allows us to embed a router in an application (in this case, the neroshop daemon) so an external one is not required and it provides the SAMv3 API server.
i2psam gives us socket-like abstractions of I2P connections, using the API server provided by an external router
Either library can be used, though i2pd is preferred.
The neroshop DHT node uses two separate UDP sockets for communication - one for listening to and responding to requests via the
Node::run()
function and the other is a temporary socket that is used for sending queries to other nodes in the network via theNode::send_query()
function. I want to know how I can route both the inbound and outbound traffic of the Node using i2p.You will most likely be using i2p's
SAMv3
APIYou may rewrite
node.cpp
if you have to!The neroshop daemon should start the i2pd router the moment it is opened and the node should create a session (b32.i2p address) which can be hashed with sha3_256 and used as the
node_id
.From there, the session can create multiple streams to communicate with other peers in the network. I'm not familiar with the i2p network so I probably don't know what I'm saying.
neroshop networking stack
:https://github.com/larteyoh/testshop/blob/main/src/core/protocol/p2p/node.cpp
https://github.com/larteyoh/testshop/blob/main/src/daemon/main.cpp
libi2pd (SAMv3 API + router)
:https://github.com/PurpleI2P/i2pd/blob/openssl/libi2pd_client/SAM.cpp
https://github.com/PurpleI2P/i2pd/blob/openssl/libi2pd_client/SAM.hpp
https://github.com/PurpleI2P/i2pd/tree/openssl/libi2pd
i2psam
:https://github.com/i2p/i2psam/blob/master/i2psam.cpp
https://github.com/i2p/i2psam/blob/master/i2psam.h
Official i2p docs:
https://geti2p.net/en/docs/applications/embedding
https://geti2p.net/en/docs/api/samv3
Related projects
monero-project/monero-gui#4263
https://github.com/i2p/i2psam?tab=readme-ov-file#example
#124
#228
$2500 USD (via crypto)
The text was updated successfully, but these errors were encountered: