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 | 9fa1c4601f3c62555903e549e976915169602b26 (patch) | |
| tree | c005ac09f07f2959f69bae56f9343f9d8ffde6b5 /src/transport/libp2p/mod.rs | |
| parent | a08c430100edfba7b924c957f98294fd79de0e1b (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() }; |
