From 9fa1c4601f3c62555903e549e976915169602b26 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 31 Oct 2026 20:53:22 +0100 Subject: libp2p: add prefer option --- src/transport/libp2p/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/transport/libp2p/mod.rs') 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() }; -- cgit v1.3.1