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

Commit

Permalink
deps: bump private-ip from 2.3.4 to 3.0.0 (#400)
Browse files Browse the repository at this point in the history
* 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] <support@github.com>

* chore: fix linting

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <alex@achingbrain.net>
  • Loading branch information
dependabot[bot] and achingbrain committed Dec 7, 2022
1 parent 6d4f965 commit 5a567e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
"multiformats": "^10.0.0",
"p-defer": "^4.0.0",
"p-queue": "^7.2.0",
"private-ip": "^2.3.3",
"private-ip": "^3.0.0",
"protons-runtime": "^4.0.1",
"timeout-abort-controller": "^3.0.0",
"uint8arraylist": "^2.0.0",
Expand Down
9 changes: 8 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ export function removePrivateAddresses (peer: PeerInfo): PeerInfo {
return false
}

return !isPrivateIp(addr)
const isPrivate = isPrivateIp(addr)

if (isPrivate == null) {
// not an ip address
return true
}

return !isPrivate
})
}
}
Expand Down

0 comments on commit 5a567e3

Please sign in to comment.