Skip to content

Commit

Permalink
feat: Swarm.EnableHolePunching by default
Browse files Browse the repository at this point in the history
This flips the implicit default for feature introduced in 0.11
(#8562)

Ref.
https://github.com/ipfs/go-ipfs/blob/master/docs/config.md#swarmenableholepunching
  • Loading branch information
lidel committed Feb 22, 2022
1 parent 3ea5631 commit 67b05b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/node/libp2p/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func AutoRelay(addDefaultRelays bool) func() (opts Libp2pOpts, err error) {

func HolePunching(flag config.Flag, hasRelayClient bool) func() (opts Libp2pOpts, err error) {
return func() (opts Libp2pOpts, err error) {
if flag.WithDefault(false) {
if flag.WithDefault(true) {
if !hasRelayClient {
log.Fatal("To enable `Swarm.EnableHolePunching` requires `Swarm.RelayClient.Enabled` to be enabled.")
}
Expand Down
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,7 @@ to [upgrade to a direct connection](https://github.com/libp2p/specs/blob/master/
through a NAT/firewall whenever possible.
This feature requires `Swarm.RelayClient.Enabled` to be set to `true`.

Default: `false`
Default: `true`

Type: `flag`

Expand Down

0 comments on commit 67b05b8

Please sign in to comment.