Binston Sukhael Cardoza 0e9d339bd2
ci: use workspace inheritance to enforce lints in all crates
Starting with nightly-2023-09-10, the `[lints]` section in `Cargo.toml` files is stable. Together with workspace inheritance, this can be used to declare all lints we want to enforce in a single place.

Resolves: #4484.

Pull-Request: #4575.
2023-10-09 02:20:46 +00:00
..

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:

    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.