free-udp-port Usage const findUdpPort = require('find-free-udp-port'); findUdpPort({ // default values start: 2048, // 1024 end: 2248, // 65535 host: '127.0.0.1', // localhost type: 'udp4' // udp4}).then(({type, port, host}) => { console.log(port, host, type);});