[−][src]Struct crust::Config
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. This port is used to broadcast messages to.
service_discovery_listener_port: Option<u16>
You can configure service discovery server to listen on a separate port. This becomes
useful when you want to run multiple instances of Crust on the same machine.
By default it will use the same as service_discovery_port
value.
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 Eq for Config
[src]
impl PartialEq<Config> for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Config
[src]
impl Debug for Config
[src]
impl Serialize for Config
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Config
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> DebugAny for T where
T: Any + Debug,
T: Any + Debug,
impl<T> CloneAny for T where
T: Clone + Any,
T: Clone + Any,
fn clone_any(&self) -> Box<dyn CloneAny + 'static>
fn clone_any_send(&self) -> Box<dyn CloneAny + 'static + Send> where
T: Send,
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + 'static + Sync> where
T: Sync,
T: Sync,
fn clone_any_send_sync(&self) -> Box<dyn CloneAny + 'static + Sync + Send> where
T: Send + Sync,
T: Send + Sync,
impl<T> UnsafeAny for T where
T: Any,
T: Any,