Struct crust::Config
[−]
[src]
pub struct Config { pub hard_coded_contacts: Vec<SocketAddr>, pub tcp_acceptor_port: Option<u16>, pub force_acceptor_port_in_ext_ep: bool, pub service_discovery_port: Option<u16>, pub bootstrap_cache_name: Option<String>, pub whitelisted_node_ips: Option<HashSet<IpAddr>>, pub whitelisted_client_ips: Option<HashSet<IpAddr>>, pub network_name: Option<String>, pub dev: Option<DevConfig>, }
Crust configuration settings
Fields
hard_coded_contacts: Vec<SocketAddr>
Direct contacts one should connect to
tcp_acceptor_port: Option<u16>
Port for TCP acceptor
force_acceptor_port_in_ext_ep: bool
Force usage of tcp_acceptor_port
as our router mapped port. Normally if there is a port
forwarding, crust will find out what the external world sees our local tcp acceptor
endpoint as and include this information in our connection info that we share with others.
However there are routers/firewalls in the wild which behave differently when a port is
forwarded. They allow inbound connection through the forwarded port, but all outbound
connections through the forwarded port get remapped to some ephemeral port. This prevents
crust from knowing what the world sees our tcp_acceptor_port
as because outbound
connections get remapped although the port had been forwarded. In such scenarios, the user
can specify this value as true, which will force crust to add the above tcp_acceptor_port
to one of our externally reachable endpoint.
service_discovery_port: Option<u16>
Port for service discovery on local network
bootstrap_cache_name: Option<String>
File for bootstrap cache
whitelisted_node_ips: Option<HashSet<IpAddr>>
Whitelisted nodes who are allowed to bootstrap off us or to connect to us
whitelisted_client_ips: Option<HashSet<IpAddr>>
Whitelisted clients who are allowed to bootstrap off us
network_name: Option<String>
Network ID
This is a mechanism to prevent nodes from different decentralized networks to connect to each other (issue #209)
dev: Option<DevConfig>
Optional developer configuration
Trait Implementations
impl PartialEq for Config
[src]
fn eq(&self, __arg_0: &Config) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Config) -> bool
[src]
This method tests for !=
.
impl Eq for Config
[src]
impl Debug for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more