OptionalautoOptionalexternalBy default we query discovered/configured gateways for their external address. To specify it manually instead, pass a value here.
Typically this would be an IPv4 address that the router performs NAT with.
OptionalexternalCheck if the external address has changed this often in ms. Ignored if an external address is specified.
OptionalexternalDo not take longer than this to check if the external address has changed in ms. Ignored if an external address is specified.
OptionalgatewaysBy default we search for local gateways using SSDP M-SEARCH messages. To manually specify a gateway instead, pass values here.
A lot of ISP-provided gateway/routers are under powered so may need rebooting before they will respond to M-SEARCH messages.
Each value is an IPv4 or IPv6 URL of the UPnP device descriptor document,
e.g. http://192.168.1.1:8080/description.xml. Please see the
documentation of your gateway to discover the URL.
Note that some gateways will randomize the port/path the descriptor document is served from and even change it over time so you may be forced to use an SSDP search instead.
OptionalgatewayHow often to search for network gateways in ms.
This interval is used after a gateway has been found on the network.
OptionalgatewayHow often to send the M-SEARCH SSDP message during a gateway search in
ms.
Some routers are flaky and may not respond to every query so decreasing this will increase the number of search messages sent before the timeout.
This interval is used after a gateway has been found on the network.
OptionalgatewayHow long to search for gateways for before giving up in ms.
This timeout is used after a gateway has been found on the network.
OptionalinitialHow often to search for network gateways in ms.
This interval is used before a gateway has been found on the network, after
that it switches to gatewaySearchInterval which lowers the frequency of
the search.
OptionalinitialHow often to send the M-SEARCH SSDP message during a gateway search in
ms.
Some routers are flaky and may not respond to every query so decreasing this will increase the number of search messages sent before the timeout.
This interval is used before a gateway has been found on the network, after
that it switches to gatewaySearchMessageInterval which lowers the
frequency of search messages sent.
OptionalinitialHow long to search for gateways for before giving up in ms.
This timeout is used before a gateway has been found on the network, after
that it switches to gatewaySearchTimeout which increases the timeout to
give gateways more time to respond.
OptionalportWhether to automatically refresh UPnP port mappings when their TTL is reached
OptionalportA pre-configured instance of a NatAPI client can be passed as an option, otherwise one will be created
OptionalportA string value to use for the port mapping description on the gateway
OptionalportHow long before a port mapping expires to refresh it in ms
OptionalportHow long UPnP port mappings should last for in ms
Any mapped addresses are added to the observed address list. These addresses require additional verification by the
@libp2p/autonatprotocol or similar before they are trusted.To skip this verification and trust them immediately pass
truehere