Skip to content

Commit

Permalink
host: disable black hole detection on autonat dialer (#2529)
Browse files Browse the repository at this point in the history
  • Loading branch information
sukunrt committed Aug 28, 2023
1 parent 3441712 commit b438d18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,11 @@ func (cfg *Config) NewNode() (host.Host, error) {
PeerKey: autonatPrivKey,
Peerstore: ps,
DialRanker: swarm.NoDelayDialRanker,
SwarmOpts: []swarm.Option{
// It is better to disable black hole detection and just attempt a dial for autonat
swarm.WithUDPBlackHoleConfig(false, 0, 0),
swarm.WithIPv6BlackHoleConfig(false, 0, 0),
},
}

dialer, err := autoNatCfg.makeSwarm(eventbus.NewBus(), false)
Expand Down

0 comments on commit b438d18

Please sign in to comment.