Skip to content

Instantly share code, notes, and snippets.

@dagingaa
Created December 10, 2018 10:14
Show Gist options
  • Save dagingaa/c590c73410e53f97cf219e5781ae1c9b to your computer and use it in GitHub Desktop.
Save dagingaa/c590c73410e53f97cf219e5781ae1c9b to your computer and use it in GitHub Desktop.
const dgram = require('dgram');
// STUN binding request
const bind = Buffer.from('000300002112a4425f73a4b270529f877091d580', 'hex');
const socket = dgram.createSocket('udp4');
socket.on('message', (data) => {
console.log('STUN BINDING RESPONSE', data.toString());
});
socket.send(bind, 443, 'turn-static.confrere.com');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment