Skip to content
This repository was archived by the owner on Jul 21, 2023. It is now read-only.

Commit 5a567e3

Browse files
deps: bump private-ip from 2.3.4 to 3.0.0 (#400)
* deps: bump private-ip from 2.3.4 to 3.0.0 Bumps [private-ip](https://github.com/frenchbread/private-ip) from 2.3.4 to 3.0.0. - [Release notes](https://github.com/frenchbread/private-ip/releases) - [Commits](frenchbread/private-ip@2.3.4...3.0.0) --- updated-dependencies: - dependency-name: private-ip dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * chore: fix linting Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: achingbrain <[email protected]>
1 parent 6d4f965 commit 5a567e3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@
181181
"multiformats": "^10.0.0",
182182
"p-defer": "^4.0.0",
183183
"p-queue": "^7.2.0",
184-
"private-ip": "^2.3.3",
184+
"private-ip": "^3.0.0",
185185
"protons-runtime": "^4.0.1",
186186
"timeout-abort-controller": "^3.0.0",
187187
"uint8arraylist": "^2.0.0",

src/utils.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ export function removePrivateAddresses (peer: PeerInfo): PeerInfo {
2727
return false
2828
}
2929

30-
return !isPrivateIp(addr)
30+
const isPrivate = isPrivateIp(addr)
31+
32+
if (isPrivate == null) {
33+
// not an ip address
34+
return true
35+
}
36+
37+
return !isPrivate
3138
})
3239
}
3340
}

0 commit comments

Comments
 (0)