Skip to content

Commit

Permalink
fix: dns > ext ip
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed May 15, 2023
1 parent 9594e54 commit 30b9fac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions waku/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,6 @@ func Execute(options Options) {
nodeOpts = append(nodeOpts, node.WithAdvertiseAddresses(options.AdvertiseAddresses...))
}

if options.Dns4DomainName != "" {
nodeOpts = append(nodeOpts, node.WithDns4Domain(options.Dns4DomainName))
}

if options.ExtIP != "" {
ip := net.ParseIP(options.ExtIP)
if ip == nil {
Expand All @@ -128,6 +124,10 @@ func Execute(options Options) {
nodeOpts = append(nodeOpts, node.WithExternalIP(ip))
}

if options.Dns4DomainName != "" {
nodeOpts = append(nodeOpts, node.WithDns4Domain(options.Dns4DomainName))
}

libp2pOpts := node.DefaultLibP2POptions
if len(options.AdvertiseAddresses) == 0 {
libp2pOpts = append(libp2pOpts, libp2p.NATPortMap()) // Attempt to open ports using uPNP for NATed hosts.)
Expand Down

0 comments on commit 30b9fac

Please sign in to comment.