mirror of
https://github.com/Permissionless-Software-Foundation/x402-base-facilitator.git
synced 2026-09-21 16:52:01 -07:00
Adding config options for V2 Circuit Relay server
This commit is contained in:
@@ -117,7 +117,19 @@ class IpfsAdapter {
|
|||||||
}
|
}
|
||||||
if (this.config.isCircuitRelay) {
|
if (this.config.isCircuitRelay) {
|
||||||
console.log('Helia (IPFS) node IS configured as Circuit Relay')
|
console.log('Helia (IPFS) node IS configured as Circuit Relay')
|
||||||
services.relay = circuitRelayServer()
|
services.relay = circuitRelayServer({ // makes the node function as a relay server
|
||||||
|
hopTimeout: 30 * 1000, // incoming relay requests must be resolved within this time limit
|
||||||
|
advertise: true,
|
||||||
|
reservations: {
|
||||||
|
maxReservations: 15, // how many peers are allowed to reserve relay slots on this server
|
||||||
|
reservationClearInterval: 300 * 1000, // how often to reclaim stale reservations
|
||||||
|
applyDefaultLimit: true, // whether to apply default data/duration limits to each relayed connection
|
||||||
|
defaultDurationLimit: 2 * 60 * 1000, // the default maximum amount of time a relayed connection can be open for
|
||||||
|
defaultDataLimit: BigInt(2 << 7), // the default maximum number of bytes that can be transferred over a relayed connection
|
||||||
|
maxInboundHopStreams: 32, // how many inbound HOP streams are allow simultaneously
|
||||||
|
maxOutboundHopStreams: 64, // how many outbound HOP streams are allow simultaneously
|
||||||
|
}
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
console.log('Helia (IPFS) node IS NOT configured as Circuit Relay')
|
console.log('Helia (IPFS) node IS NOT configured as Circuit Relay')
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user