enable autonat service

This commit is contained in:
Jeromy 2020-04-22 15:28:01 -07:00
parent 9c704db12b
commit 18f4e9d828
2 changed files with 4 additions and 0 deletions

View File

@ -82,6 +82,7 @@ var (
BaseRoutingKey = special{7} // fx groups + multiret
NatPortMapKey = special{8} // Libp2p option
ConnectionManagerKey = special{9} // Libp2p option
AutoNATSvcKey = special{9} // Libp2p option
)
type invoke int
@ -175,6 +176,7 @@ func libp2p() Option {
Override(NatPortMapKey, lp2p.NatPortMap),
Override(ConnectionManagerKey, lp2p.ConnectionManager(50, 200, 20*time.Second, nil)),
Override(AutoNATSvcKey, lp2p.AutoNATService),
Override(new(*pubsub.PubSub), lp2p.GossipSub()),

View File

@ -35,4 +35,6 @@ func AutoNATService(quic bool) func(repo repo.Repo, mctx helpers.MetricsCtx, lc
}
*/
var AutoNATService = simpleOpt(libp2p.EnableNATService())
var NatPortMap = simpleOpt(libp2p.NATPortMap())