aboutsummaryrefslogtreecommitdiffstats
path: root/src/transport/libp2p/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/transport/libp2p/config.rs')
-rw-r--r--src/transport/libp2p/config.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/transport/libp2p/config.rs b/src/transport/libp2p/config.rs
index 4db8444..6d26224 100644
--- a/src/transport/libp2p/config.rs
+++ b/src/transport/libp2p/config.rs
@@ -25,6 +25,9 @@ pub(crate) struct Libp2pConfig {
pub(crate) ignore: Vec<IpRange>,
/// Address ranges that matter most, best first (`Book::preference`).
pub(crate) prefer: Vec<IpRange>,
+ /// Hosts on the internet (names or addresses) whose routes tell whether there is
+ /// one to the internet at all (`Routes::internet`).
+ pub(crate) internet_hosts: Vec<String>,
/// Use public infrastructure: the IPFS DHT, public relays.
pub(crate) public: bool,
/// libp2p's in-memory transport instead of TCP and QUIC: for tests.
@@ -126,6 +129,7 @@ impl Libp2pConfig {
upnp: settings.libp2p_upnp,
ignore: parse_ranges("libp2p-ignore", &settings.libp2p_ignore)?,
prefer: parse_ranges("libp2p-prefer", &settings.libp2p_prefer)?,
+ internet_hosts: settings.libp2p_internet_hosts.clone(),
public: settings.libp2p_public,
memory: false,
})