question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discovery Topic.

Adding a local TUN/STUN service to the stack might improve the discovery and peering experience and potentially allow us to later move the same logic to be served by Gun (which already knows the public identity of a remote peer through its sockets) directly through a plugin.

Integrating node-turn seems to be quite trivial and the service provides a valid responds to basic browser requests

Config

var Turn = require('node-turn');
const PORT = process.env.PORT || 19302;
console.log("App Port: " + PORT);
var server = new Turn({
  // set options
  authMech: 'none',
  debugLevel: 'DEBUG',
  listeningIps: ['0.0.0.0'],
  listeningPort: `${PORT}`,
  log: function(a,b){ console.log('LOG',a,b)}
});
server.start();

Response

Receiving UDP: from IPV4://xx.xx.xx.xx:33000 to IPV4://yy.yy.yy.yy:3478 binding request TransactionID: 787444776d4b30534f65784c
Sending UDP: from IPV4://yy.yy.yy.yy:3478 to IPV4://xx.xx.xx.xx:33000 binding success TransactionID: 787444776d4b30534f65784c
  xor-mapped-address: IPV4://xx.xx.xx.xx:33000

The local node can be added to the logic here

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
lmanganicommented, Apr 20, 2020

We can also run our own TURN/STUN servers (like Jabis and myself are doing) if we simply get some platform credit anywhere such as AWS etc. no need to run a specific vendor quite the opposite, we’d like to keep it as generic as possible. Using this with Twilio’s servers would be as centralized as it gets 😃

0reactions
lmanganicommented, May 8, 2020

Yes we do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is a STUN/TURN Server? - Blog - Interactive Powers
Sometimes, you can use a protocol called STUN (Session Traversal Utilities for NAT) that allows clients to discover their public IP address and ......
Read more >
What is WebRTC and How to Setup STUN/TURN Server for ...
TURN Server allows clients to send and receive data through an intermediary server. The TURN protocol is the extension to STUN.
Read more >
eturnal STUN/TURN Server
eturnal is a clean, scalable STUN and TURN server for Unix-like operating systems and Microsoft Windows. Clients can connect using UDP, TCP, ...
Read more >
WebRTC Signaling Servers – STUN vs TURN
STUN and TURN are two types of WebRTC signaling servers that can be used to create a real-time, peer-to-peer connection.
Read more >
Stun-turn - Global Network Traversal Service - Twilio
Low‑latency, cost‑effective, reliable STUN and TURN capabilities for WebRTC, distributed across five continents. ... Device behind NAT asks the Twilio STUN server ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found