File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -331,11 +331,9 @@ export class OceanP2P extends EventEmitter {
331331 `/ip6/${ config . p2pConfig . ipV6BindAddress } /tcp/${ config . p2pConfig . ipV6BindWsPort } /ws`
332332 )
333333 }
334- // Include /p2p-circuit in listen addresses so that circuitRelayTransport
335- // discovers relay servers and makes reservations. Without this, the
336- // transport never calls reserveRelay() and browser clients can't reach
337- // this node via circuit relay.
338- const listenAddrs = [ ...bindInterfaces , '/p2p-circuit' ]
334+ const listenAddrs = config . p2pConfig . enableCircuitRelayClient
335+ ? [ ...bindInterfaces , '/p2p-circuit' ]
336+ : bindInterfaces
339337 let addresses = { }
340338 if (
341339 config . p2pConfig . announceAddresses &&
@@ -400,7 +398,14 @@ export class OceanP2P extends EventEmitter {
400398 // eslint-disable-next-line no-constant-condition, no-self-compare
401399 if ( config . p2pConfig . enableCircuitRelayServer ) {
402400 P2P_LOGGER . info ( 'Enabling Circuit Relay Server' )
403- servicesConfig = { ...servicesConfig , ...{ circuitRelay : circuitRelayServer ( ) } }
401+ servicesConfig = {
402+ ...servicesConfig ,
403+ ...{
404+ circuitRelay : circuitRelayServer ( {
405+ reservations : { maxReservations : 2 }
406+ } )
407+ }
408+ }
404409 }
405410 // eslint-disable-next-line no-constant-condition, no-self-compare
406411 if ( config . p2pConfig . upnp ) {
You can’t perform that action at this time.
0 commit comments