nat-traversal | js package that contains a relay server | TLS library
kandi X-RAY | nat-traversal Summary
kandi X-RAY | nat-traversal Summary
nat-traversal is a Node.js package that contains a relay server and client that can be used to perform NAT traversal, i.e. expose any TCP/IP service running behind a NAT.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nat-traversal
nat-traversal Key Features
nat-traversal Examples and Code Snippets
Community Discussions
Trending Discussions on nat-traversal
QUESTION
I am currently writing a P2P application using golang. I have chosen Noise for that, since it provides an easy to use network stack.
My application provides a REST API that can be accessed via localhost
. Data that are sent to the locally provided endpoints will then be transferred to all connected peers, which then distribute the data to their connected peers to keep the network synchronized.
So far I have succeeded with my implementation, however this only works for publicly exposed nodes or nodes within the same Network.
I would like to keep the usability of my application as easy as possible, also for users in private networks. Therefore I want to avoid manual configuration overhead (i.e. port forwarding in their router settings). If at all possible, I also would like to avoid using a central server for the NAT-Traversal, since my goal is to have a truly decentralized application.
I understand that there are several NAT-Traversal techniques, such as STUN and TURN, alongside others, and I am aware that Noise offers already NAT-PMP and UPnP, but somehow I cannot wrap my head around how exactly they work.
I know, that some VoIP or File-Sharing services use NAT-PMP and they seem to work on pretty much every Network, without any user interaction. That just seems a little weird to me and I am stuck.
How is it possible, that my application just magically changes some Router configurations to accept incoming traffic? To me that seems to be a huge security risk, especially if the user of my application does not even know about it. Also, I figured that not every Router supports NAT-PMP and UPnP. What if my users have one of those?
...ANSWER
Answered 2019-May-19 at 21:39Without a public central directory server, this is not possible. There is no way for peers to identify one another. This does not mean the server has to participate in any of the peer to peer communications. I just allows discovery of an entry point into the p2p network.
On NAT-transversal: UPNP is the only way to go with zero configuration. Please note that it is not NAT that is the major issue, but firewall configuration. Most dedicated firewalls(not home routers), do not support UPNP due to the security concerns. They can still make outgoing connections.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nat-traversal
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page