mirror of
https://github.com/fluencelabs/js-mafmt
synced 2025-04-25 13:42:20 +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 DNS4 = base('dns4')
|
||||||
const DNS6 = base('dns6')
|
const DNS6 = base('dns6')
|
||||||
|
const DNSADDR = base('dnsaddr')
|
||||||
const DNS = or(
|
const DNS = or(
|
||||||
base('dns'),
|
base('dns'),
|
||||||
base('dnsaddr'),
|
DNSADDR,
|
||||||
DNS4,
|
DNS4,
|
||||||
DNS6
|
DNS6
|
||||||
)
|
)
|
||||||
@ -71,7 +72,8 @@ const Reliable = or(
|
|||||||
WebRTCStar,
|
WebRTCStar,
|
||||||
WebRTCDirect,
|
WebRTCDirect,
|
||||||
TCP,
|
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 ;) )
|
// 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.DNS = DNS
|
||||||
exports.DNS4 = DNS4
|
exports.DNS4 = DNS4
|
||||||
exports.DNS6 = DNS6
|
exports.DNS6 = DNS6
|
||||||
|
exports.DNSADDR = DNSADDR
|
||||||
exports.IP = IP
|
exports.IP = IP
|
||||||
exports.TCP = TCP
|
exports.TCP = TCP
|
||||||
exports.UDP = UDP
|
exports.UDP = UDP
|
||||||
|
@ -171,7 +171,8 @@ describe('multiaddr validation', function () {
|
|||||||
'/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4',
|
'/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4',
|
||||||
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4',
|
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4',
|
||||||
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4/p2p-circuit',
|
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4/p2p-circuit',
|
||||||
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4/p2p-circuit/p2p/QmUjNmr8TgJCn1Ao7DvMy4cjoZU15b9bwSCBLE3vwXiwgj'
|
'/p2p/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4/p2p-circuit/p2p/QmUjNmr8TgJCn1Ao7DvMy4cjoZU15b9bwSCBLE3vwXiwgj',
|
||||||
|
'/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN'
|
||||||
].concat(goodCircuit)
|
].concat(goodCircuit)
|
||||||
|
|
||||||
function assertMatches (p) {
|
function assertMatches (p) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user