You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to establish connections and maintain a decentralized network, nodes need to be able to communicate with each other, even if they are behind NAT (Network Address Translation) routers or a firewall.
By utilizing UPnP and other NAT traversal methods, Neroshop nodes can automate the process of port forwarding, making it easier for users to participate in the network without requiring manual configuration of their routers.
ELI5: Right now nodes can only send data but cannot receive data because receiving data from their public IP address requires NAT traversal.
Additional Information
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 the Node::send_query() function. I want to know how I can route both the inbound and outbound traffic of the Node using i2p.
There are a few lightweight NAT traversal libraries available for C/C++ that I've been able to compile so far:
libnatpmp: a lightweight and portable library for NAT-PMP (NAT Port Mapping Protocol) implementation which I've been able to compile but have no idea how to integrate since I'm just dumb.
miniupnpc: lightweight library that implements the UPnP (Universal Plug and Play) protocol which is not currently working for me.
opening a port through UPnP is not reliable for p2p apps. Consider using STUN/TURN/ICE to connect behind NAT
I am going with JUICE as it has zero dependencies and a very permissive license (🥳), but I will need help with integrating it into the neroshop daemon using these examples and this as a reference guide.
The miniupnp code in daemon/main.cpp does not work for whatever reason. I've even had to contact the dev to review the code and he gave me the 👍🏿.
Edit: This issue may have to do with my node running on a home network that shares the same IPv4 address with all connected devices.
Edit 2: I've done some tests using libplum and miniupnp for automatic port forwarding/mapping and both often fail for me (even with UPnP enabled and firewall disabled) whereas STUN/TURN (libjuice) is usually successful.
Edit 3: libplum, miniupnp, and libnatpmp have been removed as of July 5 2023.
In order to establish connections and maintain a decentralized network, nodes need to be able to communicate with each other, even if they are behind NAT (Network Address Translation) routers or a firewall.
By utilizing UPnP and other NAT traversal methods, Neroshop nodes can automate the process of port forwarding, making it easier for users to participate in the network without requiring manual configuration of their routers.
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.https://github.com/larteyoh/testshop/blob/main/src/core/protocol/p2p/node.cpp
https://github.com/larteyoh/testshop/blob/main/src/daemon/main.cpp
There are a few lightweight NAT traversal libraries available for C/C++ that I've been able to compile so far:
That brings me down to two C/C++ library options:
libnice
JUICE
I am going with
JUICE
as it has zero dependencies and a very permissive license (🥳), but I will need help with integrating it into the neroshop daemon using these examples and this as a reference guide.I2P Integration
The text was updated successfully, but these errors were encountered: