diff options
| author | tv <tv@krebsco.de> | 2026-10-31 20:53:22 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-31 20:53:22 +0100 |
| commit | 5b327e77e8cdeb82aa3d0840467b1d63b1510875 (patch) | |
| tree | e3d862560278bba489d41ed0d78ff5785614a949 /src/transport/libp2p/mod.rs | |
| parent | 23a43e60d2a0da0f2f7c9b2c34472ef2911eec0e (diff) | |
libp2p: add prefer option
Diffstat (limited to 'src/transport/libp2p/mod.rs')
| -rw-r--r-- | src/transport/libp2p/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/transport/libp2p/mod.rs b/src/transport/libp2p/mod.rs index f1006e3..0e15a09 100644 --- a/src/transport/libp2p/mod.rs +++ b/src/transport/libp2p/mod.rs @@ -45,7 +45,8 @@ //! //! With `--libp2p-ignore`, address ranges are left out (VPNs): not published, not told //! peers by identify (`Identifying`), not offered for hole punching, not dialled, and -//! connections there refused (`Ignoring`). +//! connections there refused (`Ignoring`). With `--libp2p-prefer`, addresses in the +//! ranges named come first, where only so many are kept (`Book::preference`). //! //! With `--libp2p-upnp`, a node asks its router to forward its listen ports (UPnP), and //! publishes the router's public address for them with its own (`Book::direct`): then @@ -239,6 +240,7 @@ impl Libp2pTransport { let mut book = Book { announced: config.announce, ignored: config.ignore.clone(), + preferred: config.prefer.clone(), serving: config.relay, ..Book::default() }; |
