File: README.md

package info (click to toggle)
rust-libp2p-identity 0.2.10%2B20250205%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 804 kB
  • sloc: makefile: 8; sh: 1
file content (23 lines) | stat: -rw-r--r-- 597 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Description

The upnp example showcases how to use the upnp network behaviour to externally open ports on the network gateway.


## Usage

To run the example, follow these steps:

1. In a terminal window, run the following command:

   ```sh
   cargo run
   ```

2. This command will start the swarm and print the `NewExternalAddr` if the gateway supports `UPnP` or
   `GatewayNotFound` if it doesn't.


## Conclusion

The upnp example demonstrates the usage of **libp2p** to externally open a port on the gateway if it
supports [`UPnP`](https://en.wikipedia.org/wiki/Universal_Plug_and_Play).