-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I2P integration #7
Comments
I can work on this- I think this will be a good way for me to get more familiar with how SAM works before I begin implementing it in monerod/monero-gui |
Thanks for being the first person to volunteer to work on this issue! I appreciate it. If you do manage to compile neroshop, you can test/play around with the network on localhost just to see how messages are sent, what kind of messages are sent, and how nodes communicate with their peers. I have written some instructions here. Anyways, If you have any questions, let me know. |
The question of yes SAM or no SAM really comes down to one question: should neroshop support using an external instance of i2p? (As in if someone is already running i2pd or another router) If no, then using SAM wouldn’t really be necessary, as you wouldn’t have to worry about protocol portability. If yes, then SAM would be the best option (for why, you can see idk’s CCS proposal for what I’m working on, where he describes the benefits of SAM: https://repo.getmonero.org/monero-project/ccs-proposals/-/merge_requests/454) |
You mentioned directly linking i2pd libs inside the app; that would likely make SAM unnecessary |
Currently, the neroshop daemon checks whether an external i2pd router is already running in the background and uses that one otherwise it starts its own internal i2pd router. This would make SAM necessary. So what do you think, should we go with SAM? |
Honestly, I only care that users won't have to manually install or run i2pd. I want them connected to i2p as soon as they start the neroshop client. Not using SAM/Creating destinations and sending datagrams directly from the code seems more reasonable but at the same time, I also want to support users running an external i2p or i2pd router. Plus, you mentioned that you want to get more familiar with how SAM works so that you could implement it in monero. With that saying, I think we have already come to a conclusion. SAM it is. |
Ok, I think I understand it better now. It should be noted that i2pd is not the only router used, so just checking for i2pd wouldn’t be enough. That in my opinion would be the best argument for using SAM: it doesn’t matter what router is used, it would be able to see and connect to it all the same. |
By default all peers will be anonymized through the use of i2pd. Like how Monero has mandatory privacy, i2p will be mandatory for routing the network traffic of users. This is the only way to make neroshop truly private and censorship-resistant.
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 API 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.SAMv3
APInode.cpp
or create a "node2.cpp" if you have to!query
) should be "Repliable" while datagrams containing responses (response
) and errors (error
) can be "Raw"neroshop networking code
:https://github.com/larteyoh/testshop/blob/main/src/core/protocol/p2p/node.cpp
https://github.com/larteyoh/testshop/blob/main/src/daemon/main.cpp
https://github.com/layters/testshop/blob/main/src/core/network/i2p.cpp
libi2pd
:https://github.com/PurpleI2P/i2pd
i2psam
:https://github.com/i2p/i2psam
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)
(I'll be real with y'all. I'm totally broke at the moment but I will surely pay after the work has been completed without errors and approved of as I've never failed to pay any bounty hunter who has done what was needed of them)
The text was updated successfully, but these errors were encountered: