mirror of
https://github.com/fluencelabs/js-mafmt
synced 2025-04-25 12:52:36 +00:00
include ipfs for webrtcstar validation
This commit is contained in:
parent
4ed44eb35a
commit
2ae350af5a
@ -7,7 +7,7 @@ var TCP = and(IP, base('tcp'))
|
||||
var UDP = and(IP, base('udp'))
|
||||
var UTP = and(UDP, base('utp'))
|
||||
var WebSockets = and(TCP, base('ws'))
|
||||
var WebRTCStar = and(base('libp2p-webrtc-star'), WebSockets)
|
||||
var WebRTCStar = and(base('libp2p-webrtc-star'), WebSockets, base('ipfs'))
|
||||
var Reliable = or(TCP, UTP)
|
||||
var IPFS = and(Reliable, base('ipfs'))
|
||||
|
||||
@ -38,7 +38,6 @@ function and () {
|
||||
if (a.length < args.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
args.some(function (arg) {
|
||||
a = arg.partialMatch(a)
|
||||
if (a === null) {
|
||||
|
@ -52,8 +52,8 @@ describe('multiaddr validation', function () {
|
||||
]
|
||||
|
||||
var goodWebRTCStar = [
|
||||
'/libp2p-webrtc-star/ip4/1.2.3.4/tcp/3456/ws',
|
||||
'/libp2p-webrtc-star/ip6/::/tcp/0/ws'
|
||||
'/libp2p-webrtc-star/ip4/1.2.3.4/tcp/3456/ws/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo4',
|
||||
'/libp2p-webrtc-star/ip6/::/tcp/0/ws/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSoooo5'
|
||||
]
|
||||
|
||||
var badWS = [
|
||||
|
Loading…
x
Reference in New Issue
Block a user