From 3118442a21999760ca8380cfc793bc080bcca893 Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Sun, 2 Apr 2017 15:54:08 -0700 Subject: [PATCH] feat: skip p2p-circuit addresses --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 3e8e91d..5ef6438 100644 --- a/src/index.js +++ b/src/index.js @@ -68,7 +68,9 @@ class TCP { multiaddrs = [multiaddrs] } return multiaddrs.filter((ma) => { - if (includes(ma.protoNames(), 'ipfs')) { + if (includes(ma.protoNames(), 'p2p-circuit')) { + return false + } else if (includes(ma.protoNames(), 'ipfs')) { ma = ma.decapsulate('ipfs') } return mafmt.TCP.matches(ma)