mirror of
https://github.com/fluencelabs/js-libp2p-tcp
synced 2025-07-01 21:31:52 +00:00
Compare commits
19 Commits
Author | SHA1 | Date | |
---|---|---|---|
1a550bac26 | |||
51c5594d49 | |||
d5476caee1 | |||
4b211f5cd6 | |||
433188f182 | |||
f3de45d198 | |||
2afaed5f2a | |||
308dead134 | |||
1c8603b721 | |||
c883475a4f | |||
515c6a32ec | |||
a107e1da57 | |||
2ec97b3c8c | |||
cb449a6c5c | |||
1773efecdf | |||
49e23f1961 | |||
10b35b22f6 | |||
5677e12592 | |||
9524e8670a |
28
package.json
28
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "libp2p-tcp",
|
||||
"version": "0.9.1",
|
||||
"version": "0.9.3",
|
||||
"description": "Node.js implementation of the TCP module that libp2p uses, which implements the interface-connection and interface-transport interfaces",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
@ -33,28 +33,30 @@
|
||||
"node": ">=4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"aegir": "^9.0.1",
|
||||
"interface-transport": "~0.3.3",
|
||||
"aegir": "^10.0.0",
|
||||
"chai": "^3.5.0",
|
||||
"interface-transport": "^0.3.3",
|
||||
"lodash.isfunction": "^3.0.8",
|
||||
"pre-commit": "^1.1.2",
|
||||
"pull-stream": "^3.4.5"
|
||||
"pre-commit": "^1.2.2",
|
||||
"pull-stream": "^3.5.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"interface-connection": "0.3.0",
|
||||
"ip-address": "^5.8.0",
|
||||
"lodash.contains": "^2.4.3",
|
||||
"mafmt": "^2.1.2",
|
||||
"multiaddr": "^2.0.3",
|
||||
"stream-to-pull-stream": "^1.7.0"
|
||||
"interface-connection": "~0.3.0",
|
||||
"ip-address": "^5.8.6",
|
||||
"lodash.includes": "^4.3.0",
|
||||
"lodash.isfunction": "^3.0.8",
|
||||
"mafmt": "^2.1.6",
|
||||
"multiaddr": "^2.2.1",
|
||||
"stream-to-pull-stream": "^1.7.2"
|
||||
},
|
||||
"contributors": [
|
||||
"David Dias <daviddias.p@gmail.com>",
|
||||
"Evan Schwartz <evan.mark.schwartz@gmail.com>",
|
||||
"Friedel Ziegelmayer <dignifiedquire@gmail.com>",
|
||||
"Greenkeeper <support@greenkeeper.io>",
|
||||
"João Antunes <j.goncalo.antunes@gmail.com>",
|
||||
"Prashanth Chandra <coolshanth94@gmail.com>",
|
||||
"Richard Littauer <richard.littauer@gmail.com>",
|
||||
"Stephen Whitmore <stephen.whitmore@gmail.com>",
|
||||
"greenkeeperio-bot <support@greenkeeper.io>"
|
||||
"Stephen Whitmore <stephen.whitmore@gmail.com>"
|
||||
]
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
const net = require('net')
|
||||
const toPull = require('stream-to-pull-stream')
|
||||
const mafmt = require('mafmt')
|
||||
const contains = require('lodash.contains')
|
||||
const includes = require('lodash.includes')
|
||||
const isFunction = require('lodash.isfunction')
|
||||
const Connection = require('interface-connection').Connection
|
||||
const debug = require('debug')
|
||||
@ -59,7 +59,7 @@ module.exports = class TCP {
|
||||
multiaddrs = [multiaddrs]
|
||||
}
|
||||
return multiaddrs.filter((ma) => {
|
||||
if (contains(ma.protoNames(), 'ipfs')) {
|
||||
if (includes(ma.protoNames(), 'ipfs')) {
|
||||
ma = ma.decapsulate('ipfs')
|
||||
}
|
||||
return mafmt.TCP.matches(ma)
|
||||
|
@ -3,7 +3,7 @@
|
||||
const multiaddr = require('multiaddr')
|
||||
const Connection = require('interface-connection').Connection
|
||||
const os = require('os')
|
||||
const contains = require('lodash.contains')
|
||||
const includes = require('lodash.includes')
|
||||
const net = require('net')
|
||||
const toPull = require('stream-to-pull-stream')
|
||||
const EventEmitter = require('events').EventEmitter
|
||||
@ -78,7 +78,7 @@ module.exports = (handler) => {
|
||||
|
||||
listener.listen = (ma, cb) => {
|
||||
listeningAddr = ma
|
||||
if (contains(ma.protoNames(), 'ipfs')) {
|
||||
if (includes(ma.protoNames(), 'ipfs')) {
|
||||
ipfsId = getIpfsId(ma)
|
||||
listeningAddr = ma.decapsulate('ipfs')
|
||||
}
|
||||
|
Reference in New Issue
Block a user