Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Commit

Permalink
feat: add support for dialing over dns
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Jacob Heun <jacobheun@gmail.com>
  • Loading branch information
jacobheun committed Sep 12, 2018
1 parent a0c23e4 commit eba0b48
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"dirty-chai": "^2.0.1",
"interface-transport": "~0.3.6",
"lodash.isfunction": "^3.0.9",
"pull-stream": "^3.6.7"
"pull-stream": "^3.6.9"
},
"dependencies": {
"class-is": "^1.1.0",
Expand All @@ -48,8 +48,8 @@
"ip-address": "^5.8.9",
"lodash.includes": "^4.3.0",
"lodash.isfunction": "^3.0.9",
"mafmt": "^6.0.0",
"multiaddr": "^4.0.0",
"mafmt": "^6.0.2",
"multiaddr": "^5.0.0",
"once": "^1.4.0",
"stream-to-pull-stream": "^1.7.2"
},
Expand Down
3 changes: 2 additions & 1 deletion test/compliance.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ describe('interface-transport compliance', () => {
const addrs = [
multiaddr('/ip4/127.0.0.1/tcp/9091'),
multiaddr('/ip4/127.0.0.1/tcp/9092'),
multiaddr('/ip4/127.0.0.1/tcp/9093')
multiaddr('/ip4/127.0.0.1/tcp/9093'),
multiaddr('/dns4/ipfs.io')
]
cb(null, tcp, addrs)
},
Expand Down
6 changes: 4 additions & 2 deletions test/filter.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ describe('filter addrs', () => {
const ma4 = multiaddr(base + '/tcp/9090/ipfs/Qmb6owHp6eaWArVbcJJbQSyifyJBttMMjYV76N2hMbf5Vw')
const ma5 = multiaddr(base + '/tcp/9090/http' + ipfs)
const ma6 = multiaddr('/ip4/127.0.0.1/tcp/9090/p2p-circuit' + ipfs)
const ma7 = multiaddr('/dns4/libp2p.io/tcp/9090')
const ma8 = multiaddr('/dnsaddr/libp2p.io/tcp/9090')

const valid = tcp.filter([ma1, ma2, ma3, ma4, ma5, ma6])
expect(valid.length).to.equal(2)
const valid = tcp.filter([ma1, ma2, ma3, ma4, ma5, ma6, ma7, ma8])
expect(valid.length).to.equal(4)
expect(valid[0]).to.deep.equal(ma1)
expect(valid[1]).to.deep.equal(ma4)
})
Expand Down

0 comments on commit eba0b48

Please sign in to comment.