diff --git a/pr/3186/docs/help.html b/pr/3186/docs/help.html index ae20f95c20..d9178219d7 100644 --- a/pr/3186/docs/help.html +++ b/pr/3186/docs/help.html @@ -1 +1 @@ -
pub enum ConnectionSelector {
- Iroh(Connection),
+ Iroh(Connection),
Quinn(Connection),
-}pub enum EndpointSelector {
- Iroh(Endpoint),
+ Iroh(Endpoint),
Quinn(Endpoint),
-}Create a client endpoint and client connection
+) -> Result<(Endpoint, Connection)>Create a client endpoint and client connection
pub async fn handle_client_stream(
- connection: &Connection,
+ connection: &Connection,
upload_size: u64,
read_unordered: bool,
) -> Result<(TransferResult, TransferResult)>pub async fn server(endpoint: Endpoint, opt: Opt) -> Result<()>Take the provided endpoint and run the server
+Creates a server endpoint which runs on the given runtime
+) -> (NodeAddr, Endpoint)Creates a server endpoint which runs on the given runtime
A DNS server and pkarr relay
+A DNS server and pkarr relay
Addr::receive_stun_packet.
Creates a new net_report client.
This starts a connected actor in the background. Once the client is dropped it will @@ -17,7 +17,7 @@ stop running.
allows sending messages to the actor.This will attempt to use all probe protocols.
Runs a net_report, returning the report.
It may not be called concurrently with itself, &mut self takes care of that.
Look at Options for the different configuration options.
Get report with channel
Look at Options for the different configuration options.
pub struct RelayLatencies(/* private fields */);Latencies per relay node.
-Returns an iterator over all the relays and their latencies.
+source. Read morehair_pinning: Option<bool>Whether the router supports communicating between two local devices through the NATted public IP address (on IPv4).
portmap_probe: Option<ProbeOutput>Probe indicating the presence of port mapping protocols on the LAN.
-preferred_relay: Option<RelayUrl>None for unknown
preferred_relay: Option<RelayUrl>None for unknown
relay_latency: RelayLatencieskeyed by relay Url
relay_v4_latency: RelayLatencieskeyed by relay Url
relay_v6_latency: RelayLatencieskeyed by relay Url
diff --git a/pr/3186/docs/iroh_relay/client/enum.ReceivedMessage.html b/pr/3186/docs/iroh_relay/client/enum.ReceivedMessage.html index afe80369c6..2e9ed8ab44 100644 --- a/pr/3186/docs/iroh_relay/client/enum.ReceivedMessage.html +++ b/pr/3186/docs/iroh_relay/client/enum.ReceivedMessage.html @@ -1,9 +1,9 @@pub enum ReceivedMessage {
ReceivedPacket {
- remote_node_id: NodeId,
+ remote_node_id: NodeId,
data: Bytes,
},
- NodeGone(NodeId),
+ NodeGone(NodeId),
Ping([u8; 8]),
Pong([u8; 8]),
KeepAlive,
@@ -17,9 +17,9 @@
}The messages received from a framed relay stream.
This is a type-validated version of the Frames on the RelayCodec.
Represents an incoming packet.
-Indicates that the client identified by the underlying public key had previously sent you a packet but has now disconnected from the server.
Request from a client or server to reply to the
other side with a ReceivedMessage::Pong with the given payload.
pub enum SendMessage {
- SendPacket(NodeId, Bytes),
+ SendPacket(NodeId, Bytes),
Ping([u8; 8]),
Pong([u8; 8]),
}Messages we can send to a relay server.
-Send a packet of data to the NodeId.
Send a packet of data to the [NodeId].
Sends a ping message to the connected relay server.
Sends a pong message to the connected relay server.
pub struct ClientBuilder { /* private fields */ }Build a Client.
Create a new ClientBuilder
Sets whether to connect to the relay via websockets or not. diff --git a/pr/3186/docs/iroh_relay/dns/index.html b/pr/3186/docs/iroh_relay/dns/index.html index a87460e2e7..cfb9b2628a 100644 --- a/pr/3186/docs/iroh_relay/dns/index.html +++ b/pr/3186/docs/iroh_relay/dns/index.html @@ -1,2 +1,2 @@
wasm_browser only.DNS resolver
-NodeId.iroh.DnsResolver::lookup_txtNodeId].iroh.DnsResolver::lookup_txtwasm_browser only.Support for handling DNS resource records for dialing by NodeId.
Dialing by NodeId is supported by iroh nodes publishing Pkarr records to DNS
+
wasm_browser only.Support for handling DNS resource records for dialing by [NodeId].
Dialing by [NodeId] is supported by iroh nodes publishing Pkarr records to DNS
servers or the Mainline DHT. This module supports creating and parsing these records.
DNS records are published under the following names:
_iroh.<z32-node-id>.<origin-domain> TXT
_iroh is the record name as defined by IROH_TXT_NAME.
<z32-node-id> is the z-base-32 encoding of the NodeId.
<z32-node-id> is the z-base-32 encoding of the [NodeId].
<origin-domain> 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 RFC1464. The following attributes are defined:
IROH_TXT_NAME TXT resource record.NodeId to encode to and decode from [z32],
+IROH_TXT_NAME TXT resource record.NodeId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.pub struct NodeInfo {
- pub node_id: NodeId,
+ pub node_id: NodeId,
pub relay_url: Option<Url>,
pub direct_addresses: BTreeSet<SocketAddr>,
}wasm_browser only.Information about the iroh node contained in an IROH_TXT_NAME TXT resource record.
node_id: NodeIdThe NodeId.
node_id: NodeIdThe [NodeId].
relay_url: Option<Url>The advertised home relay server.
direct_addresses: BTreeSet<SocketAddr>Any direct addresses.
Creates a new NodeInfo from its parts.
Parses a NodeInfo from a [pkarr::SignedPacket].
Creates a [pkarr::SignedPacket].
This constructs a DNS packet and signs it with a SecretKey.
This constructs a DNS packet and signs it with a [SecretKey].
Converts into a list of {key}={value} strings.
pub trait NodeIdExt {
// Required methods
fn to_z32(&self) -> String;
- fn from_z32(s: &str) -> Result<NodeId>;
-}wasm_browser only.Extension methods for Extension methods for [NodeId to encode to and decode from [z32],
+ fn from_z32(s: &str) -> Result<NodeId>;
+}Available on non-wasm_browser only.Expand description
NodeId] to encode to and decode from [z32],
which is the encoding used in [pkarr] domain names.
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.
timeout is applied as stated in
summary of all errors otherwise.
Looks up node info by NodeId and origin domain name.
Looks up node info by [NodeId] and origin domain name.
To lookup nodes that published their node info to the DNS servers run by n0,
pass N0_DNS_NODE_ORIGIN_PROD as origin.
Looks up node info by DNS name.
+Looks up node info by DNS name.
Looks up node info by DNS name in a staggered fashion.
+) -> Result<NodeAddr>Looks up node info by DNS name in a staggered fashion.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
summary of all errors otherwise.
Looks up node info by NodeId and origin domain name.
Looks up node info by [NodeId] and origin domain name.
From the moment this function is called, each lookup is scheduled after the delays in
delays_ms with the first call being done immediately. [200ms, 300ms] results in calls
at T+0ms, T+200ms and T+300ms. The result of the first successful call is returned, or a
diff --git a/pr/3186/docs/iroh_relay/server/enum.AccessConfig.html b/pr/3186/docs/iroh_relay/server/enum.AccessConfig.html
index d20a298265..79fd1cef8d 100644
--- a/pr/3186/docs/iroh_relay/server/enum.AccessConfig.html
+++ b/pr/3186/docs/iroh_relay/server/enum.AccessConfig.html
@@ -1,10 +1,10 @@
pub enum AccessConfig {
Everyone,
- Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>),
+ Restricted(Box<dyn Fn(NodeId) -> Boxed<Access> + Send + Sync + 'static>),
}server only.Controls which nodes are allowed to use the relay.
Everyone
-Only nodes for which the function returns Access::Allow.
Is this node allowed?
The socket address the QUIC server is listening on.
The socket address the STUN server is listening on.
The certificates chain if configured with manual TLS certificates.
-test-utils only.Get the server’s https RelayUrl.
test-utils only.Get the server’s https [RelayUrl].
This uses Self::https_addr so it’s mostly useful for local development.
test-utils only.Get the server’s http RelayUrl.
test-utils only.Get the server’s http [RelayUrl].
This uses Self::http_addr so it’s mostly useful for local development.
pub struct RelayMap { /* private fields */ }Configuration of all the relay servers that can be used.
-Returns an Iterator over all known nodes.
Is this a known node?
-Is this a known node?
+Creates a new RelayMap with a single relay server configured.
Creates a new RelayMap with a single relay server configured.
Allows to set a custom STUN port and different IP addresses for IPv4 and IPv6. If IP addresses are provided, no DNS lookup will be performed.
Sets the port to the default DEFAULT_RELAY_QUIC_PORT.
Returns a RelayMap from a [RelayUrl].
This will use the default STUN port, the default QUIC port
(as defined by the iroh-relay crate) and IP addresses
resolved from the URL’s host name via DNS.
diff --git a/pr/3186/docs/iroh_relay/struct.RelayNode.html b/pr/3186/docs/iroh_relay/struct.RelayNode.html
index 6bb2573b45..fde3e4829f 100644
--- a/pr/3186/docs/iroh_relay/struct.RelayNode.html
+++ b/pr/3186/docs/iroh_relay/struct.RelayNode.html
@@ -1,11 +1,11 @@
pub struct RelayNode {
- pub url: RelayUrl,
+ pub url: RelayUrl,
pub stun_only: bool,
pub stun_port: u16,
pub quic: Option<RelayQuicConfig>,
}Information on a specific relay server.
Includes the Url where it can be dialed.
-url: RelayUrlThe RelayUrl where this relay server can be dialed.
url: RelayUrlThe [RelayUrl] where this relay server can be dialed.
stun_only: boolWhether this relay server should only be used for STUN requests.
This essentially allows you to use a normal STUN server as a relay node, no relay functionality is used.
diff --git a/pr/3186/docs/settings.html b/pr/3186/docs/settings.html index 99365f8fca..cb9c1523e7 100644 --- a/pr/3186/docs/settings.html +++ b/pr/3186/docs/settings.html @@ -1 +1 @@ -//! A DNS server and pkarr relay
+270//! A DNS server and pkarr relay
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
@@ -524,7 +523,6 @@
assert_eq!(res.relay_url.map(Url::from), Some(relay_url));
server.shutdown().await?;
- drop(testnet);
Ok(())
}
diff --git a/pr/3186/docs/trait.impl/core/convert/trait.From.js b/pr/3186/docs/trait.impl/core/convert/trait.From.js
index b17b67c8c3..5dd3ca1f85 100644
--- a/pr/3186/docs/trait.impl/core/convert/trait.From.js
+++ b/pr/3186/docs/trait.impl/core/convert/trait.From.js
@@ -1,9 +1,9 @@
(function() {
- var implementors = Object.fromEntries([["iroh",[["impl From<RemoteInfo> for NodeAddr"],["impl<T> From<T> for ConcurrentDiscovery"]]],["iroh_base",[["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["impl From<ParseError> for RelayUrlParseError"],["impl From<Url> for RelayUrl"],["impl From<NodeAddr> for NodeTicket"],["impl From<PublicKey> for NodeAddr"],["impl From<RelayUrl> for Url"],["impl From<NodeTicket> for NodeAddr"],["impl From<DecodeError> for KeyParsingError"],["impl From<DecodeError> for Error"],["impl From<Error> for KeyParsingError"],["impl From<Error> for Error"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<Error> for ConnSendError"],["impl From<NodeInfo> for NodeAddr"],["impl From<Error> for ConnSendError"],["impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver"],["impl From<TxtLookup> for TxtLookup"]]]]);
+ var implementors = Object.fromEntries([["iroh",[["impl From<RemoteInfo> for NodeAddr"],["impl<T> From<T> for ConcurrentDiscovery"]]],["iroh_base",[["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["impl From<ParseError> for RelayUrlParseError"],["impl From<Url> for RelayUrl"],["impl From<NodeAddr> for NodeTicket"],["impl From<PublicKey> for NodeAddr"],["impl From<RelayUrl> for Url"],["impl From<NodeTicket> for NodeAddr"],["impl From<DecodeError> for KeyParsingError"],["impl From<DecodeError> for Error"],["impl From<Error> for KeyParsingError"],["impl From<Error> for Error"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<Error> for ConnSendError"],["impl From<NodeInfo> for NodeAddr"],["impl From<Error> for ConnSendError"],["impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver"],["impl From<TxtLookup> for TxtLookup"]]]]);
if (window.register_implementors) {
window.register_implementors(implementors);
} else {
window.pending_implementors = implementors;
}
})()
-//{"start":57,"fragment_lengths":[1219,5343,1816]}
\ No newline at end of file
+//{"start":57,"fragment_lengths":[1219,5343,1694]}
\ No newline at end of file