pub struct DialOut {
pub url: String,
pub key: PathBuf,
pub agent: String,
pub mount: Option<String>,
pub trust: Option<String>,
pub backoff: Backoff,
pub timeout: Duration,
pub insecure_ws: bool,
pub tls_roots: Option<PathBuf>,
}Expand description
Where a service dials out to, as whom, and under what name it asks to be mounted.
Fields§
§url: StringThe relay’s socket: ws://HOST:PORT/ws (wss:// with child-wss).
key: PathBufThe key file the upgrade’s proof is signed with (spec/00): synapse’s
~/.plexus/keys/<name>.key, 0600. Read at each dial, never kept.
agent: StringThe proof’s agent id.
mount: Option<String>The mount name asked for (peers.<mount>); none: the activation’s
namespace.
trust: Option<String>The relay’s key (key:<64 hex>), pinned (spec/14 rule 4). KEEL-8:
required — none, and the dial-out is refused before dialing. At each
connect the relay proves it at _info (the nonce signed, as a
mount’s child proves its key, DYNAUTH-5); a relay that proves none,
or another, is refused and nothing it sends is served. A hop is
believed only when it names this key as the service acting.
backoff: BackoffDialing again after the socket drops.
timeout: Duration_info, the offer’s answer, and each of this side’s calls’ opens.
insecure_ws: boolKEEL-7: dial plain ws:// beyond loopback (transport.insecure_ws,
a test network’s). Off: such a relay is refused before a socket opens
(check_ws_url); on: dialed, and DialState::Mounted says
insecure.
tls_roots: Option<PathBuf>KEEL-8 (DYNAUTH-8): a PEM file of certificate authorities a wss://
relay’s certificate may chain to, beside the webpki roots — as a
mount’s ChildOptions::tls_roots.
Implementations§
Source§impl DialOut
impl DialOut
Sourcepub fn new(url: impl Into<String>, key: impl Into<PathBuf>) -> Self
pub fn new(url: impl Into<String>, key: impl Into<PathBuf>) -> Self
Dial url, signed in with the key in key.
Sourcepub fn trust(self, principal: impl Into<String>) -> Self
pub fn trust(self, principal: impl Into<String>) -> Self
The relay’s key (key:<64 hex>): it must prove it at each connect,
and hops are believed only from it (pinned).
Sourcepub fn insecure_ws(self, on: bool) -> Self
pub fn insecure_ws(self, on: bool) -> Self
KEEL-7: allow plain ws:// beyond loopback (DialOut::insecure_ws).
Sourcepub fn tls_roots(self, roots: impl Into<PathBuf>) -> Self
pub fn tls_roots(self, roots: impl Into<PathBuf>) -> Self
KEEL-8: a PEM file of CAs a wss:// relay may chain to
(DialOut::tls_roots).
Sourcepub fn configured(self, c: &Config) -> Self
pub fn configured(self, c: &Config) -> Self
KEEL-7: DialOut::insecure_ws as transport.insecure_ws in c
says, when it says more than its default; KEEL-8: and
DialOut::tls_roots as transport.tls_roots says.