Skip to content

Commit 77d7cb8

Browse files
authoredNov 12, 2021
fix: private ip ts compile has no call signatures (#1020)
1 parent a335fda commit 77d7cb8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/nat-manager.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const log = Object.assign(debug('libp2p:nat'), {
1010
})
1111
const { isBrowser } = require('wherearewe')
1212
const retry = require('p-retry')
13-
// @ts-ignore private-api does not export types
1413
const isPrivateIp = require('private-ip')
1514
const pkg = require('../package.json')
1615
const errcode = require('err-code')
@@ -115,6 +114,7 @@ class NatManager {
115114
const client = this._getClient()
116115
const publicIp = this._externalIp || await client.externalIp()
117116

117+
// @ts-ignore isPrivate has no call signatures
118118
if (isPrivateIp(publicIp)) {
119119
throw new Error(`${publicIp} is private - please set config.nat.externalIp to an externally routable IP or ensure you are not behind a double NAT`)
120120
}

0 commit comments

Comments
 (0)
Please sign in to comment.