Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions examples/js-libp2p-example-auto-tls/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,35 @@ automatically configure port forwarding for IPv4 and IPv6 networks:
identify: identify(),
```

#### Dealing with unreliable routers

By default `@libp2p/upnp-nat` will use [SSDP](https://en.wikipedia.org/wiki/Simple_Service_Discovery_Protocol)
to locate your router on the network in order to use it to map ports and
discover it's externally routable address.

Some ISP-provided routers are underpowered and require rebooting before they
will respond to `SSDP` search messages.

If you know the URL to the device descriptor of your [Internet Gateway Device](https://openconnectivity.org/developer/specifications/upnp-resources/upnp/internet-gateway-device-igd-v-2-0/)
you can specify it manually and skip the search:

```diff
services: {
autoTLS: autoTLS(),
+ upnp: uPnPNAT({
+ gateways: [
+ // manually specify URLs for device descriptor documents
+ // these can be IPv4 and/or IPv6 (if supported by your network)
+ 'http://192.168.1.1:8080/path/to/descriptor.xml'
+ 'http://[xx:xx:xx:xx]:8080/path/to/descriptor.xml'
+ ]
+ }),
identify: identify(),
```

Note that UPnP will still need to be enabled to map external ports (IPv4) and/or
to open pinholes in the firewall if necessary (IPv6).

### Confirming dialable addresses

Designing distributed systems typically involves trying to trust other system
Expand Down