mirror of
https://github.com/fluencelabs/js-mafmt
synced 2025-04-24 18:52:23 +00:00
feat: add dnsnaddr p2p
This commit is contained in:
parent
79b1b53f3d
commit
95d5178a2a
@ -7,9 +7,10 @@ const multiaddr = require('multiaddr')
|
||||
*/
|
||||
const DNS4 = base('dns4')
|
||||
const DNS6 = base('dns6')
|
||||
const DNSADDR = base('dnsaddr')
|
||||
const DNS = or(
|
||||
base('dns'),
|
||||
base('dnsaddr'),
|
||||
DNSADDR,
|
||||
DNS4,
|
||||
DNS6
|
||||
)
|
||||
@ -71,7 +72,8 @@ const Reliable = or(
|
||||
WebRTCStar,
|
||||
WebRTCDirect,
|
||||
TCP,
|
||||
UTP
|
||||
UTP,
|
||||
DNSADDR
|
||||
)
|
||||
|
||||
// Unlike ws-star, stardust can run over any transport thus removing the requirement for websockets (but don't even think about running a stardust server over webrtc-star ;) )
|
||||
@ -113,6 +115,7 @@ const P2P = or(
|
||||
exports.DNS = DNS
|
||||
exports.DNS4 = DNS4
|
||||
exports.DNS6 = DNS6
|
||||
exports.DNSADDR = DNSADDR
|
||||
exports.IP = IP
|
||||
exports.TCP = TCP
|
||||
exports.UDP = UDP
|
||||
|
@ -171,7 +171,8 @@ describe('multiaddr validation', function () {
|
||||
'/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4',
|
||||
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4',
|
||||
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4/p2p-circuit',
|
||||
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4/p2p-circuit/p2p/QmUjNmr8TgJCn1Ao7DvMy4cjoZU15b9bwSCBLE3vwXiwgj'
|
||||
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4/p2p-circuit/p2p/QmUjNmr8TgJCn1Ao7DvMy4cjoZU15b9bwSCBLE3vwXiwgj',
|
||||
'/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN'
|
||||
].concat(goodCircuit)
|
||||
|
||||
function assertMatches (p) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user