diff --git a/examples/fetch-file-from-kubo/package.json b/examples/fetch-file-from-kubo/package.json index 81c9b39f55..143eeb2ea6 100644 --- a/examples/fetch-file-from-kubo/package.json +++ b/examples/fetch-file-from-kubo/package.json @@ -10,12 +10,12 @@ "test": "npm run build && test-browser-example tests" }, "dependencies": { - "@chainsafe/libp2p-noise": "^11.0.0", + "@chainsafe/libp2p-noise": "^12.0.1", "@libp2p/webtransport": "../..", "@multiformats/multiaddr": "^12.1.2", "blockstore-core": "^4.1.0", - "ipfs-bitswap": "^17.0.2", - "libp2p": "^0.44.0", + "ipfs-bitswap": "^18.0.1", + "libp2p": "^0.45.9", "multiformats": "^11.0.2" }, "devDependencies": { diff --git a/examples/fetch-file-from-kubo/src/libp2p.ts b/examples/fetch-file-from-kubo/src/libp2p.ts index 270e4318ab..3d97d38243 100644 --- a/examples/fetch-file-from-kubo/src/libp2p.ts +++ b/examples/fetch-file-from-kubo/src/libp2p.ts @@ -11,7 +11,11 @@ export async function setup (): Promise<{ libp2p: Libp2p, bitswap: Bitswap }> { const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + // this is only necessary when dialing local addresses + connectionGater: { + denyDialMultiaddr: async () => false + } }) await node.start() diff --git a/package.json b/package.json index c8e81a0b92..e6af5e917e 100644 --- a/package.json +++ b/package.json @@ -155,7 +155,7 @@ "docs": "aegir docs" }, "dependencies": { - "@chainsafe/libp2p-noise": "^11.0.0", + "@chainsafe/libp2p-noise": "^12.0.1", "@libp2p/interface-connection": "^5.0.0", "@libp2p/interface-peer-id": "^2.0.0", "@libp2p/interface-stream-muxer": "^4.0.0", @@ -169,7 +169,7 @@ }, "devDependencies": { "aegir": "^39.0.3", - "libp2p": "^0.44.0", + "libp2p": "^0.45.9", "p-defer": "^4.0.0" }, "browser": { diff --git a/test/browser.ts b/test/browser.ts index dc4101ae3f..153743e62b 100644 --- a/test/browser.ts +++ b/test/browser.ts @@ -23,7 +23,10 @@ describe('libp2p-webtransport', () => { const ma = multiaddr(maStr) const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + connectionGater: { + denyDialMultiaddr: async () => false + } }) await node.start() @@ -85,7 +88,10 @@ describe('libp2p-webtransport', () => { const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + connectionGater: { + denyDialMultiaddr: async () => false + } }) await node.start() @@ -103,7 +109,10 @@ describe('libp2p-webtransport', () => { const ma = multiaddr(process.env.serverAddr6) const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + connectionGater: { + denyDialMultiaddr: async () => false + } }) await node.start() @@ -125,7 +134,10 @@ describe('libp2p-webtransport', () => { const ma = multiaddr(maStr) const node = await createLibp2p({ transports: [webTransport()], - connectionEncryption: [noise()] + connectionEncryption: [noise()], + connectionGater: { + denyDialMultiaddr: async () => false + } }) async function * gen (): AsyncGenerator {