deploy: 90e16843d5882105d522631d501b4066eb831293

This commit is contained in:
dignifiedquire
2025-06-02 11:02:05 +00:00
parent e54e03eddf
commit b4a5bba7f9
19 changed files with 69 additions and 119 deletions
@@ -62,7 +62,7 @@ n0.computer dns server.</p>
When in tests, or when the <code>test-utils</code> feature is enabled, this will use the
<a href="../discovery/pkarr/constant.N0_DNS_PKARR_RELAY_STAGING.html" title="constant iroh::discovery::pkarr::N0_DNS_PKARR_RELAY_STAGING"><code>N0_DNS_PKARR_RELAY_STAGING</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.tls_raw_public_keys" class="method"><a class="src rightside" href="../../src/iroh/endpoint.rs.html#401-404">Source</a><h4 class="code-header">pub fn <a href="#method.tls_raw_public_keys" class="fn">tls_raw_public_keys</a>(self) -&gt; Self</h4></section></summary><div class="docblock"><p>Use TLS Raw Public Keys</p>
<p>This is the default, but is not compatible with older versions of iroh.</p>
<p>This is the default, and currently the only available option.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.discovery_dht" class="method"><a class="src rightside" href="../../src/iroh/endpoint.rs.html#413-428">Source</a><h4 class="code-header">pub fn <a href="#method.discovery_dht" class="fn">discovery_dht</a>(self) -&gt; Self</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>discovery-pkarr-dht</code></strong> only.</div></span></summary><div class="docblock"><p>Configures the endpoint to also use the mainline DHT with default settings.</p>
<p>This is equivalent to adding a <a href="../discovery/pkarr/dht/struct.DhtDiscovery.html" title="struct iroh::discovery::pkarr::dht::DhtDiscovery"><code>crate::discovery::pkarr::dht::DhtDiscovery</code></a>
with default settings. Note that DhtDiscovery has various more advanced
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -67,9 +67,9 @@ at T+0ms, T+200ms and T+300ms. The <code>timeout</code> is applied as stated in
summary of all errors otherwise.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lookup_node_by_id" class="method"><a class="src rightside" href="../../src/iroh_relay/dns.rs.html#223-230">Source</a><h4 class="code-header">pub async fn <a href="#method.lookup_node_by_id" class="fn">lookup_node_by_id</a>(
&amp;self,
node_id: &amp;NodeId,
node_id: &amp;<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>,
origin: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../node_info/struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">NodeInfo</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up node info by [<code>NodeId</code>] and origin domain name.</p>
) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../node_info/struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">NodeInfo</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up node info by <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> and origin domain name.</p>
<p>To lookup nodes that published their node info to the DNS servers run by n0,
pass <a href="constant.N0_DNS_NODE_ORIGIN_PROD.html" title="constant iroh_relay::dns::N0_DNS_NODE_ORIGIN_PROD"><code>N0_DNS_NODE_ORIGIN_PROD</code></a> as <code>origin</code>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lookup_node_by_domain_name" class="method"><a class="src rightside" href="../../src/iroh_relay/dns.rs.html#233-239">Source</a><h4 class="code-header">pub async fn <a href="#method.lookup_node_by_domain_name" class="fn">lookup_node_by_domain_name</a>(&amp;self, name: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../node_info/struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">NodeInfo</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up node info by DNS name.</p>
@@ -84,10 +84,10 @@ at T+0ms, T+200ms and T+300ms. The result of the first successful call is return
summary of all errors otherwise.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.lookup_node_by_id_staggered" class="method"><a class="src rightside" href="../../src/iroh_relay/dns.rs.html#262-270">Source</a><h4 class="code-header">pub async fn <a href="#method.lookup_node_by_id_staggered" class="fn">lookup_node_by_id_staggered</a>(
&amp;self,
node_id: &amp;NodeId,
node_id: &amp;<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>,
origin: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
delays_ms: &amp;[<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u64.html">u64</a>],
) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../node_info/struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">NodeInfo</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up node info by [<code>NodeId</code>] and origin domain name.</p>
) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="struct" href="../node_info/struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">NodeInfo</a>&gt;</h4></section></summary><div class="docblock"><p>Looks up node info by <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> and origin domain name.</p>
<p>From the moment this function is called, each lookup is scheduled after the delays in
<code>delays_ms</code> with the first call being done immediately. <code>[200ms, 300ms]</code> results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
+1 -1
View File
@@ -25,6 +25,6 @@ Tailscale.</p>
STUN support and expose metrics.</p>
</li>
</ul>
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.MAX_PACKET_SIZE"><code>pub use protos::relay::<a class="constant" href="protos/relay/constant.MAX_PACKET_SIZE.html" title="constant iroh_relay::protos::relay::MAX_PACKET_SIZE">MAX_PACKET_SIZE</a>;</code></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="client/index.html" title="mod iroh_relay::client">client</a></div><div class="desc docblock-short">Exposes <a href="client/struct.Client.html" title="struct iroh_relay::client::Client"><code>Client</code></a>, which allows to establish connections to a relay server.</div></li><li><div class="item-name"><a class="mod" href="defaults/index.html" title="mod iroh_relay::defaults">defaults</a></div><div class="desc docblock-short">Default values used in the relay.</div></li><li><div class="item-name"><a class="mod" href="dns/index.html" title="mod iroh_relay::dns">dns</a><wbr><span class="stab portability" title="Available on non-`wasm_browser` only">Non-<code>wasm_browser</code></span></div><div class="desc docblock-short">DNS resolver</div></li><li><div class="item-name"><a class="mod" href="http/index.html" title="mod iroh_relay::http">http</a></div><div class="desc docblock-short">HTTP-specific constants for the relay server and client.</div></li><li><div class="item-name"><a class="mod" href="node_info/index.html" title="mod iroh_relay::node_info">node_<wbr>info</a></div><div class="desc docblock-short">Support for handling DNS resource records for dialing by [<code>NodeId</code>].</div></li><li><div class="item-name"><a class="mod" href="protos/index.html" title="mod iroh_relay::protos">protos</a></div><div class="desc docblock-short">Protocols used by the iroh-relay</div></li><li><div class="item-name"><a class="mod" href="quic/index.html" title="mod iroh_relay::quic">quic</a></div><div class="desc docblock-short">Create a QUIC server that accepts connections
</div></details><h2 id="reexports" class="section-header">Re-exports<a href="#reexports" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name" id="reexport.MAX_PACKET_SIZE"><code>pub use protos::relay::<a class="constant" href="protos/relay/constant.MAX_PACKET_SIZE.html" title="constant iroh_relay::protos::relay::MAX_PACKET_SIZE">MAX_PACKET_SIZE</a>;</code></div></li></ul><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="mod" href="client/index.html" title="mod iroh_relay::client">client</a></div><div class="desc docblock-short">Exposes <a href="client/struct.Client.html" title="struct iroh_relay::client::Client"><code>Client</code></a>, which allows to establish connections to a relay server.</div></li><li><div class="item-name"><a class="mod" href="defaults/index.html" title="mod iroh_relay::defaults">defaults</a></div><div class="desc docblock-short">Default values used in the relay.</div></li><li><div class="item-name"><a class="mod" href="dns/index.html" title="mod iroh_relay::dns">dns</a><wbr><span class="stab portability" title="Available on non-`wasm_browser` only">Non-<code>wasm_browser</code></span></div><div class="desc docblock-short">DNS resolver</div></li><li><div class="item-name"><a class="mod" href="http/index.html" title="mod iroh_relay::http">http</a></div><div class="desc docblock-short">HTTP-specific constants for the relay server and client.</div></li><li><div class="item-name"><a class="mod" href="node_info/index.html" title="mod iroh_relay::node_info">node_<wbr>info</a></div><div class="desc docblock-short">Support for handling DNS resource records for dialing by <a href="../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a>.</div></li><li><div class="item-name"><a class="mod" href="protos/index.html" title="mod iroh_relay::protos">protos</a></div><div class="desc docblock-short">Protocols used by the iroh-relay</div></li><li><div class="item-name"><a class="mod" href="quic/index.html" title="mod iroh_relay::quic">quic</a></div><div class="desc docblock-short">Create a QUIC server that accepts connections
for QUIC address discovery.</div></li><li><div class="item-name"><a class="mod" href="server/index.html" title="mod iroh_relay::server">server</a><wbr><span class="stab portability" title="Available on crate feature `server` only"><code>server</code></span></div><div class="desc docblock-short">A fully-fledged iroh-relay server over HTTP or HTTPS.</div></li></ul><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.PingTracker.html" title="struct iroh_relay::PingTracker">Ping<wbr>Tracker</a></div><div class="desc docblock-short">Tracks pings on a single relay connection.</div></li><li><div class="item-name"><a class="struct" href="struct.RelayMap.html" title="struct iroh_relay::RelayMap">Relay<wbr>Map</a></div><div class="desc docblock-short">Configuration of all the relay servers that can be used.</div></li><li><div class="item-name"><a class="struct" href="struct.RelayNode.html" title="struct iroh_relay::RelayNode">Relay<wbr>Node</a></div><div class="desc docblock-short">Information on a specific relay server.</div></li><li><div class="item-name"><a class="struct" href="struct.RelayQuicConfig.html" title="struct iroh_relay::RelayQuicConfig">Relay<wbr>Quic<wbr>Config</a></div><div class="desc docblock-short">Configuration for speaking to the QUIC endpoint on the relay
server to do QUIC address discovery.</div></li></ul></section></div></main></body></html>
+5 -5
View File
@@ -1,5 +1,5 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Support for handling DNS resource records for dialing by `NodeId`."><title>iroh_relay::node_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_relay" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.35.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module node_<wbr>info</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh_<wbr>relay</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a></span><h1>Module <span>node_info</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/node_info.rs.html#1-757">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Support for handling DNS resource records for dialing by [<code>NodeId</code>].</p>
<p>Dialing by [<code>NodeId</code>] is supported by iroh nodes publishing <a href="https://app.pkarr.org">Pkarr</a> records to DNS
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Support for handling DNS resource records for dialing by `NodeId`."><title>iroh_relay::node_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_relay" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.35.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Module node_<wbr>info</a></h2><h3><a href="#structs">Module Items</a></h3><ul class="block"><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#constants" title="Constants">Constants</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="../index.html">In crate iroh_<wbr>relay</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a></span><h1>Module <span>node_info</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/node_info.rs.html#1-757">Source</a> </span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Support for handling DNS resource records for dialing by <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a>.</p>
<p>Dialing by <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> is supported by iroh nodes publishing <a href="https://app.pkarr.org">Pkarr</a> records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.</p>
<p>DNS records are published under the following names:</p>
<p><code>_iroh.&lt;z32-node-id&gt;.&lt;origin-domain&gt; TXT</code></p>
@@ -8,7 +8,7 @@ servers or the Mainline DHT. This module supports creating and parsing these re
<p><code>_iroh</code> is the record name as defined by <a href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::node_info::IROH_TXT_NAME"><code>IROH_TXT_NAME</code></a>.</p>
</li>
<li>
<p><code>&lt;z32-node-id&gt;</code> is the <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding of the [<code>NodeId</code>].</p>
<p><code>&lt;z32-node-id&gt;</code> is the <a href="https://philzimmermann.com/docs/human-oriented-base-32-encoding.txt">z-base-32</a> encoding of the <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a>.</p>
</li>
<li>
<p><code>&lt;origin-domain&gt;</code> is the domain name of the publishing DNS server,
@@ -23,12 +23,12 @@ servers or the Mainline DHT. This module supports creating and parsing these re
in <a href="https://www.rfc-editor.org/rfc/rfc1464">RFC1464</a>. The following attributes are defined:</p>
<ul>
<li>
<p><code>relay=&lt;url&gt;</code>: The home <a href="iroh_base::RelayUrl"><code>RelayUrl</code></a> of this node.</p>
<p><code>relay=&lt;url&gt;</code>: The home <a href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl"><code>RelayUrl</code></a> of this node.</p>
</li>
<li>
<p><code>addr=&lt;addr&gt; &lt;addr&gt;</code>: A space-separated list of sockets addresses for this iroh node.
Each address is an IPv4 or IPv6 address with a port.</p>
</li>
</ul>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.MaxLengthExceededError.html" title="struct iroh_relay::node_info::MaxLengthExceededError">MaxLength<wbr>Exceeded<wbr>Error</a></div><div class="desc docblock-short">Error returned when an input value is too long for <a href="struct.UserData.html" title="struct iroh_relay::node_info::UserData"><code>UserData</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeData.html" title="struct iroh_relay::node_info::NodeData">Node<wbr>Data</a></div><div class="desc docblock-short">Data about a node that may be published to and resolved from discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">Node<wbr>Info</a></div><div class="desc docblock-short">Information about a node that may be published to and resolved from discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.UserData.html" title="struct iroh_relay::node_info::UserData">User<wbr>Data</a></div><div class="desc docblock-short">Under the hood this is a UTF-8 String is no longer than <a href="struct.UserData.html#associatedconstant.MAX_LENGTH" title="associated constant iroh_relay::node_info::UserData::MAX_LENGTH"><code>UserData::MAX_LENGTH</code></a> bytes.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::node_info::IROH_TXT_NAME">IROH_<wbr>TXT_<wbr>NAME</a></div><div class="desc docblock-short">The DNS name for the iroh TXT record.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::node_info::NodeIdExt">Node<wbr>IdExt</a></div><div class="desc docblock-short">Extension methods for [<code>NodeId</code>] to encode to and decode from [<code>z32</code>],
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.MaxLengthExceededError.html" title="struct iroh_relay::node_info::MaxLengthExceededError">MaxLength<wbr>Exceeded<wbr>Error</a></div><div class="desc docblock-short">Error returned when an input value is too long for <a href="struct.UserData.html" title="struct iroh_relay::node_info::UserData"><code>UserData</code></a>.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeData.html" title="struct iroh_relay::node_info::NodeData">Node<wbr>Data</a></div><div class="desc docblock-short">Data about a node that may be published to and resolved from discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.NodeInfo.html" title="struct iroh_relay::node_info::NodeInfo">Node<wbr>Info</a></div><div class="desc docblock-short">Information about a node that may be published to and resolved from discovery services.</div></li><li><div class="item-name"><a class="struct" href="struct.UserData.html" title="struct iroh_relay::node_info::UserData">User<wbr>Data</a></div><div class="desc docblock-short">Under the hood this is a UTF-8 String is no longer than <a href="struct.UserData.html#associatedconstant.MAX_LENGTH" title="associated constant iroh_relay::node_info::UserData::MAX_LENGTH"><code>UserData::MAX_LENGTH</code></a> bytes.</div></li></ul><h2 id="constants" class="section-header">Constants<a href="#constants" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="constant" href="constant.IROH_TXT_NAME.html" title="constant iroh_relay::node_info::IROH_TXT_NAME">IROH_<wbr>TXT_<wbr>NAME</a></div><div class="desc docblock-short">The DNS name for the iroh TXT record.</div></li></ul><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::node_info::NodeIdExt">Node<wbr>IdExt</a></div><div class="desc docblock-short">Extension methods for <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> to encode to and decode from [<code>z32</code>],
which is the encoding used in [<code>pkarr</code>] domain names.</div></li></ul></section></div></main></body></html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Extension methods for `NodeId` to encode to and decode from `z32`, which is the encoding used in `pkarr` domain names."><title>NodeIdExt in iroh_relay::node_info - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-dbdb5eec.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="iroh_relay" data-themes="" data-resource-suffix="" data-rustdoc-version="1.85.0-nightly (d10a6823f 2024-11-29)" data-channel="nightly" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../iroh_relay/index.html">iroh_<wbr>relay</a><span class="version">0.35.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Node<wbr>IdExt</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.from_z32" title="from_z32">from_z32</a></li><li><a href="#tymethod.to_z32" title="to_z32">to_z32</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-NodeIdExt-for-PublicKey" title="NodeId">NodeId</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In iroh_<wbr>relay::<wbr>node_<wbr>info</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">iroh_relay</a>::<wbr><a href="index.html">node_info</a></span><h1>Trait <span class="trait">NodeIdExt</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/iroh_relay/node_info.rs.html#59-69">Source</a> </span></div><pre class="rust item-decl"><code>pub trait NodeIdExt {
// Required methods
fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>;
<span class="item-spacer"></span> fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;NodeId&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extension methods for [<code>NodeId</code>] to encode to and decode from [<code>z32</code>],
<span class="item-spacer"></span> fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>&gt;;
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Extension methods for <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> to encode to and decode from [<code>z32</code>],
which is the encoding used in [<code>pkarr</code>] domain names.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_z32" class="method"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#63">Source</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a [<code>NodeId</code>] in [<code>z-base-32</code>] encoding.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#68">Source</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;NodeId&gt;</h4></section></summary><div class="docblock"><p>Parses a [<code>NodeId</code>] from [<code>z-base-32</code>] encoding.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-NodeIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#71-82">Source</a><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::node_info::NodeIdExt">NodeIdExt</a> for NodeId</h3></section></summary><div class="impl-items"><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#72-74">Source</a><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section><section id="method.from_z32" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#76-81">Source</a><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;NodeId&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/iroh_relay/node_info/trait.NodeIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.to_z32" class="method"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#63">Source</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section></summary><div class="docblock"><p>Encodes a <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> in [<code>z-base-32</code>] encoding.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.from_z32" class="method"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#68">Source</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>&gt;</h4></section></summary><div class="docblock"><p>Parses a <a href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId"><code>NodeId</code></a> from [<code>z-base-32</code>] encoding.</p>
</div></details></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#object-safety">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-NodeIdExt-for-PublicKey" class="impl"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#71-82">Source</a><a href="#impl-NodeIdExt-for-PublicKey" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="trait.NodeIdExt.html" title="trait iroh_relay::node_info::NodeIdExt">NodeIdExt</a> for <a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a></h3></section></summary><div class="impl-items"><section id="method.to_z32" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#72-74">Source</a><a href="#method.to_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.to_z32" class="fn">to_z32</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></section><section id="method.from_z32" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/node_info.rs.html#76-81">Source</a><a href="#method.from_z32" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.from_z32" class="fn">from_z32</a>(s: &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>) -&gt; <a class="type" href="https://docs.rs/anyhow/1.0.98/anyhow/type.Result.html" title="type anyhow::Result">Result</a>&lt;<a class="type" href="../../iroh_base/key/type.NodeId.html" title="type iroh_base::key::NodeId">NodeId</a>&gt;</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/iroh_relay/node_info/trait.NodeIdExt.js" data-ignore-extern-crates="iroh_base" async></script></section></div></main></body></html>
File diff suppressed because one or more lines are too long
@@ -14,9 +14,9 @@ case there is an error in the server before it is shut down.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.quic_addr" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#481-483">Source</a><h4 class="code-header">pub fn <a href="#method.quic_addr" class="fn">quic_addr</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>&gt;</h4></section></summary><div class="docblock"><p>The socket address the QUIC server is listening on.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.stun_addr" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#486-488">Source</a><h4 class="code-header">pub fn <a href="#method.stun_addr" class="fn">stun_addr</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="https://doc.rust-lang.org/nightly/core/net/socket_addr/enum.SocketAddr.html" title="enum core::net::socket_addr::SocketAddr">SocketAddr</a>&gt;</h4></section></summary><div class="docblock"><p>The socket address the STUN server is listening on.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.certificates" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#491-493">Source</a><h4 class="code-header">pub fn <a href="#method.certificates" class="fn">certificates</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/alloc/vec/struct.Vec.html" title="struct alloc::vec::Vec">Vec</a>&lt;CertificateDer&lt;'static&gt;&gt;&gt;</h4></section></summary><div class="docblock"><p>The certificates chain if configured with manual TLS certificates.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.https_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#499-505">Source</a><h4 class="code-header">pub fn <a href="#method.https_url" class="fn">https_url</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;RelayUrl&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s https [<code>RelayUrl</code>].</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.https_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#499-505">Source</a><h4 class="code-header">pub fn <a href="#method.https_url" class="fn">https_url</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl">RelayUrl</a>&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s https <a href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl"><code>RelayUrl</code></a>.</p>
<p>This uses <a href="struct.Server.html#method.https_addr" title="method iroh_relay::server::Server::https_addr"><code>Self::https_addr</code></a> so it’s mostly useful for local development.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.http_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#511-517">Source</a><h4 class="code-header">pub fn <a href="#method.http_url" class="fn">http_url</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;RelayUrl&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s http [<code>RelayUrl</code>].</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.http_url" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#511-517">Source</a><h4 class="code-header">pub fn <a href="#method.http_url" class="fn">http_url</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl">RelayUrl</a>&gt;</h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>test-utils</code></strong> only.</div></span></summary><div class="docblock"><p>Get the server’s http <a href="../../iroh_base/relay_url/struct.RelayUrl.html" title="struct iroh_base::relay_url::RelayUrl"><code>RelayUrl</code></a>.</p>
<p>This uses <a href="struct.Server.html#method.http_addr" title="method iroh_relay::server::Server::http_addr"><code>Self::http_addr</code></a> so it’s mostly useful for local development.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.metrics" class="method"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#520-522">Source</a><h4 class="code-header">pub fn <a href="#method.metrics" class="fn">metrics</a>(&amp;self) -&gt; &amp;<a class="struct" href="struct.RelayMetrics.html" title="struct iroh_relay::server::RelayMetrics">RelayMetrics</a></h4></section></summary><div class="docblock"><p>Returns the metrics collected in the relay server.</p>
</div></details></div></details></div><h2 id="trait-implementations" class="section-header">Trait Implementations<a href="#trait-implementations" class="anchor">§</a></h2><div id="trait-implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Debug-for-Server" class="impl"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#247">Source</a><a href="#impl-Debug-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.fmt" class="method trait-impl"><a class="src rightside" href="../../src/iroh_relay/server.rs.html#247">Source</a><a href="#method.fmt" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fn">fmt</a>(&amp;self, __derive_more_f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></section></summary><div class='docblock'>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Server" class="impl"><a href="#impl-Freeze-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-RefUnwindSafe-for-Server" class="impl"><a href="#impl-RefUnwindSafe-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-Send-for-Server" class="impl"><a href="#impl-Send-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-Sync-for-Server" class="impl"><a href="#impl-Sync-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-Unpin-for-Server" class="impl"><a href="#impl-Unpin-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section><section id="impl-UnwindSafe-for-Server" class="impl"><a href="#impl-UnwindSafe-for-Server" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Server.html" title="struct iroh_relay::server::Server">Server</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -3563,7 +3563,7 @@
<span class="doccomment">/// Use TLS Raw Public Keys
///
/// This is the default, but is not compatible with older versions of iroh.
/// This is the default, and currently the only available option.
</span><span class="kw">pub fn </span>tls_raw_public_keys(<span class="kw-2">mut </span><span class="self">self</span>) -&gt; <span class="self">Self </span>{
<span class="self">self</span>.tls_auth = tls::Authentication::RawPublicKey;
<span class="self">self
+2 -4
View File
@@ -134,12 +134,10 @@
<a href="#133" id="133">133</a>
<a href="#134" id="134">134</a>
<a href="#135" id="135">135</a>
<a href="#136" id="136">136</a>
<a href="#137" id="137">137</a></pre></div><pre class="rust"><code><span class="doccomment">//! TLS configuration for iroh.
<a href="#136" id="136">136</a></pre></div><pre class="rust"><code><span class="doccomment">//! TLS configuration for iroh.
//!
//! Currently there are two mechanisms available
//! Currently there is one mechanisms available
//! - Raw Public Keys, using the TLS extension described in [RFC 7250]
//! - libp2p-tls, based on &lt;https://github.com/libp2p/specs/blob/master/tls/tls.md&gt;.
//!
//! [RFC 7250]: https://datatracker.ietf.org/doc/html/rfc7250
+4 -52
View File
@@ -236,38 +236,10 @@
<a href="#235" id="235">235</a>
<a href="#236" id="236">236</a>
<a href="#237" id="237">237</a>
<a href="#238" id="238">238</a>
<a href="#239" id="239">239</a>
<a href="#240" id="240">240</a>
<a href="#241" id="241">241</a>
<a href="#242" id="242">242</a>
<a href="#243" id="243">243</a>
<a href="#244" id="244">244</a>
<a href="#245" id="245">245</a>
<a href="#246" id="246">246</a>
<a href="#247" id="247">247</a>
<a href="#248" id="248">248</a>
<a href="#249" id="249">249</a>
<a href="#250" id="250">250</a>
<a href="#251" id="251">251</a>
<a href="#252" id="252">252</a>
<a href="#253" id="253">253</a>
<a href="#254" id="254">254</a>
<a href="#255" id="255">255</a>
<a href="#256" id="256">256</a>
<a href="#257" id="257">257</a>
<a href="#258" id="258">258</a>
<a href="#259" id="259">259</a>
<a href="#260" id="260">260</a>
<a href="#261" id="261">261</a>
<a href="#262" id="262">262</a></pre></div><pre class="rust"><code><span class="doccomment">//! TLS 1.3 certificates and handshakes handling.
<a href="#238" id="238">238</a></pre></div><pre class="rust"><code><span class="doccomment">//! TLS 1.3 certificates and handshakes handling.
//!
//! This module handles a verification of a client/server certificate chain
//! and signatures allegedly by the given certificates, or using raw public keys.
//!
//!
//! libp2p-tls certificate part is based on rust-libp2p/transports/tls/src/verifier.rs originally
//! licensed under MIT by Parity Technologies (UK) Ltd.
</span><span class="kw">use </span>ed25519_dalek::pkcs8::EncodePublicKey;
<span class="kw">use </span>iroh_base::PublicKey;
@@ -324,14 +296,7 @@
</span>auth: Authentication,
}
<span class="doccomment">/// We require the following
/// Either X.509 server certificate chains:
///
/// - Exactly one certificate must be presented.
/// - The certificate must be self-signed.
/// - The certificate must have a valid libp2p extension that includes a signature of its public key.
///
/// or a raw public key.
<span class="doccomment">/// We require a raw public key.
</span><span class="kw">impl </span>ServerCertificateVerifier {
<span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>new(auth: Authentication) -&gt; <span class="self">Self </span>{
<span class="self">Self </span>{ auth }
@@ -436,14 +401,7 @@
</span>auth: Authentication,
}
<span class="doccomment">/// We require the following
/// Either X.509 server certificate chains:
///
/// - Exactly one certificate must be presented.
/// - The certificate must be self-signed.
/// - The certificate must have a valid libp2p extension that includes a signature of its public key.
///
/// or a raw public key.
<span class="doccomment">/// We require a raw public key.
</span><span class="kw">impl </span>ClientCertificateVerifier {
<span class="kw">pub</span>(<span class="kw">super</span>) <span class="kw">fn </span>new(auth: Authentication) -&gt; <span class="self">Self </span>{
<span class="self">Self </span>{ auth }
@@ -452,13 +410,7 @@
<span class="doccomment">/// We requires either following of X.509 client certificate chains:
///
/// - Exactly one certificate must be presented. In particular, client
/// authentication is mandatory in libp2p.
/// - The certificate must be self-signed.
/// - The certificate must have a valid libp2p extension that includes a
/// signature of its public key.
///
/// or a valid raw public key configuration
/// - a valid raw public key configuration
</span><span class="kw">impl </span>ClientCertVerifier <span class="kw">for </span>ClientCertificateVerifier {
<span class="kw">fn </span>offer_client_auth(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; bool {
<span class="bool-val">true
File diff suppressed because one or more lines are too long
@@ -1,9 +1,9 @@
(function() {
var implementors = Object.fromEntries([["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"iroh_relay/struct.RelayNode.html\" title=\"struct iroh_relay::RelayNode\">RelayNode</a>&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;RelayUrl&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"]]]]);
var implementors = Object.fromEntries([["iroh_relay",[["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"iroh_base/relay_url/struct.RelayUrl.html\" title=\"struct iroh_base::relay_url::RelayUrl\">RelayUrl</a>&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"],["impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/iter/traits/collect/trait.FromIterator.html\" title=\"trait core::iter::traits::collect::FromIterator\">FromIterator</a>&lt;<a class=\"struct\" href=\"iroh_relay/struct.RelayNode.html\" title=\"struct iroh_relay::RelayNode\">RelayNode</a>&gt; for <a class=\"struct\" href=\"iroh_relay/struct.RelayMap.html\" title=\"struct iroh_relay::RelayMap\">RelayMap</a>"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
//{"start":57,"fragment_lengths":[776]}
//{"start":57,"fragment_lengths":[898]}