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

Direct contacts one should connect to

Port for TCP acceptor

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.

Port for service discovery on local network

File for bootstrap cache

Whitelisted nodes who are allowed to bootstrap off us or to connect to us

Whitelisted clients who are allowed to bootstrap off us

Network ID

This is a mechanism to prevent nodes from different decentralized networks to connect to each other (issue #209)

Optional developer configuration

Trait Implementations

impl PartialEq for Config
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Config
[src]

impl Debug for Config
[src]

[src]

Formats the value using the given formatter.

impl Clone for Config
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Default for Config
[src]

[src]

Returns the "default value" for a type. Read more