Skip to content

Commit

Permalink
Merge pull request #21 from jbenet/webrtc-star
Browse files Browse the repository at this point in the history
add webrtc-star multiaddr for libp2p-webrtc-star transport
  • Loading branch information
daviddias committed May 21, 2016
2 parents 638ad5e + 0c909e5 commit 369d996
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/protocols.csv
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ code size name
443 0 https
477 0 ws
444 10 onion
275 0 libp2p-webrtc-star
3 changes: 2 additions & 1 deletion src/protocols.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ Protocols.table = [
[421, Protocols.lengthPrefixedVarSize, 'ipfs'],
[480, 0, 'http'],
[443, 0, 'https'],
[477, 0, 'ws']
[477, 0, 'ws'],
[275, 0, 'libp2p-webrtc-star']
]

Protocols.names = {}
Expand Down
7 changes: 7 additions & 0 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,13 @@ describe('variants', () => {
expect(addr).to.have.property('buffer')
expect(addr.toString()).to.equal(str)
})

it('webrtc-star', () => {
const str = '/libp2p-webrtc-star/ip4/127.0.0.1/tcp/9090/ipfs/QmcgpsyWgH8Y8ajJz1Cu72KnS5uo2Aa2LpzU7kinSupNKC'
const addr = multiaddr(str)
expect(addr).to.have.property('buffer')
expect(addr.toString()).to.equal(str)
})
})

describe('helpers', () => {
Expand Down

0 comments on commit 369d996

Please sign in to comment.