diff --git a/crates/subspace-farmer/src/bin/subspace-farmer/commands/farm/dsn.rs b/crates/subspace-farmer/src/bin/subspace-farmer/commands/farm/dsn.rs index 6939273dd3..b314ac070b 100644 --- a/crates/subspace-farmer/src/bin/subspace-farmer/commands/farm/dsn.rs +++ b/crates/subspace-farmer/src/bin/subspace-farmer/commands/farm/dsn.rs @@ -36,7 +36,7 @@ pub(super) fn configure_dsn( bootstrap_nodes, piece_cache_size, provided_keys_limit, - disable_private_ips, + enable_private_ips, reserved_peers, in_connections, out_connections, @@ -145,7 +145,7 @@ pub(super) fn configure_dsn( let config = Config { reserved_peers, listen_on, - allow_non_global_addresses_in_dht: !disable_private_ips, + allow_non_global_addresses_in_dht: enable_private_ips, networking_parameters_registry: Some(networking_parameters_registry), request_response_protocols: vec![ PieceByHashRequestHandler::create( diff --git a/crates/subspace-farmer/src/bin/subspace-farmer/main.rs b/crates/subspace-farmer/src/bin/subspace-farmer/main.rs index 9673bfeeb3..5bc836ce1a 100644 --- a/crates/subspace-farmer/src/bin/subspace-farmer/main.rs +++ b/crates/subspace-farmer/src/bin/subspace-farmer/main.rs @@ -84,7 +84,7 @@ struct DsnArgs { provided_keys_limit: NonZeroUsize, /// Determines whether we allow keeping non-global (private, shared, loopback..) addresses in Kademlia DHT. #[arg(long, default_value_t = false)] - disable_private_ips: bool, + enable_private_ips: bool, /// Multiaddrs of reserved nodes to maintain a connection to, multiple are supported #[arg(long)] reserved_peers: Vec, diff --git a/crates/subspace-networking/src/bin/subspace-bootstrap-node/main.rs b/crates/subspace-networking/src/bin/subspace-bootstrap-node/main.rs index 956a9259d7..83a0cf8906 100644 --- a/crates/subspace-networking/src/bin/subspace-bootstrap-node/main.rs +++ b/crates/subspace-networking/src/bin/subspace-bootstrap-node/main.rs @@ -52,7 +52,7 @@ enum Command { pending_out_peers: u32, /// Determines whether we allow keeping non-global (private, shared, loopback..) addresses in Kademlia DHT. #[arg(long, default_value_t = false)] - disable_private_ips: bool, + enable_private_ips: bool, /// Defines path for the provider record storage DB (optional). #[arg(long, value_hint = ValueHint::FilePath)] db_path: Option, @@ -122,7 +122,7 @@ async fn main() -> anyhow::Result<()> { out_peers, pending_in_peers, pending_out_peers, - disable_private_ips, + enable_private_ips, db_path, piece_providers_cache_size, protocol_version, @@ -168,7 +168,7 @@ async fn main() -> anyhow::Result<()> { let config = Config { networking_parameters_registry, listen_on, - allow_non_global_addresses_in_dht: !disable_private_ips, + allow_non_global_addresses_in_dht: enable_private_ips, reserved_peers, max_established_incoming_connections: in_peers, max_established_outgoing_connections: out_peers, diff --git a/crates/subspace-node/src/bin/subspace-node.rs b/crates/subspace-node/src/bin/subspace-node.rs index 0695ed7976..00e9fa6420 100644 --- a/crates/subspace-node/src/bin/subspace-node.rs +++ b/crates/subspace-node/src/bin/subspace-node.rs @@ -405,7 +405,7 @@ fn main() -> Result<(), Error> { listen_on: cli.dsn_listen_on, bootstrap_nodes: dsn_bootstrap_nodes, reserved_peers: cli.dsn_reserved_peers, - allow_non_global_addresses_in_dht: !cli.dsn_disable_private_ips, + allow_non_global_addresses_in_dht: cli.dsn_enable_private_ips, max_in_connections: cli.dsn_in_connections, max_out_connections: cli.dsn_out_connections, max_pending_in_connections: cli.dsn_pending_in_connections, diff --git a/crates/subspace-node/src/lib.rs b/crates/subspace-node/src/lib.rs index 8337dff49d..22e5b28dbb 100644 --- a/crates/subspace-node/src/lib.rs +++ b/crates/subspace-node/src/lib.rs @@ -216,7 +216,7 @@ pub struct Cli { /// Determines whether we allow keeping non-global (private, shared, loopback..) addresses /// in Kademlia DHT for the DSN. #[arg(long, default_value_t = false)] - pub dsn_disable_private_ips: bool, + pub dsn_enable_private_ips: bool, /// Enables DSN-sync on startup. #[arg(long, default_value_t = true, action = clap::ArgAction::Set)]