enhancementhelp wanted
Metriche repository
- Star
- (462 stelle)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
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