Skip to content

Commit de9e4f5

Browse files
committed
perf(ipfs): optimize network settings and enable WebRTC
1 parent 582c2b7 commit de9e4f5

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const cfg: ServerI = {
4646
host: argv.host ?? process.env.HOST ?? '0.0.0.0',
4747
domain: argv.domain ?? process.env.DOMAIN ?? 'localhost',
4848
storage: argv.data ?? paths.data,
49-
useWebRTC: false
49+
useWebRTC: argv.useWebRTC ?? (process.env.USE_WEBRTC?.toLowerCase() === 'false' ? false : process.env.CI !== 'true')
5050
}
5151

5252
const server = await apiBuilder({

protocols/ipfs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ export class IPFSProtocol implements Protocol<Static<typeof IPFSProtocolFields>>
202202
},
203203
peerInfoMapper: removePrivateAddressesMapper,
204204
reprovide: {
205-
concurrency: 20,
205+
concurrency: 10,
206206
interval: 60 * 60 * 1000,
207-
threshold: 24 * 60 * 60 * 1000
207+
threshold: 12 * 60 * 60 * 1000
208208
}
209209
}),
210210
identify: identify(),

0 commit comments

Comments
 (0)