From 30bfc9daa1d873fd7ec345b7ebc151d210b2ebbd Mon Sep 17 00:00:00 2001 From: matheus23 Date: Mon, 14 Jul 2025 13:52:56 +0000 Subject: [PATCH] deploy: e77b82adf51881f4fe69c07d0d5d0f956f22472e --- .../iroh/endpoint/enum.AddNodeAddrError.html | 6 +- .../iroh/endpoint/enum.DirectAddrType.html | 12 +- .../docs/iroh/endpoint/struct.DirectAddr.html | 12 +- pr/3331/docs/iroh_relay/all.html | 2 +- .../protos/common/enum.FrameType.html | 46 +- .../protos/common/enum.FrameTypeError.html | 2 +- .../relay/constant.MAX_PAYLOAD_SIZE.html | 4 - .../protos/relay/enum.ClientToRelayMsg.html | 18 +- .../iroh_relay/protos/relay/enum.Error.html | 8 +- .../protos/relay/enum.RelayToClientMsg.html | 20 +- .../docs/iroh_relay/protos/relay/index.html | 10 +- .../iroh_relay/protos/relay/sidebar-items.js | 2 +- .../protos/relay/struct.Datagrams.html | 44 - pr/3331/docs/iroh_relay/server/index.html | 2 +- pr/3331/docs/search-index.js | 4 +- .../iroh_relay/iroh_relay-desc-0-.js | 2 +- pr/3331/docs/src/iroh/magicsock.rs.html | 6238 +++++++++-------- .../iroh/magicsock/transports/relay.rs.html | 747 +- .../magicsock/transports/relay/actor.rs.html | 3200 +++++---- .../docs/src/iroh_relay/client/conn.rs.html | 8 +- .../docs/src/iroh_relay/protos/common.rs.html | 22 +- .../docs/src/iroh_relay/protos/relay.rs.html | 1174 ++-- pr/3331/docs/src/iroh_relay/server.rs.html | 611 +- .../docs/src/iroh_relay/server/client.rs.html | 1521 ++-- .../src/iroh_relay/server/clients.rs.html | 574 +- .../src/iroh_relay/server/http_server.rs.html | 410 +- .../docs/trait.impl/core/clone/trait.Clone.js | 4 +- pr/3331/docs/trait.impl/core/cmp/trait.Eq.js | 4 +- .../trait.impl/core/cmp/trait.PartialEq.js | 4 +- .../trait.impl/core/convert/trait.From.js | 4 +- .../docs/trait.impl/core/fmt/trait.Debug.js | 4 +- .../trait.impl/core/marker/trait.Freeze.js | 4 +- .../docs/trait.impl/core/marker/trait.Send.js | 4 +- .../core/marker/trait.StructuralPartialEq.js | 4 +- .../docs/trait.impl/core/marker/trait.Sync.js | 4 +- .../trait.impl/core/marker/trait.Unpin.js | 4 +- .../panic/unwind_safe/trait.RefUnwindSafe.js | 4 +- .../panic/unwind_safe/trait.UnwindSafe.js | 4 +- 38 files changed, 7346 insertions(+), 7401 deletions(-) delete mode 100644 pr/3331/docs/iroh_relay/protos/relay/constant.MAX_PAYLOAD_SIZE.html delete mode 100644 pr/3331/docs/iroh_relay/protos/relay/struct.Datagrams.html diff --git a/pr/3331/docs/iroh/endpoint/enum.AddNodeAddrError.html b/pr/3331/docs/iroh/endpoint/enum.AddNodeAddrError.html index ab3494a325..025b25d862 100644 --- a/pr/3331/docs/iroh/endpoint/enum.AddNodeAddrError.html +++ b/pr/3331/docs/iroh/endpoint/enum.AddNodeAddrError.html @@ -1,4 +1,4 @@ -AddNodeAddrError in iroh::endpoint - Rust

Enum AddNodeAddrError

Source
#[non_exhaustive]
pub enum AddNodeAddrError { +AddNodeAddrError in iroh::endpoint - Rust

Enum AddNodeAddrError

Source
#[non_exhaustive]
pub enum AddNodeAddrError { Empty { backtrace: Option<Backtrace>, span_trace: SpanTrace, @@ -12,8 +12,8 @@ backtrace: Option<Backtrace>, span_trace: SpanTrace, }, -}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Empty

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

EmptyPruned

Fields

§pruned: usize
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

OwnAddress

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for AddNodeAddrError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AddNodeAddrError

Source§

fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for AddNodeAddrError
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for AddNodeAddrError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +}

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Empty

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

EmptyPruned

Fields

§pruned: usize
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

OwnAddress

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for AddNodeAddrError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for AddNodeAddrError

Source§

fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for AddNodeAddrError
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for AddNodeAddrError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more
Source§

impl From<AddNodeAddrError> for ConnectWithOptsError

Source§

fn from(error: AddNodeAddrError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where diff --git a/pr/3331/docs/iroh/endpoint/enum.DirectAddrType.html b/pr/3331/docs/iroh/endpoint/enum.DirectAddrType.html index f3c111e9b9..c9d8b69520 100644 --- a/pr/3331/docs/iroh/endpoint/enum.DirectAddrType.html +++ b/pr/3331/docs/iroh/endpoint/enum.DirectAddrType.html @@ -1,4 +1,4 @@ -DirectAddrType in iroh::endpoint - Rust

Enum DirectAddrType

Source
pub enum DirectAddrType {
+DirectAddrType in iroh::endpoint - Rust

Enum DirectAddrType

Source
pub enum DirectAddrType {
     Unknown,
     Local,
     Qad,
@@ -20,16 +20,16 @@ get a publicly routable direct address.

It is possible to configure iroh to bound to a specific port and independently configure the router to forward this port to the iroh node. This indicates a situation like this, which still uses QAD to discover the public address.

-

Trait Implementations§

Source§

impl Clone for DirectAddrType

Source§

fn clone(&self) -> DirectAddrType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DirectAddrType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DirectAddrType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for DirectAddrType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +

Trait Implementations§

Source§

impl Clone for DirectAddrType

Source§

fn clone(&self) -> DirectAddrType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DirectAddrType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for DirectAddrType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for DirectAddrType

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for DirectAddrType

Source§

fn cmp(&self, other: &DirectAddrType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for DirectAddrType

Source§

fn cmp(&self, other: &DirectAddrType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for DirectAddrType

Source§

fn eq(&self, other: &DirectAddrType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl PartialOrd for DirectAddrType

Source§

fn partial_cmp(&self, other: &DirectAddrType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the + Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for DirectAddrType

Source§

fn eq(&self, other: &DirectAddrType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for DirectAddrType

Source§

fn partial_cmp(&self, other: &DirectAddrType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
Source§

impl Copy for DirectAddrType

Source§

impl Eq for DirectAddrType

Source§

impl StructuralPartialEq for DirectAddrType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +the >= operator. Read more

Source§

impl Copy for DirectAddrType

Source§

impl Eq for DirectAddrType

Source§

impl StructuralPartialEq for DirectAddrType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/3331/docs/iroh/endpoint/struct.DirectAddr.html b/pr/3331/docs/iroh/endpoint/struct.DirectAddr.html index 344f7f498b..b0427219d9 100644 --- a/pr/3331/docs/iroh/endpoint/struct.DirectAddr.html +++ b/pr/3331/docs/iroh/endpoint/struct.DirectAddr.html @@ -1,4 +1,4 @@ -DirectAddr in iroh::endpoint - Rust

Struct DirectAddr

Source
pub struct DirectAddr {
+DirectAddr in iroh::endpoint - Rust

Struct DirectAddr

Source
pub struct DirectAddr {
     pub addr: SocketAddr,
     pub typ: DirectAddrType,
 }
Expand description

A direct address on which an iroh-node might be contactable.

@@ -7,16 +7,16 @@ contacted. These can come from various sources depending on the network topolog iroh node, see DirectAddrType for the several kinds of sources.

Fields§

§addr: SocketAddr

The address.

§typ: DirectAddrType

The origin of this direct address.

-

Trait Implementations§

Source§

impl Clone for DirectAddr

Source§

fn clone(&self) -> DirectAddr

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DirectAddr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for DirectAddr

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where +

Trait Implementations§

Source§

impl Clone for DirectAddr

Source§

fn clone(&self) -> DirectAddr

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DirectAddr

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for DirectAddr

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, - Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for DirectAddr

Source§

fn cmp(&self, other: &DirectAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where + Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for DirectAddr

Source§

fn cmp(&self, other: &DirectAddr) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where - Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for DirectAddr

Source§

fn eq(&self, other: &DirectAddr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl PartialOrd for DirectAddr

Source§

fn partial_cmp(&self, other: &DirectAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the + Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for DirectAddr

Source§

fn eq(&self, other: &DirectAddr) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl PartialOrd for DirectAddr

Source§

fn partial_cmp(&self, other: &DirectAddr) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by -the >= operator. Read more
Source§

impl Eq for DirectAddr

Source§

impl StructuralPartialEq for DirectAddr

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +the >= operator. Read more

Source§

impl Eq for DirectAddr

Source§

impl StructuralPartialEq for DirectAddr

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/3331/docs/iroh_relay/all.html b/pr/3331/docs/iroh_relay/all.html index fffb5b9dfa..5c37181ab6 100644 --- a/pr/3331/docs/iroh_relay/all.html +++ b/pr/3331/docs/iroh_relay/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

Constants

\ No newline at end of file +List of all items in this crate

List of all items

Structs

Enums

Traits

Functions

Constants

\ No newline at end of file diff --git a/pr/3331/docs/iroh_relay/protos/common/enum.FrameType.html b/pr/3331/docs/iroh_relay/protos/common/enum.FrameType.html index 5261fc475a..86a0e9d4e5 100644 --- a/pr/3331/docs/iroh_relay/protos/common/enum.FrameType.html +++ b/pr/3331/docs/iroh_relay/protos/common/enum.FrameType.html @@ -1,32 +1,32 @@ -FrameType in iroh_relay::protos::common - Rust

Enum FrameType

Source
#[repr(u32)]
pub enum FrameType { - ServerChallenge = 1, - ClientAuth = 2, - ServerConfirmsAuth = 3, - ServerDeniesAuth = 4, - ClientToRelayDatagrams = 5, - RelayToClientDatagrams = 6, - NodeGone = 7, - Ping = 8, - Pong = 9, - Health = 10, - Restarting = 11, +FrameType in iroh_relay::protos::common - Rust

Enum FrameType

Source
#[repr(u32)]
pub enum FrameType { + ServerChallenge = 0, + ClientAuth = 1, + ServerConfirmsAuth = 2, + ServerDeniesAuth = 3, + SendPacket = 4, + RecvPacket = 6, + NodeGone = 8, + Ping = 9, + Pong = 10, + Health = 11, + Restarting = 12, }
Expand description

Possible frame types during handshaking

-

Variants§

§

ServerChallenge = 1

The server frame type for the challenge response

-
§

ClientAuth = 2

The client frame type for the authentication frame

-
§

ServerConfirmsAuth = 3

The server frame type for authentication confirmation

-
§

ServerDeniesAuth = 4

The server frame type for authentication denial

-
§

ClientToRelayDatagrams = 5

32B dest pub key + ECN byte + segment size u16 + datagrams contents

-
§

RelayToClientDatagrams = 6

32B src pub key + ECN byte + segment size u16 + datagrams contents

-
§

NodeGone = 7

Sent from server to client to signal that a previous sender is no longer connected.

+

Variants§

§

ServerChallenge = 0

The server frame type for the challenge response

+
§

ClientAuth = 1

The client frame type for the authentication frame

+
§

ServerConfirmsAuth = 2

The server frame type for authentication confirmation

+
§

ServerDeniesAuth = 3

The server frame type for authentication denial

+
§

SendPacket = 4

32B dest pub key + ECN byte + segment size u16 + datagrams contents

+
§

RecvPacket = 6

32B src pub key + ECN byte + segment size u16 + datagrams contents

+
§

NodeGone = 8

Sent from server to client to signal that a previous sender is no longer connected.

That is, if A sent to B, and then if A disconnects, the server sends FrameType::PeerGone to B so B can forget that a reverse path exists on that connection to get back to A

32B pub key of peer that’s gone

-
§

Ping = 8

Messages with these frames will be ignored. +

§

Ping = 9

Messages with these frames will be ignored. 8 byte ping payload, to be echoed back in FrameType::Pong

-
§

Pong = 9

8 byte payload, the contents of ping being replied to

-
§

Health = 10

Sent from server to client to tell the client if their connection is unhealthy somehow. +

§

Pong = 10

8 byte payload, the contents of ping being replied to

+
§

Health = 11

Sent from server to client to tell the client if their connection is unhealthy somehow. Contains only UTF-8 bytes.

-
§

Restarting = 11

Sent from server to client for the server to declare that it’s restarting. +

§

Restarting = 12

Sent from server to client for the server to declare that it’s restarting. Payload is two big endian u32 durations in milliseconds: when to reconnect, and how long to try total.

Trait Implementations§

Source§

impl Clone for FrameType

Source§

fn clone(&self) -> FrameType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FrameType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<FrameType> for VarInt

Source§

fn from(value: FrameType) -> Self

Converts to this type from the input type.
Source§

impl From<FrameType> for u32

Source§

fn from(enum_value: FrameType) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for FrameType

Source§

fn eq(&self, other: &FrameType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, diff --git a/pr/3331/docs/iroh_relay/protos/common/enum.FrameTypeError.html b/pr/3331/docs/iroh_relay/protos/common/enum.FrameTypeError.html index fb75c3d6e7..4e10fb87d2 100644 --- a/pr/3331/docs/iroh_relay/protos/common/enum.FrameTypeError.html +++ b/pr/3331/docs/iroh_relay/protos/common/enum.FrameTypeError.html @@ -12,7 +12,7 @@ Self: Debug + Display,
Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for FrameTypeError

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<FrameTypeError> for Error

Source§

fn from(error: FrameTypeError) -> Self

Converts to this type from the input type.
Source§

impl From<FrameTypeError> for Error

Source§

fn from(error: FrameTypeError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<FrameTypeError> for Error

Source§

fn from(error: FrameTypeError) -> Self

Converts to this type from the input type.
Source§

impl From<FrameTypeError> for Error

Source§

fn from(error: FrameTypeError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method diff --git a/pr/3331/docs/iroh_relay/protos/relay/constant.MAX_PAYLOAD_SIZE.html b/pr/3331/docs/iroh_relay/protos/relay/constant.MAX_PAYLOAD_SIZE.html deleted file mode 100644 index 17f7b3c542..0000000000 --- a/pr/3331/docs/iroh_relay/protos/relay/constant.MAX_PAYLOAD_SIZE.html +++ /dev/null @@ -1,4 +0,0 @@ -MAX_PAYLOAD_SIZE in iroh_relay::protos::relay - Rust

Constant MAX_PAYLOAD_SIZE

Source
pub const MAX_PAYLOAD_SIZE: usize = _; // 65_501usize
Expand description

Maximum size a datagram payload is allowed to be.

-

This is MAX_PACKET_SIZE minus the length of an encoded public key minus 3 bytes, -one for ECN, and two for the segment size.

-
\ No newline at end of file diff --git a/pr/3331/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html b/pr/3331/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html index 58ee3cf12c..f192fc8c55 100644 --- a/pr/3331/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html +++ b/pr/3331/docs/iroh_relay/protos/relay/enum.ClientToRelayMsg.html @@ -1,19 +1,19 @@ -ClientToRelayMsg in iroh_relay::protos::relay - Rust

Enum ClientToRelayMsg

Source
pub enum ClientToRelayMsg {
+ClientToRelayMsg in iroh_relay::protos::relay - Rust

Enum ClientToRelayMsg

Source
pub enum ClientToRelayMsg {
     Ping([u8; 8]),
     Pong([u8; 8]),
-    Datagrams {
-        dst_node_id: NodeId,
-        datagrams: Datagrams,
+    SendPacket {
+        dst_key: NodeId,
+        packet: Bytes,
     },
 }
Expand description

Messages that clients send to relays.

Variants§

§

Ping([u8; 8])

Request from the client to the server to reply to the other side with a RelayToClientMsg::Pong with the given payload.

§

Pong([u8; 8])

Reply to a RelayToClientMsg::Ping from a server with the payload sent previously in the ping.

-
§

Datagrams

Request from the client to relay datagrams to given remote node.

-

Fields

§dst_node_id: NodeId

The remote node to relay to.

-
§datagrams: Datagrams

The datagrams and related metadata to relay.

-

Trait Implementations§

Source§

impl Clone for ClientToRelayMsg

Source§

fn clone(&self) -> ClientToRelayMsg

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ClientToRelayMsg

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ClientToRelayMsg

Source§

fn eq(&self, other: &ClientToRelayMsg) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +
§

SendPacket

Request from the client to relay datagrams to given remote node.

+

Fields

§dst_key: NodeId

The remote node to relay to.

+
§packet: Bytes

The datagrams and related metadata to relay.

+

Trait Implementations§

Source§

impl Clone for ClientToRelayMsg

Source§

fn clone(&self) -> ClientToRelayMsg

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ClientToRelayMsg

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for ClientToRelayMsg

Source§

fn eq(&self, other: &ClientToRelayMsg) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Sink<ClientToRelayMsg> for Client

Source§

type Error = SendError

The type of value produced by the sink when an error occurs.
Source§

fn poll_ready( self: Pin<&mut Self>, cx: &mut Context<'_>, @@ -42,7 +42,7 @@ Each call to this function must be preceded by a successful call to ) -> Poll<Result<(), Self::Error>>

Flush any remaining output from this sink. Read more
Source§

fn poll_close( self: Pin<&mut Self>, cx: &mut Context<'_>, -) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more
Source§

impl Eq for ClientToRelayMsg

Source§

impl StructuralPartialEq for ClientToRelayMsg

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +) -> Poll<Result<(), Self::Error>>

Flush any remaining output and close this sink, if necessary. Read more
Source§

impl Eq for ClientToRelayMsg

Source§

impl StructuralPartialEq for ClientToRelayMsg

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/3331/docs/iroh_relay/protos/relay/enum.Error.html b/pr/3331/docs/iroh_relay/protos/relay/enum.Error.html index 6d3bddaa32..9b7e68e3a1 100644 --- a/pr/3331/docs/iroh_relay/protos/relay/enum.Error.html +++ b/pr/3331/docs/iroh_relay/protos/relay/enum.Error.html @@ -1,4 +1,4 @@ -Error in iroh_relay::protos::relay - Rust

Enum Error

Source
#[non_exhaustive]
pub enum Error { +Error in iroh_relay::protos::relay - Rust

Enum Error

Source
#[non_exhaustive]
pub enum Error { UnexpectedFrame { got: FrameType, expected: FrameType, @@ -49,11 +49,11 @@ span_trace: SpanTrace, }, }
Expand description

Protocol send errors.

-

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UnexpectedFrame

Fields

§expected: FrameType
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

FrameTooLarge

Fields

§frame_len: usize
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Timeout

Fields

§source: Elapsed
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

SerDe

Fields

§source: Error
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

FrameTypeError

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

InvalidPublicKey

Fields

§source: SignatureError
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

InvalidFrame

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

InvalidFrameType

Fields

§frame_type: FrameType
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

InvalidProtocolMessageEncoding

Fields

§source: Utf8Error
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

TooSmall

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error
where - Self: Debug + Display,

Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for Error

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where +

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

UnexpectedFrame

Fields

§expected: FrameType
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

FrameTooLarge

Fields

§frame_len: usize
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

Timeout

Fields

§source: Elapsed
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

SerDe

Fields

§source: Error
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

FrameTypeError

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

InvalidPublicKey

Fields

§source: SignatureError
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

InvalidFrame

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

InvalidFrameType

Fields

§frame_type: FrameType
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

InvalidProtocolMessageEncoding

Fields

§source: Utf8Error
§backtrace: Option<Backtrace>
§span_trace: SpanTrace
§

TooSmall

Fields

§backtrace: Option<Backtrace>
§span_trace: SpanTrace

Trait Implementations§

Source§

impl Debug for Error

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for Error

Source§

fn fmt(&self, __snafu_display_formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for Error
where + Self: Debug + Display,

Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl ErrorCompat for Error

Source§

fn backtrace(&self) -> Option<&Backtrace>

Returns a [Backtrace][] that may be printed.
§

fn iter_chain(&self) -> ChainCompat<'_, '_>
where Self: AsErrorSource,

Returns an iterator for traversing the chain of errors, starting with the current error -and continuing with recursive calls to Error::source. Read more
Source§

impl From<Elapsed> for Error

Source§

fn from(error: Elapsed) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for RecvError

Source§

fn from(error: ProtoError) -> Self

Converts to this type from the input type.
Source§

impl From<FrameTypeError> for Error

Source§

fn from(error: FrameTypeError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where +and continuing with recursive calls to Error::source. Read more

Source§

impl From<Elapsed> for Error

Source§

fn from(error: Elapsed) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for Error

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for RecvError

Source§

fn from(error: ProtoError) -> Self

Converts to this type from the input type.
Source§

impl From<FrameTypeError> for Error

Source§

fn from(error: FrameTypeError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl !RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl !UnwindSafe for Error

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> AsErrorSource for T
where T: Error + 'static,

§

fn as_error_source(&self) -> &(dyn Error + 'static)

For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method diff --git a/pr/3331/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html b/pr/3331/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html index 423739a535..2df2bb14b9 100644 --- a/pr/3331/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html +++ b/pr/3331/docs/iroh_relay/protos/relay/enum.RelayToClientMsg.html @@ -1,7 +1,7 @@ -RelayToClientMsg in iroh_relay::protos::relay - Rust

Enum RelayToClientMsg

Source
pub enum RelayToClientMsg {
-    Datagrams {
-        remote_node_id: NodeId,
-        datagrams: Datagrams,
+RelayToClientMsg in iroh_relay::protos::relay - Rust

Enum RelayToClientMsg

Source
pub enum RelayToClientMsg {
+    ReceivedPacket {
+        src_key: NodeId,
+        content: Bytes,
     },
     NodeGone(NodeId),
     Health {
@@ -14,9 +14,9 @@
     Ping([u8; 8]),
     Pong([u8; 8]),
 }
Expand description

The messages that a relay sends to clients or the clients receive from the relay.

-

Variants§

§

Datagrams

Represents datagrams sent from relays (originally sent to them by another client).

-

Fields

§remote_node_id: NodeId

The NodeId of the original sender.

-
§datagrams: Datagrams

The datagrams and related metadata.

+

Variants§

§

ReceivedPacket

Represents datagrams sent from relays (originally sent to them by another client).

+

Fields

§src_key: NodeId

The NodeId of the original sender.

+
§content: Bytes

The received packet bytes.

§

NodeGone(NodeId)

Indicates that the client identified by the underlying public key had previously sent you a packet but has now disconnected from the relay.

§

Health

A one-way message from relay to client, declaring the connection health state.

@@ -35,9 +35,9 @@ than a few seconds.

other side with a ClientToRelayMsg::Pong with the given payload.

§

Pong([u8; 8])

Reply to a ClientToRelayMsg::Ping from a client with the payload sent previously in the ping.

-

Implementations§

Source§

impl RelayToClientMsg

Source

pub fn typ(&self) -> FrameType

Returns this frame’s corresponding frame type.

-

Trait Implementations§

Source§

impl Clone for RelayToClientMsg

Source§

fn clone(&self) -> RelayToClientMsg

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RelayToClientMsg

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RelayToClientMsg

Source§

fn eq(&self, other: &RelayToClientMsg) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl Eq for RelayToClientMsg

Source§

impl StructuralPartialEq for RelayToClientMsg

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where +

Implementations§

Source§

impl RelayToClientMsg

Source

pub fn typ(&self) -> FrameType

Returns this frame’s corresponding frame type.

+

Trait Implementations§

Source§

impl Clone for RelayToClientMsg

Source§

fn clone(&self) -> RelayToClientMsg

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RelayToClientMsg

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for RelayToClientMsg

Source§

fn eq(&self, other: &RelayToClientMsg) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, +and should not be overridden without very good reason.
Source§

impl Eq for RelayToClientMsg

Source§

impl StructuralPartialEq for RelayToClientMsg

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( diff --git a/pr/3331/docs/iroh_relay/protos/relay/index.html b/pr/3331/docs/iroh_relay/protos/relay/index.html index c47e742a42..9046e76101 100644 --- a/pr/3331/docs/iroh_relay/protos/relay/index.html +++ b/pr/3331/docs/iroh_relay/protos/relay/index.html @@ -1,12 +1,12 @@ -iroh_relay::protos::relay - Rust

Module relay

Source
Expand description

This module implements the send/recv relaying protocol.

+iroh_relay::protos::relay - Rust

Module relay

Source
Expand description

This module implements the send/recv relaying protocol.

Protocol flow:

-

Structs§

Datagrams
One or multiple datagrams being transferred via the relay.

Enums§

ClientToRelayMsg
Messages that clients send to relays.
Error
Protocol send errors.
RelayToClientMsg
The messages that a relay sends to clients or the clients receive from the relay.

Constants§

MAX_PACKET_SIZE
The maximum size of a packet sent over relay. +

Enums§

ClientToRelayMsg
Messages that clients send to relays.
Error
Protocol send errors.
RelayToClientMsg
The messages that a relay sends to clients or the clients receive from the relay.

Constants§

MAX_PACKET_SIZE
The maximum size of a packet sent over relay. (This only includes the data bytes visible to magicsock, not -including its on-wire framing overhead)
MAX_PAYLOAD_SIZE
Maximum size a datagram payload is allowed to be.
\ No newline at end of file +including its on-wire framing overhead)

\ No newline at end of file diff --git a/pr/3331/docs/iroh_relay/protos/relay/sidebar-items.js b/pr/3331/docs/iroh_relay/protos/relay/sidebar-items.js index 1ea2231893..f47702e9b8 100644 --- a/pr/3331/docs/iroh_relay/protos/relay/sidebar-items.js +++ b/pr/3331/docs/iroh_relay/protos/relay/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"constant":["MAX_PACKET_SIZE","MAX_PAYLOAD_SIZE"],"enum":["ClientToRelayMsg","Error","RelayToClientMsg"],"struct":["Datagrams"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"constant":["MAX_PACKET_SIZE"],"enum":["ClientToRelayMsg","Error","RelayToClientMsg"]}; \ No newline at end of file diff --git a/pr/3331/docs/iroh_relay/protos/relay/struct.Datagrams.html b/pr/3331/docs/iroh_relay/protos/relay/struct.Datagrams.html deleted file mode 100644 index e4272fa24f..0000000000 --- a/pr/3331/docs/iroh_relay/protos/relay/struct.Datagrams.html +++ /dev/null @@ -1,44 +0,0 @@ -Datagrams in iroh_relay::protos::relay - Rust

Struct Datagrams

Source
pub struct Datagrams {
-    pub ecn: Option<EcnCodepoint>,
-    pub segment_size: Option<u16>,
-    pub contents: Bytes,
-}
Expand description

One or multiple datagrams being transferred via the relay.

-

This type is modeled after [quinn_proto::Transmit] -(or even more similarly quinn_udp::Transmit, but we don’t depend on that library here).

-

Fields§

§ecn: Option<EcnCodepoint>

Explicit congestion notification bits

-
§segment_size: Option<u16>

The segment size if this transmission contains multiple datagrams. -This is None if the transmit only contains a single datagram

-
§contents: Bytes

The contents of the datagram(s)

-

Trait Implementations§

Source§

impl Clone for Datagrams

Source§

fn clone(&self) -> Datagrams

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Datagrams

Source§

fn fmt(&self, __derive_more_f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<T: AsRef<[u8]>> From<T> for Datagrams

Source§

fn from(bytes: T) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for Datagrams

Source§

fn eq(&self, other: &Datagrams) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, -and should not be overridden without very good reason.
Source§

impl Eq for Datagrams

Source§

impl StructuralPartialEq for Datagrams

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where - T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where - T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where - T: 'a,

§

fn implicit( - self, - class: Class, - constructed: bool, - tag: u32, -) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where - T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where - T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where - T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T> CompatExt for T

§

fn compat(self) -> Compat<T>

Applies the [Compat] adapter by value. Read more
§

fn compat_ref(&self) -> Compat<&T>

Applies the [Compat] adapter by shared reference. Read more
§

fn compat_mut(&mut self) -> Compat<&mut T>

Applies the [Compat] adapter by mutable reference. Read more
Source§

impl<T> DynClone for T
where - T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
§

impl<Q, K> Equivalent<K> for Q
where - Q: Eq + ?Sized, - K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

-
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an -Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an -Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where - U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

-

That is, this conversion is whatever the implementation of -From<T> for U chooses to do.

-
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where - T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where - U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where - U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where - V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where - S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a -[WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where - T: 'static,

§

impl<T> MaybeSendSync for T

\ No newline at end of file diff --git a/pr/3331/docs/iroh_relay/server/index.html b/pr/3331/docs/iroh_relay/server/index.html index 4f860d681f..871f9a4147 100644 --- a/pr/3331/docs/iroh_relay/server/index.html +++ b/pr/3331/docs/iroh_relay/server/index.html @@ -1,4 +1,4 @@ -iroh_relay::server - Rust

Module server

Source
Available on crate feature server only.
Expand description

A fully-fledged iroh-relay server over HTTP or HTTPS.

+iroh_relay::server - Rust

Module server

Source
Available on crate feature server only.
Expand description

A fully-fledged iroh-relay server over HTTP or HTTPS.

This module provides an API to run a full fledged iroh-relay server. It is primarily used by the iroh-relay binary in this crate. It can be used to run a relay server in other locations however.

diff --git a/pr/3331/docs/search-index.js b/pr/3331/docs/search-index.js index c0633236eb..ec6139e067 100644 --- a/pr/3331/docs/search-index.js +++ b/pr/3331/docs/search-index.js @@ -1,4 +1,4 @@ -var searchIndex = new Map(JSON.parse('[["bulk",{"t":"HHHHH","n":["collect_and_print","main","run_iroh","run_quinn","run_s2n"],"q":[[0,"bulk"],[5,"iroh_metrics::base"],[6,"iroh_bench"],[7,"n0_snafu::error"],[8,"iroh_bench::s2n"]],"i":"`````","f":"{{{d{b}}{d{f}}}h}{{}h}{j{{l{h}}}}0{n{{l{h}}}}","D":"`","p":[[1,"str"],[1,"reference",null,null,1],[10,"MetricsGroup",5],[1,"unit"],[5,"Opt",6],[8,"Result",7],[5,"Opt",8]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAAUAAQAAAAUA","P":[]}],["iroh",{"t":"PPEPGTFIFFEFFFFRKNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNOCCNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNCCNOCNNNNNNMCNNONONNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNOOOOOOOOSSSSCCSSSHHHHSSHHHPFPKFGFKGFTPPFFPPGPPPFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNCNNNNNONNCNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFSSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNSSPPPPPSSGFFFFFPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFSSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTTFFFFPGKPGPFPGFTTTPFPFPPPGFGFFPFPGPPPPPPFGGKKFKPPPFFGPPPPPPSPPFFTTTPFGKTTPFFTPPTTPPFTTPPPPFFPTGFPPPPPPPFGPGGFPPGPFFPPGFTTPPGFFGPPGFTPPPFFPFPFPPPPFFPFGFFPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONONNNOOOMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNOOONNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNONNONOONOOOONNNONNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNONNNNNNOOONOOONOOONNNONNNOOONNNNNNNNNNOONNOOONMNMNMNNNNNNNOOONNNONNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNONNNNNNNOONMNNONMNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNONMNNONOONOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFEFFNOOOOOOOONNNNNNNNNNNOOONNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNOOOONNNNONNNNNNNNNNNNNNNONNNNNNNNNNOOOONNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONNNNNNNNNNNNNNNNOOOOOOONNNNPFFGPPFFFNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNOONNOONNONOOONNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNPGPGPSPPPPPGPFFKFPPGPPFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNONNNNNNNNMNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOGFPKPPKFFPNNMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOFFNNNNNNNNNNNNNNNNNNNNNNNNNNOONONHHNNNNNNNNN","n":["Decode","DecodeInvalidLength","Endpoint","Key","KeyParsingError","LENGTH","NodeAddr","NodeId","PublicKey","RelayMap","RelayMode","RelayNode","RelayUrl","RelayUrlParseError","SecretKey","Value","Watcher","__clone_box","","","","","","as_bytes","as_error_source","","as_ref","backtrace","","borrow","","","","","","","","","borrow_mut","","","","","","","","cause","","clone","","","","","","clone_into","","","","","","clone_to_uninit","","","","","","cmp","","","","compare","","","","compat","","","","","","","","compat_mut","","","","","","","","compat_ref","","","","","","","","contains_node","defaults","deref","","","","","","","","","deref_mut","","","","","","","","description","","deserialize","","","","","direct_addresses","","discovery","dns","drop","","","","","","","","empty","endpoint","eq","","","","","equivalent","","","","","","","","","","","","","","","fmt","","","","","","","","","","","","","","fmt_short","from","","","","","","","","","","","","","","","","","","","","","","from_bytes","","from_iter","","from_parts","from_ref","","","","","","from_str","","","from_z32","generate","get","get_node","hash","","in_current_span","","init","","","","","","","","initialized","into","","","","","","","","is_empty","","len","map","metrics","net_report","new","node_id","node_info","nodes","or","partial_cmp","","","","poll_updated","protocol","public","","quic","relay_url","","secret","serialize","","","","","sign","source","","stream","stream_updates_only","test_utils","to_bytes","to_owned","","","","","","to_string","","","","","","to_z32","try_from","","","","","","","","","","","try_into","","","","","","","","type_id","","","","","","","","updated","url","urls","verify","vzip","","","","","","","","with_direct_addresses","with_relay_url","backtrace","","","source","","span_trace","","","DEFAULT_HTTPS_PORT","DEFAULT_HTTP_PORT","DEFAULT_METRICS_PORT","DEFAULT_RELAY_QUIC_PORT","prod","staging","AP_RELAY_HOSTNAME","EU_RELAY_HOSTNAME","NA_RELAY_HOSTNAME","default_ap_relay_node","default_eu_relay_node","default_na_relay_node","default_relay_map","EU_RELAY_HOSTNAME","NA_RELAY_HOSTNAME","default_eu_relay_node","default_na_relay_node","default_relay_map","AttrFromString","ConcurrentDiscovery","DecodingError","Discovery","DiscoveryContext","DiscoveryError","DiscoveryItem","IntoDiscovery","IntoDiscoveryError","Lagged","MAX_LENGTH","NoResults","NoServiceConfigured","NodeData","NodeInfo","NotAnIrohRecord","NumLabels","ParseError","UnexpectedFormat","User","","UserData","Utf8","__clone_box","","","","add","add_direct_addresses","as_error_source","","","","as_ref","backtrace","","","","borrow","","","","","","","","","","borrow_mut","","","","","","","","","","cause","","","","clear_direct_addresses","clone","","","","clone_into","","","","clone_to_uninit","","","","cmp","compare","compat","","","","","","","","","","compat_mut","","","","","","","","","","compat_ref","","","","","","","","","","data","default","","deref","","","","","","","","","","","","deref_mut","","","","","","","","","","","description","","","","direct_addresses","dns","dns_resolver","drop","","","","","","","","","","empty","eq","","","equivalent","","","","","","","","","fmt","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","from_err","","from_err_box","","from_parts","from_pkarr_signed_packet","from_ref","","","","from_services","from_str","from_txt_lookup","hash","in_current_span","","","","init","","","","","","","","","","into","","","","","","","","","","into_discovery","","into_node_addr","","last_updated","mdns","new","","","node_id","","","node_info","partial_cmp","pkarr","provenance","publish","","relay_url","resolve","","secret_key","set_relay_url","set_user_data","source","","","","static_provider","subscribe","","to_node_addr","","to_owned","","","","to_pkarr_signed_packet","to_string","","","","","to_txt_strings","try_from","","","","","","","","","","","try_into","","","","","","","","","","type_id","","","","","","","","","","user_data","","val","vzip","","","","","","","","","","with_direct_addresses","","with_relay_url","","with_user_data","","backtrace","","","node_id","provenance","source","span_trace","","","backtrace","provenance","source","span_trace","backtrace","","","","","","key","label","num_labels","s","source","","span_trace","","","","","","DnsDiscovery","DnsDiscoveryBuilder","N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING","borrow","","borrow_mut","","build","builder","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","dns_resolver","drop","","fmt","","from","","init","","into","","into_discovery","","n0_dns","resolve","try_from","","try_into","","type_id","","vzip","","MdnsDiscovery","MdnsDiscoveryBuilder","NAME","borrow","","borrow_mut","","builder","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","drop","","fmt","","from","","init","","into","","into_discovery","","new","publish","resolve","subscribe","try_from","","try_into","","type_id","","vzip","","DEFAULT_PKARR_TTL","DEFAULT_REPUBLISH_INTERVAL","Encoding","HttpPayload","HttpRequest","HttpSend","InvalidRelayUrl","N0_DNS_PKARR_RELAY_PROD","N0_DNS_PKARR_RELAY_STAGING","PkarrError","PkarrPublisher","PkarrPublisherBuilder","PkarrRelayClient","PkarrResolver","PkarrResolverBuilder","PublicKey","Verify","__clone_box","","","as_error_source","backtrace","borrow","","","","","","borrow_mut","","","","","","build","","builder","","cause","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","","","compat_mut","","","","","","compat_ref","","","","","","deref","","","","","","deref_mut","","","","","","description","dht","dns_resolver","","drop","","","","","","fmt","","","","","","","from","","","","","","from_ref","","","in_current_span","init","","","","","","into","","","","","","into_discovery","","","","n0_dns","","new","publish","","republish_interval","resolve","","source","to_owned","","","to_string","try_from","","","","","","try_into","","","","","","ttl","type_id","","","","","","update_node_data","vzip","","","","","","with_dns_resolver","source","","","","","status","url","Builder","DhtDiscovery","__clone_box","borrow","","borrow_mut","","build","builder","client","clone","clone_into","clone_to_uninit","compat","","compat_mut","","compat_ref","","default","","deref","","deref_mut","","dht","drop","","fmt","","from","","from_ref","include_direct_addresses","init","","initial_publish_delay","into","","into_discovery","","n0_dns_pkarr_relay","no_publish","pkarr_relay","publish","republish_delay","resolve","secret_key","to_owned","try_from","","try_into","","ttl","type_id","","vzip","","PROVENANCE","StaticProvider","__clone_box","add_node_info","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","default","deref","deref_mut","drop","fmt","from","from_node_info","from_ref","get_node_info","init","into","into_discovery","new","publish","remove_node_info","resolve","set_node_info","to_owned","try_from","try_into","type_id","vzip","DnsResolver","N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING","__clone_box","borrow","borrow_mut","clear_cache","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","default","deref","deref_mut","drop","fmt","from","","from_ref","init","into","lookup_ipv4","lookup_ipv4_ipv6","lookup_ipv4_ipv6_staggered","lookup_ipv4_staggered","lookup_ipv6","lookup_ipv6_staggered","lookup_node_by_domain_name","lookup_node_by_domain_name_staggered","lookup_node_by_id","lookup_node_by_id_staggered","lookup_txt","new","reset","resolve","resolve_host","to_owned","try_from","try_into","type_id","vzip","with_nameserver","AEAD_LIMIT_REACHED","APPLICATION_ERROR","Accept","AcceptBi","AcceptUni","AckFrequencyConfig","AddNodeAddr","AddNodeAddrError","AeadKey","All","AlpnError","App","ApplicationClose","ApplicationClosed","BindError","Builder","CONNECTION_ID_LIMIT_ERROR","CONNECTION_REFUSED","CRYPTO_BUFFER_EXCEEDED","CallMeMaybe","Chunk","CidsExhausted","ClosedStream","","","Connect","ConnectError","ConnectOptions","ConnectWithOptsError","Connecting","Connection","","ConnectionClose","ConnectionClosed","ConnectionError","","ConnectionLost","","","","","ConnectionStats","ConnectionType","ControlMsg","Controller","ControllerFactory","CryptoError","CryptoServerConfig","Custom","Default","Direct","DirectAddr","DirectAddrInfo","DirectAddrType","Disabled","","Discover","Discovery","","DiscoveryStart","ENV_FORCE_STAGING_RELAYS","Empty","EmptyPruned","Endpoint","ExportKeyingMaterialError","FINAL_SIZE_ERROR","FLOW_CONTROL_ERROR","FRAME_ENCODING_ERROR","FinishedEarly","FrameStats","GetMappingAddressError","HandshakeTokenKey","INTERNAL_ERROR","INVALID_TOKEN","IllegalOrderedRead","Incoming","IncomingFuture","KEY_UPDATE_ERROR","Local","LocallyClosed","MAX","MAX_SIZE","MagicSpawn","Mixed","MtuDiscoveryConfig","NO_ERROR","NO_VIABLE_PATH","NamedApp","NoAddress","","None","OpenBi","OpenUni","OwnAddress","PROTOCOL_VIOLATION","PathSelection","PathStats","Ping","Pong","Portmapped","Qad","Qad4LocalPort","Quinn","Read","ReadDatagram","ReadError","","ReadExactError","ReadToEndError","RecvStream","Relay","","RelayMode","RelayOnly","RemoteInfo","RemoteNodeIdError","Reset","","ResetError","RetryError","STREAM_LIMIT_ERROR","STREAM_STATE_ERROR","Saved","SelfConnect","SendDatagramError","SendStream","ServerConfig","Source","Staging","Stopped","StoppedError","StreamId","TRANSPORT_PARAMETER_ERROR","TimedOut","TooLarge","TooLong","TransportConfig","TransportError","","TransportErrorCode","Udp","UdpStats","Unavailable","Unknown","UnknownHandshake","UnsupportedByPeer","UnsupportedVersion","VarInt","VersionMismatch","WeakConnectionHandle","WriteError","Written","ZeroRttAccepted","ZeroRttRejected","","","","__clone_box","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","accept","","accept_bi","accept_uni","accept_with","ack_eliciting_threshold","ack_frequency","ack_frequency_config","acks","add_discovery","add_node_addr","add_node_addr_with_source","addr","","addrs","aead_from_hkdf","allow_spin","alpn","","alpns","as_error_source","","","","","","","","","","","","","","","","","","backtrace","","","","","","","bind","bind_addr_v4","bind_addr_v6","black_hole_cooldown","black_holes_detected","borrow","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","bound_sockets","build","builder","bytes","","","cause","","","","","","","chunks","clear_discovery","clone","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","clone_box","clone_into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","clone_to_uninit","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","close","","close_reason","closed","cmp","","","","code","compare","","","","compat","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","compat_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","compat_ref","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","congestion_controller_factory","congestion_events","congestion_state","conn_type","","connect","connect_with_opts","connection_close","crypto","","","crypto_buffer_size","current_mtu","cwnd","data_blocked","datagram","datagram_receive_buffer_size","datagram_send_buffer_size","datagram_send_buffer_space","datagrams","decode","","","default","","","","","","","","","","","","","","default_relay_mode","deref","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","deref_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","description","","","","","","","deserialize","","","","","dir","direct_addresses","discovery","","discovery_dht","discovery_local_network","discovery_n0","discovery_stream","dns_resolver","","drop","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","enable_segmentation_offload","encode","","","eq","","","","","","","","","","","","","","","","","","","","","","","","","","","equivalent","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","error_code","","export_keying_material","finish","fmt","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","force_staging_infra","frame","frame_rx","frame_tx","frame_type","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from_ref","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from_u32","from_u64","from_u64_unchecked","handshake_data","","handshake_done","has_send_address","hash","","","","","home_relay","id","","ignore","immediate_ack","in_current_span","","","","","","","","","","","","","","","","","","incoming_buffer_size","incoming_buffer_size_total","index","init","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","initial_keys","initial_mtu","initial_rtt","initial_window","initiator","insecure_skip_relay_cert_verify","interval","into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","into_0rtt","into_any","into_future","","","","","","","","","","into_incoming","into_inner","ios","is_0rtt","is_alive","is_closed","keep_alive_interval","keylog","known_nodes","last_alive","last_control","last_payload","last_received","last_used","latency","","local_ip","lost_bytes","lost_packets","lost_plpmtud_probes","max_ack_delay","max_concurrent_bidi_streams","max_concurrent_uni_streams","max_data","max_datagram_size","max_idle_timeout","max_incoming","max_stream_data","max_streams_bidi","max_streams_uni","metrics","migration","min_mtu","minimum_change","mtu_discovery_config","network_change","network_path_changed","new","","","new_connection_id","new_token","node_addr","node_id","","observed_addr","offset","on_ack","on_congestion_event","on_end_acks","on_mtu_update","on_sent","open","open_bi","open_uni","packet_threshold","partial_cmp","","","","path","path_challenge","path_response","path_selection","peer_identity","persistent_congestion_threshold","ping","poll","","","","","","","","","poll_flush","poll_read","","poll_shutdown","poll_write","","preferred_address_v4","preferred_address_v6","priority","proxy_from_env","proxy_url","read","read_chunk","read_chunks","read_datagram","read_exact","read_to_end","reason","","","receive_observed_address_reports","receive_window","received_reset","refuse","relay_map","relay_mode","relay_url","remote_address","remote_address_validated","remote_info","remote_info_iter","remote_node_id","reordering_threshold","reset","reset_stream","retire_connection_id","retry","retry_tag","retry_token_lifetime","rtt","","saturating_add","seal","secret_key","","send_datagram","send_fairness","send_observed_address_reports","send_window","sent_packets","sent_plpmtud_probes","serialize","","","","","set_alpns","set_max_concurrent_bi_streams","set_max_concurrent_uni_streams","set_priority","set_receive_window","set_user_data_for_discovery","source","","","","","","","","","","","","","","","sources","","stable_id","start_session","stats","stop","stop_sending","stopped","stream","stream_data_blocked","stream_receive_window","streams_blocked_bidi","streams_blocked_uni","time_source","time_threshold","to_owned","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","to_string","","","","","","","","","","","","","","","","","","","","","","","","","","","token_key","transport","transport_config","","try_from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","try_poll","","","","","","","typ","type_id","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","udp_rx","udp_tx","upper_bound","user_data_for_discovery","validation_token","validation_token_config","vzip","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","window","with_additional_alpns","with_crypto","with_single_cert","with_transport_config","write","write_all","write_all_chunks","write_chunk","write_chunks","backtrace","","","pruned","span_trace","","","backtrace","","","source","span_trace","","","backtrace","","source","","span_trace","","backtrace","","source","","span_trace","","backtrace","","","","source","","","span_trace","","","","backtrace","","","source","","span_trace","","","name","","EndpointMetrics","MagicsockMetrics","NetReportMetrics","PortmapMetrics","RelayMetrics","__clone_box","accepts","actor_link_change","actor_tick_direct_addr_heartbeat","actor_tick_main","actor_tick_msg","actor_tick_other","actor_tick_portmap_changed","actor_tick_re_stun","as_iterable","","","borrow","","","","borrow_mut","","","","bytes_recv","bytes_rx_ratelimited_total","bytes_sent","clone","clone_into","clone_to_uninit","compat","","","","compat_mut","","","","compat_ref","","","","connection_became_direct","connection_handshake_success","conns_rx_ratelimited_total","default","","","","deref","","","","deref_mut","","","","deserialize","","","disco_packets_dropped","disco_packets_recv","disco_packets_sent","disconnects","drop","","","","external_address_updated","field_count","","","field_ref","","","fmt","","","","from","","","","from_ref","got_ping","groups","groups_cloned","init","","","","into","","","","local_port_updates","magicsock","mapping_attempts","mapping_failures","name","","","","net_report","nodes_contacted","nodes_contacted_directly","num_direct_conns_added","num_direct_conns_removed","num_relay_conns_added","num_relay_conns_removed","other_packets_dropped","other_packets_recv","other_packets_sent","pcp_available","pcp_probes","portmapper","probes_started","recv_data_ipv4","recv_data_ipv6","recv_data_relay","recv_datagrams","recv_disco_bad_key","recv_disco_bad_parse","recv_disco_call_me_maybe","recv_disco_call_me_maybe_bad_disco","recv_disco_ping","recv_disco_pong","recv_disco_relay","recv_disco_udp","recv_gro_datagrams","relay_home_change","send_data","send_data_network_down","send_disco_relay","send_disco_udp","send_ipv4","send_ipv6","send_packets_dropped","send_packets_recv","send_packets_sent","send_relay","send_relay_error","sent_disco_call_me_maybe","sent_disco_ping","sent_disco_pong","sent_disco_relay","sent_disco_udp","sent_pong","serialize","","","to_owned","try_from","","","","try_into","","","","type_id","","","","unique_client_keys","unknown_frames","update_direct_addrs","upnp_available","upnp_gateway_updated","upnp_probes","upnp_probes_failed","vzip","","","","Https","Metrics","Options","Probe","QadIpv4","QadIpv6","QuicConfig","RelayLatencies","Report","__clone_box","","","","","as_iterable","as_protocols","borrow","","","","","","borrow_mut","","","","","","captive_portal","client_config","clone","","","","","clone_into","","","","","clone_to_uninit","","","","","cmp","compare","compat","","","","","","compat_mut","","","","","","compat_ref","","","","","","default","","","","deref","","","","","","deref_mut","","","","","","deserialize","disabled","drop","","","","","","ep","eq","","","equivalent","","","","","","","","","field_count","field_ref","fmt","","","","","","","","from","","","","","","from_ref","","","","","global_v4","global_v6","has_udp","https","init","","","","","","insecure_skip_relay_cert_verify","into","","","","","","ipv4","ipv6","iter","mapping_varies_by_dest","mapping_varies_by_dest_ipv4","mapping_varies_by_dest_ipv6","name","partial_cmp","preferred_relay","quic_config","relay_latency","reports","reports_full","serialize","to_owned","","","","","to_string","","try_from","","","","","","try_into","","","","","","type_id","","","","","","udp_v4","udp_v6","vzip","","","","","","AttrFromString","DecodingError","","EncodingError","FailedBuildingPacket","IROH_TXT_NAME","InvalidEncodingZ32","InvalidLabel","InvalidLength","InvalidSignature","InvalidTxtEntry","LookupError","LookupFailed","MaxLengthExceededError","NodeData","NodeIdExt","NodeInfo","NotAnIrohRecord","NumLabels","ParseError","","UnexpectedFormat","UserData","Utf8","as_error_source","","","","backtrace","","","","borrow","","","","borrow_mut","","","","cause","","","","compat","","","","compat_mut","","","","compat_ref","","","","data","deref","","","","deref_mut","","","","description","","","","drop","","","","fmt","","","","","","","","from","","","","","from_z32","in_current_span","","","","init","","","","into","","","","node_id","source","","","","to_string","","","","to_z32","try_from","","","","try_into","","","","type_id","","","","vzip","","","","backtrace","","","len","source","","span_trace","","","backtrace","","source","","span_trace","","backtrace","","","source","","","span_trace","","","backtrace","","","","","","key","label","num_labels","s","source","","span_trace","","","","","","AcceptError","AccessLimit","Connection","DynProtocolHandler","MissingRemoteNodeId","NotAllowed","ProtocolHandler","Router","RouterBuilder","User","__clone_box","","accept","","","","","as_error_source","backtrace","borrow","","","","borrow_mut","","","","builder","cause","clone","","clone_into","","clone_to_uninit","","compat","","","","compat_mut","","","","compat_ref","","","","deref","","","","deref_mut","","","","description","drop","","","","endpoint","","fmt","","","","","from","","","","","","","","","from_err","from_ref","","in_current_span","init","","","","into","","","","is_shutdown","new","","on_connecting","","","","shutdown","","","","","source","spawn","to_owned","","to_string","try_from","","","","try_into","","","","type_id","","","","vzip","","","","backtrace","source","","","span_trace","CleanupDropGuard","DnsPkarrServer","borrow","","borrow_mut","","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","discovery","dns_resolver","drop","","fmt","","from","","init","","into","","nameserver","node_origin","on_node","pkarr_url","run","run_relay_server","run_relay_server_with","run_with_origin","try_from","","try_into","","type_id","","vzip",""],"q":[[0,"iroh"],[323,"iroh::KeyParsingError"],[331,"iroh::defaults"],[337,"iroh::defaults::prod"],[344,"iroh::defaults::staging"],[349,"iroh::discovery"],[677,"iroh::discovery::DiscoveryError"],[686,"iroh::discovery::IntoDiscoveryError"],[690,"iroh::discovery::ParseError"],[708,"iroh::discovery::dns"],[751,"iroh::discovery::mdns"],[793,"iroh::discovery::pkarr"],[954,"iroh::discovery::pkarr::PkarrError"],[961,"iroh::discovery::pkarr::dht"],[1019,"iroh::discovery::static_provider"],[1053,"iroh::dns"],[1097,"iroh::endpoint"],[3052,"iroh::endpoint::AddNodeAddrError"],[3059,"iroh::endpoint::AlpnError"],[3066,"iroh::endpoint::BindError"],[3072,"iroh::endpoint::ConnectError"],[3078,"iroh::endpoint::ConnectWithOptsError"],[3089,"iroh::endpoint::GetMappingAddressError"],[3097,"iroh::endpoint::Source"],[3099,"iroh::metrics"],[3275,"iroh::net_report"],[3462,"iroh::discovery"],[3463,"iroh::node_info"],[3464,"iroh::discovery"],[3465,"iroh::node_info"],[3479,"iroh::discovery"],[3481,"iroh::node_info"],[3483,"iroh::discovery"],[3484,"iroh::node_info"],[3485,"iroh::discovery"],[3486,"iroh::node_info"],[3518,"iroh::discovery"],[3519,"iroh::node_info"],[3561,"iroh::discovery"],[3562,"iroh::node_info"],[3587,"iroh::node_info::DecodingError"],[3596,"iroh::node_info::EncodingError"],[3602,"iroh::node_info::LookupError"],[3611,"iroh::discovery::ParseError"],[3629,"iroh::protocol"],[3750,"iroh::protocol::AcceptError"],[3755,"iroh::test_utils"],[3799,"dyn_clone::sealed"],[3800,"iroh_base::key"],[3801,"core::error"],[3802,"backtrace::capture"],[3803,"core::option"],[3804,"iroh_base::relay_url"],[3805,"iroh_base::node_addr"],[3806,"iroh_relay::relay_map"],[3807,"core::cmp"],[3808,"async_compat"],[3809,"core::result"],[3810,"serde::de"],[3811,"core::net::socket_addr"],[3812,"core::iter::traits::iterator"],[3813,"alloc::collections::btree::set"],[3814,"core::fmt"],[3815,"alloc::string"],[3816,"ed25519_dalek::verifying"],[3817,"data_encoding"],[3818,"signature::error"],[3819,"ed25519_dalek::signing"],[3820,"iroh_relay::node_info"],[3821,"iroh::magicsock::node_map::node_state"],[3822,"iroh_base::ticket::node"],[3823,"url"],[3824,"core::iter::traits::collect"],[3825,"rand_core"],[3826,"n0_watcher"],[3827,"core::clone"],[3828,"alloc::sync"],[3829,"core::hash"],[3830,"core::ops::function"],[3831,"core::marker"],[3832,"core::task::wake"],[3833,"core::task::poll"],[3834,"serde::ser"],[3835,"ed25519"],[3836,"core::any"],[3837,"n0_snafu::spantrace"],[3838,"iroh_relay::dns"],[3839,"alloc::boxed"],[3840,"pkarr::signed_packet"],[3841,"alloc::vec"],[3842,"futures_lite::stream"],[3843,"core::str::error"],[3844,"core::time"],[3845,"pkarr::keys"],[3846,"reqwest::error"],[3847,"http::status"],[3848,"pkarr::client"],[3849,"core::convert"],[3850,"hickory_proto::runtime::tokio_runtime"],[3851,"hickory_resolver::name_server::connection_provider"],[3852,"hickory_resolver::resolver"],[3853,"core::net::ip_addr"],[3854,"reqwest::dns::resolve"],[3855,"core::future::future"],[3856,"core::pin"],[3857,"iroh_quinn_proto::connection"],[3858,"iroh_quinn::connection"],[3859,"iroh_quinn_proto::config"],[3860,"iroh_quinn_proto::config::transport"],[3861,"iroh_quinn_proto::varint"],[3862,"iroh_quinn_proto::connection::stats"],[3863,"iroh::magicsock"],[3864,"iroh_quinn_proto::crypto"],[3865,"iroh_quinn_proto::congestion"],[3866,"std::time"],[3867,"iroh_quinn_proto::connection::assembler"],[3868,"bytes::bytes"],[3869,"iroh_quinn_proto::connection::streams::send"],[3870,"iroh_quinn::recv_stream"],[3871,"iroh_quinn::send_stream"],[3872,"iroh_quinn_proto::connection::streams"],[3873,"iroh::magicsock::node_map"],[3874,"iroh_quinn_proto::frame"],[3875,"iroh_quinn_proto"],[3876,"iroh_quinn_proto::coding"],[3877,"bytes::buf::buf_impl"],[3878,"futures_core::stream"],[3879,"bytes::buf::buf_mut"],[3880,"iroh_quinn::incoming"],[3881,"iroh_quinn_proto::connection::streams::recv"],[3882,"iroh_relay::protos::common"],[3883,"ring::error::unspecified"],[3884,"iroh_quinn_proto::transport_parameters"],[3885,"iroh_quinn_proto::shared"],[3886,"iroh_quinn_proto::connection::paths"],[3887,"std::io::error"],[3888,"tokio::io::read_buf"],[3889,"std::collections::hash::map"],[3890,"rustls_pki_types"],[3891,"rustls::error"],[3892,"iroh_quinn_proto::endpoint"],[3893,"iroh_metrics::metrics"],[3894,"iroh_metrics::iterable"],[3895,"iroh_metrics::base"],[3896,"iroh::net_report::options::imp"],[3897,"iroh::net_report::probes"],[3898,"iroh::net_report::report"],[3899,"iroh::net_report::reportgen"],[3900,"rustls::client::client_conn"],[3901,"iroh::net_report::metrics"],[3902,"iroh_quinn::endpoint"],[3903,"z32"],[3904,"simple_dns::simple_dns_error"],[3905,"hickory_proto::error"],[3906,"tokio::runtime::task::error"],[3907,"iroh::test_utils::dns_and_pkarr_servers"],[3908,"iroh_relay::server"],[3909,"iroh_relay"],[3910,"iroh_relay::defaults"]],"i":"Ab0`0`h`````````El`1AlAnB`BbBd67Ah7807785430217854302180754321754321754321743174317854302178543021785430212`78543302178543021807543144``785430212`7432177744433322211177885433002211777888555444444330222117522475432175375627380785430216785430214226``44`2674316`7514457543158066`5754321783021777785543021785430217854302161277854302144HdHfHh21210``````````````````If`0```````IdIj0``22`2Ih1`3Ib3DlInHn3745Il785604738J`67321584906732196715584358435843885849067321584906732158490673214525844906733215844906732196715`05849067321258455588844458849906677321155844444990677322167674458432848967158490673215849067321Kd3544`65414549`4I`4704277;893`04657:656:;89367::6;2895437:6;2895437:6;2895437537:6;289543767676L`LbLd100210Lf000LhLjLlLnM`Mb413520543210````MhMf1001101010101001010101010101110101010```MlMj1011010101010101010101010111110101010``Jj0000````````00NbNfNh333N`3Nd32514032104354324324325140325140325140325140325140325`105140325514032514032432551403251403214034324213254325514032514032151403245140322NjNnObOfOhOjOn``A@b0A@`10010111101010101010010101010100101000010101101001010A@f`00000000000000000000000000000000```Jb0000000000000000000000000000000000000000AHf0````ADh``AHl`AGn`ABh``444AGh`1`AFlAGbADj`````0`4`ADfAFh4AFn4AGd```````AI`0AGl```41ADn40;AFdACfAEhAGfAFf=ACnDnAGjAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`3ABd220?ACfACh1ACj77ACn;DnADb4ABf94AFhAJfAFjAFlAFnAG`AGbAGdAGjABhAClAHdADhADjADlADnADfAE`7543210ACj00AEfAEhAMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`>AEj?AF`AFdAFfAClADhADjADlADn=:5ACjAFhAFjAFlAFnAG`AGbAGdACd?ACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`AEnAFhAFjAFlAFnAG`AGbAGdACdAFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`AFhAFjAFlAFnAG`AGbAGdACdAFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`3111ACd876:0876AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AChAEh4AB`Dn11ACfAHf1AC`65522669AFdACd3AHh91258AGfAFfAGjAGlACbAEfAHlACjAHn`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`ACl>=<;52AGhACnDnAGlAGnAHhAB`ACj1000101AMbAM`ABnABlAMdAJdAFhAJfAIl0AFjAFlAFnAG`AIn0AGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AChACdAHfAHhAFhAFjAFlAFnAG`AGbAGd9AF`AFfAGhACnDnAGjAGlAGnABhAJbAH`AHbAHdAHfAHhAD`AHjAHlAI`AFh00AFj00AFl00AFn00AG`00AGb00AGd00ACd00AF`00AFf00AGh00ACn00Dn00AGj00AGl00AGn00ABh00AJb00AH`00AHb00AHd00AHf00AHh00AD`00AHj00AHl00AI`0087ABjAInAJdAFh0AJf0AIlAFj0AFl0AFn0AG`08AGb0AGd0AChACd0AF`AFdACfAEhAGfAFfAGh0ACnDnAGj0AGl0AGn0ABh0ACbAEfAC`AJbAJhAJjAH`0AHb0ACl0AHd0AHf0AHh0AD`AHj0AHlACjAB`ADh0ADj0ADl0ADn0AHnABbABdAJlABfADf0AJnABjAE`0AI``AHdAGf0AH`AMbAM`ABnABlAMdAJdAFh0AJfAIlAFj0AFl000AFn0AG`0AInAGb000AGd0AChACd00000AF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABh00ACbAEfAC`AJbAJh0AJjAH`0AHbAClAHd000AHfAHh0AD`AHjAHlACjAB`ADh0ADj00ADl0ADnAHnABbABdAJlABfADf0AJnABjAE`AI`AFhAFjAFlAFnAG`AGbAGdACdAFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`ACd00ABf3ACfDn3AGn<;:8AIlAInABd5AFhAJfAFjAFlAFnAG`AGbAGdAGjABhAClAHdADhADjADlADnADfAE`AC`0AHhAMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AL`ACh0AEnAHhACjAEfAMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnDnAGjAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`5AEnAMbAM`ABnABlAMd>=<;9AJfACdAFdAIlAJdAB`AChACj0ACn00Dn010ABdAEh00ACb66ACfABj8AC`222:09AEf:;<1AHhAHn55==95AF`AEn0000ADd77?ACd5AD`AHjAGf<AMbAM`ABnABlAMdABbAJlABfAJnAInAIl0111AC`02==111ABj22AH`AHbAHdACh06ABdAI`ACjDn33AB`09ACb=ACf06AL`={KlACd}{jACd}{cc{}}000000000000{AHdABh}{AKdABh}2222{AKfAJh}33{AHdAH`}444{AHfAHd}{AKhAHd}{AKjAHd}77{ACdAHh}8888888{AClADh}{ABhADj}{ADhADj};{IhADl}<<<<<<<<{ABhADf}===={{{b{c}}}c{}}0000000000000000000000000000000000{KlACd}{Kf{{C`{ACdAKl}}}}{KfACd}{{{b{AjABf}}}{{C`{{Jl{AKn}}ABh}}}}{{{b{ABj}}}{{Af{{Jl{AKn}}}}}}{ACfj}{{{b{Dn}}}Bj}{{{b{ACd}}{b{Ajc}}}fFf}{{{b{AGn}}{b{Ajc}}}fFf}{{{b{AHh}}{b{Ajc}}}fFf}{{{b{AD`}}{b{Ajc}}}fFf}{{{b{AHj}}{b{Ajc}}}fFf}{{{b{AB`}}}{{`{{El{}{{Ej{{K`{B`}}}}}}}}}}{{{b{AIl}}}AHh}{{{b{AIn}}}AHh}{ABdf}{ACfKf}{{}}00000000000000000{{{b{AjAC`}}Kf}{{b{AjAC`}}}}0{AHhKf}{{}Bl}0000000000000000000000000000000000000000000000000000000000000{{{b{AL`}}Kl{b{ALb}}}{{C`{ALdAJj}}}}{{{b{AjACh}}Hl}{{b{AjACh}}}}{{{b{AjACh}}Mn}{{b{AjACh}}}}{{{b{AEn}}}Kf}{AHhALf}{{ACjBj}ACj}{{{b{AjAEf}}Mn}{{b{AjAEf}}}}{{}c{}}0000000000000000000000000000000000000000000000000000000000000{ABf{{C`{{Dj{ABjAJn}}ABf}}}}{{{Jl{AEn}}}{{Jl{AKn}}}}======{ABdc{}}>>>{AJfALh}{ACdKf}{AFdKf}{{{b{AIl}}}Bj}{{{b{AJd}}}Bj}{{{b{AB`}}}Bj}{{{b{AjACh}}{Af{Mn}}}{{b{AjACh}}}}<{{ACj{K`{An}}}ACj}{ACnAf}00{{{b{Dn}}}{{Af{Mn}}}}{DnAf}20{{{b{ABd}}}{{Af{AA`}}}}{AEhKf}00{{{b{AjACb}}{Af{Mn}}}{{b{AjACb}}}}{{{b{AjACh}}ACd}{{b{AjACh}}}}0{ACfKf}{{{b{ABj}}}{{Af{Bl}}}}{{{b{AjACh}}{Af{ALj}}}{{b{AjACh}}}}{{{b{AjAC`}}Bl}{{b{AjAC`}}}}333{{{b{AB`}}}{{b{ALl}}}}{{{b{AjAC`}}Bj}{{b{AjAC`}}}}{{{b{AjACh}}Hl}{{b{AjACh}}}}{{{b{AjAEf}}Hl}{{b{AjAEf}}}}{{{b{AjACh}}{Af{AEf}}}{{b{AjACh}}}}{{{b{AB`}}}f}{{{b{AJd}}}Bj}{{{Fd{AL`}}{Fd{ADb}}}AC`}{{ALfAIhKf}AHh}{{}AHn}=={{{b{AB`}}}{{`{{El{}{{Ej{{Af{An}}}}}}}}}}{{{b{AB`}}}Kh}{DnKh}{ACfKf}{AF`Kf}{{{b{AjAEn}}AElAElKfBj{b{ALn}}}f}{{{b{AjAEn}}AElAElBjKf}f}{{{b{AjAEn}}AElKfBj{Af{Kf}}}f}{{{b{AjAEn}}Hl}f}{{{b{AjAEn}}AElKfKf}f}{{{b{ADd}}{b{Aj{A`{j}}}}{b{{A`{j}}}}}{{C`{{b{Aj{A`{j}}}}AJh}}}}{{{b{ABj}}}AM`}{{{b{ABj}}}AMb}{{{b{AjACh}}Kl}{{b{AjACh}}}}{{{b{ACd}}{b{ACd}}}{{Af{Bf}}}}{{{b{AHh}}{b{AHh}}}{{Af{Bf}}}}{{{b{AD`}}{b{AD`}}}{{Af{Bf}}}}{{{b{AHj}}{b{AHj}}}{{Af{Bf}}}}{AGfAEh}??{{ACjAHl}ACj}{{{b{ABj}}}{{Af{{Jl{AKn}}}}}}7{ACfKf}{{{AAn{{b{AjAMb}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjAM`}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjABn}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjABl}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjAMd}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjABb}}}}{b{AjGf}}}{{Gh{c}}}{}}{{{AAn{{b{AjAJl}}}}{b{AjGf}}}{{Gh{c}}}{}}{{{AAn{{b{AjABf}}}}{b{AjGf}}}{{Gh{c}}}{}}{{{AAn{{b{AjAJn}}}}{b{AjGf}}}{{Gh{c}}}{}}{{{AAn{{b{AjAIn}}}}{b{AjGf}}}{{Gh{{C`{fAMf}}}}}}{{{b{AjAIl}}{b{AjGf}}{b{Aj{A`{j}}}}}{{Gh{{C`{BlAFl}}}}}}{{{AAn{{b{AjAIl}}}}{b{AjGf}}{b{AjAMh}}}{{Gh{{C`{fAMf}}}}}}2{{{AAn{{b{AjAIn}}}}{b{AjGf}}{b{{A`{j}}}}}{{Gh{{C`{BlAGb}}}}}}{{{AAn{{b{AjAIn}}}}{b{AjGf}}{b{{A`{j}}}}}{{Gh{{C`{BlAMf}}}}}}{{{b{AjAC`}}{Af{AEb}}}{{b{AjAC`}}}}{{{b{AjAC`}}{Af{AEd}}}{{b{AjAC`}}}}{{{b{AIn}}}{{C`{AMjAGj}}}}{ACjACj}{{ACjEb}ACj}{{{b{AjAIl}}{b{Aj{A`{j}}}}}{{C`{{Af{Bl}}AFl}}}}{{{b{AjAIl}}BlBj}{{C`{{Af{AF`}}AFl}}}}{{{b{AjAIl}}{b{Aj{A`{AFb}}}}}{{C`{{Af{Bl}}AFl}}}}{{{b{ABj}}}AMd}{{{b{AjAIl}}{b{Aj{A`{j}}}}}{{C`{fAG`}}}}{{{b{AjAIl}}Bl}{{C`{{K`{j}}AFj}}}}{AH`AFb}{AHbAFb}{AHdD`}{{{b{AjACh}}Bj}{{b{AjACh}}}}{{{b{AjACh}}ACd}{{b{AjACh}}}}{{{b{AjAIl}}}{{C`{{Af{ACd}}AFn}}}}{ABdf}{{{b{AI`}}}Bb}{{ACjAI`}ACj}{DnAf}{{{b{ABd}}}Cf}{{{b{ABd}}}Bj}{{{b{AB`}}Kh}{{Af{Dn}}}}{{{b{AB`}}}{{`{{Ch{}{{Cd{Dn}}}}}}}}{{{b{ABj}}}{{C`{KhAE`}}}}{{{b{AjACb}}ACd}{{b{AjACb}}}}{{{b{AjAIn}}ACd}{{C`{fAGj}}}}{ACfKf}0{ABd{{C`{fAJf}}}}{{{b{AL`}}Kl{b{ALb}}{b{{A`{j}}}}}{{l{j}}}}{{{b{AjAC`}}Mn}{{b{AjAC`}}}}{{{b{ABj}}}Mn}{AEhMn}{{ACdc}ACd{{A@h{ACd}}}}{{{b{ADd}}{b{Aj{K`{j}}}}{b{{A`{j}}}}}{{C`{fAJh}}}}{{ACjAl}ACj}{{{b{AB`}}}{{b{Al}}}}{{{b{ABj}}AFb}{{C`{fAFh}}}}{{{b{AjACh}}Bj}{{b{AjACh}}}}0{{{b{AjACh}}Kf}{{b{AjACh}}}}{AEhKf}0{{{b{AGh}}c}C`Gj}{{{b{ACn}}c}C`Gj}{{{b{Dn}}c}C`Gj}{{{b{AGl}}c}C`Gj}{{{b{AGn}}c}C`Gj}{{{b{AB`}}{K`{{K`{j}}}}}f}{{{b{ABj}}ACd}f}0{{{b{AIn}}AMj}{{C`{fAGj}}}}1{{{b{AB`}}{Af{Id}}}f}{{{b{AFh}}}{{Af{{b{n}}}}}}{{{b{AFj}}}{{Af{{b{n}}}}}}{{{b{AFl}}}{{Af{{b{n}}}}}}{{{b{AFn}}}{{Af{{b{n}}}}}}{{{b{AG`}}}{{Af{{b{n}}}}}}{{{b{AGb}}}{{Af{{b{n}}}}}}{{{b{AGd}}}{{Af{{b{n}}}}}}{{{b{ABh}}}{{Af{{b{n}}}}}}{{{b{ACl}}}{{Af{{b{n}}}}}}{{{b{ADh}}}{{Af{{b{n}}}}}}{{{b{ADj}}}{{Af{{b{n}}}}}}{{{b{ADl}}}{{Af{{b{n}}}}}}{{{b{ADn}}}{{Af{{b{n}}}}}}{{{b{ADf}}}{{Af{{b{n}}}}}}{{{b{AE`}}}{{Af{{b{n}}}}}}{{{b{Dn}}}{{K`{{Dj{AGnMn}}}}}}{ACnAMl}{{{b{ABj}}}Bl}{{{Fd{AL`}}Kl{b{AMn}}}{{Jl{AN`}}}}{{{b{ABj}}}AGf}{{{b{AjAIl}}ACd}{{C`{fAGj}}}}{ACfKf}{{{b{AjAIn}}}{{C`{{Af{ACd}}AGd}}}}11{{{b{AjACh}}ACd}{{b{AjACh}}}}22{{{b{AjAC`}}{Fd{ANb}}}{{b{AjAC`}}}}{{{b{AjACh}}ANd}{{b{AjACh}}}}{bc{}}0000000000000000000000000000000000{bD`}00000000000000000000000000{{{b{AjAC`}}{Fd{ADb}}}{{b{AjAC`}}}}{AC`Fd}{{{b{AjAC`}}{Fd{ACh}}}{{b{AjAC`}}}}{{ACjACh}ACj}{c{{C`{e}}}{}{}}0000000000000000{Bl{{C`{ACdAKl}}}}{ANf{{C`{ACdAKl}}}}{Kf{{C`{ACdAKl}}}}333333333333333333333333333333333333333333333{{}{{C`{c}}}{}}0000000000000000000000000000000000000000000000000000000000000{{{AAn{{b{Ajc}}}}{b{AjGf}}}Gh{}}000000{AD`AHj}{bH`}0000000000000000000000000000000000000000000000000000000000000{AGfAFd}0{{{b{AjAEf}}Hl}{{b{AjAEf}}}}{{ACjId}ACj}{AC`ANh}{{{b{AjAC`}}ANh}{{b{AjAC`}}}}{{}c{}}0000000000000000000000000000000000000000000000000000000000000{{{b{AEn}}}Kf}{{AHn{K`{{K`{j}}}}}AHn}{{{Fd{AL`}}}AC`}{{{K`{ANj}}ANl}{{C`{AC`ANn}}}}{{AHn{Fd{ACh}}}AHn}{{{b{AjAIn}}{b{{A`{j}}}}}{{C`{BlAGb}}}}{{{b{AjAIn}}{b{{A`{j}}}}}{{C`{fAGb}}}}{{{b{AjAIn}}{b{Aj{A`{AFb}}}}}{{C`{fAGb}}}}{{{b{AjAIn}}AFb}{{C`{fAGb}}}}{{{b{AjAIn}}{b{Aj{A`{AFb}}}}}{{C`{AFfAGb}}}}{AO`Af}{AObAf}{AOdAf}{AObBl}{AO`Hj}{AObHj}{AOdHj}{AOfAf}{AOhAf}{AOjAf}{AOfABh}{AOfHj}{AOhHj}{AOjHj}{AOlAf}{AOnAf}`{AOnIh}{AOlHj}{AOnHj}{B@`Af}{B@bAf}{B@`Jl}{B@bJl}{B@`Hj}{B@bHj}{B@dAf}{B@fAf}{B@hAf}{B@jAf}{B@dACl}{B@hADn}{B@jB@l}{B@dHj}{B@fHj}{B@hHj}{B@jHj}{B@nAf}{BA`Af}{BAbAf}{B@nIj}{BA`Ij}{B@nHj}{BA`Hj}{BAbHj}{BAdD`}{BAfD`}`````{{bd}f}{BAhBAj}{BAlBAj}000000{b{{b{BAn}}}}00{b{{b{c}}}{}}000{{{b{Aj}}}{{b{Ajc}}}{}}000444{{{b{ALl}}}ALl}{{b{b{Ajc}}}f{}}{{bj}f}{{}{{Bh{c}}}{}}000{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}000{b{{Bh{{b{c}}}}}{}}00099:{{}BB`}{{}BAl}{{}BAh}{{}ALl}{Bl{{b{c}}}{}}000{Bl{{b{Ajc}}}{}}000{c{{C`{BB`}}}Cb}{c{{C`{BAl}}}Cb}{c{{C`{ALl}}}Cb}{BAhBAj}000{Blf}000{BB`BAj}{{{b{BB`}}}Bl}{{{b{BAl}}}Bl}{{{b{BAh}}}Bl}{{{b{BB`}}Bl}{{Af{BBb}}}}{{{b{BAl}}Bl}{{Af{BBb}}}}{{{b{BAh}}Bl}{{Af{BBb}}}}{{{b{BB`}}{b{AjCl}}}{{C`{fCn}}}}{{{b{BAl}}{b{AjCl}}}Jd}{{{b{BAh}}{b{AjCl}}}{{C`{fCn}}}}{{{b{ALl}}{b{AjCl}}}Jd}{cc{}}000{{{b{c}}}c{}}>{{{b{ALl}}}{{`{{Ch{}{{Cd{{b{BBd}}}}}}}}}}{{{b{ALl}}}{{`{{Ch{}{{Cd{{Fd{BBd}}}}}}}}}}{{}Bl}000{{}c{}}000{BB`BAj}{ALlFd}11{{{b{BB`}}}{{b{Bn}}}}{{{b{BAl}}}{{b{Bn}}}}{{{b{BAh}}}{{b{Bn}}}}{{{b{ALl}}}{{b{Bn}}}}4{BAlBAj}00000{BAhBAj}0077671111111111111111111100011111110{{{b{BB`}}c}C`Gj}{{{b{BAl}}c}C`Gj}{{{b{ALl}}c}C`Gj}{bc{}}{c{{C`{e}}}{}{}}000{{}{{C`{c}}}{}}000{bH`}000778>>>>{{}c{}}000`````````{{bd}f}0000{b{{b{BAn}}}}{{{b{BBf}}}{{Cj{BBh}}}}{b{{b{c}}}{}}00000{{{b{Aj}}}{{b{Ajc}}}{}}00000{BBjAf}{BBlBBn}{{{b{BBh}}}BBh}{{{b{BBj}}}BBj}{{{b{BC`}}}BC`}{{{b{BBl}}}BBl}{{{b{BBf}}}BBf}{{b{b{Ajc}}}f{}}0000{{bj}f}0000{{{b{BBh}}{b{BBh}}}Bf}{{b{b{c}}}Bf{}}{{}{{Bh{c}}}{}}00000{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}00000{b{{Bh{{b{c}}}}}{}}00000{{}BCb}{{}BBj}{{}BC`}{{}BBf}{Bl{{b{c}}}{}}00000{Bl{{b{Ajc}}}{}}00000{c{{C`{BCb}}}Cb}3{Blf}00000{BBlBCd}{{{b{BBh}}{b{BBh}}}Bj}{{{b{BBj}}{b{BBj}}}Bj}{{{b{BC`}}{b{BC`}}}Bj}{{b{b{c}}}Bj{}}00000000{{{b{BCb}}}Bl}{{{b{BCb}}Bl}{{Af{BBb}}}}{{{b{BCb}}{b{AjCl}}}Jd}{{{b{BBh}}{b{AjCl}}}Jd}0{{{b{BBj}}{b{AjCl}}}Jd}0{{{b{BC`}}{b{AjCl}}}Jd}{{{b{BBl}}{b{AjCl}}}Jd}{{{b{BBf}}{b{AjCl}}}Jd}{cc{}}00000{{{b{c}}}c{}}0000{BBjAf}0{{{b{BBj}}}Bj}{{BBfBj}BBf}{{}Bl}000001{{}c{}}00000{BBlBj}0{{{b{BC`}}}{{`{{Ch{}{{Cd{{Dj{{b{B`}}Mn}}}}}}}}}}{{{b{BBj}}}{{Af{Bj}}}}77{{{b{BCb}}}{{b{Bn}}}}{{{b{BBh}}{b{BBh}}}{{Af{Bf}}}}9{{BBf{Af{BBl}}}BBf}{BBjBC`}{BCbBAj}0{{{b{BCb}}c}C`Gj}{bc{}}0000{bD`}0{c{{C`{e}}}{}{}}00000{{}{{C`{c}}}{}}00000{bH`}00000{BBjBj}0{{}c{}}00000`````{{}b}``````````````````{b{{b{n}}}}000{{{b{Kn}}}{{Af{{b{Ad}}}}}}{{{b{Ef}}}{{Af{{b{Ad}}}}}}{{{b{BCf}}}{{Af{{b{Ad}}}}}}{{{b{AAh}}}{{Af{{b{Ad}}}}}}{b{{b{c}}}{}}000{{{b{Aj}}}{{b{Ajc}}}{}}000{{{b{Kn}}}{{Af{{b{n}}}}}}{{{b{Ef}}}{{Af{{b{n}}}}}}{{{b{BCf}}}{{Af{{b{n}}}}}}{{{b{AAh}}}{{Af{{b{n}}}}}}{{}{{Bh{c}}}{}}000{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}000{b{{Bh{{b{c}}}}}{}}000{DlIb}{Bl{{b{c}}}{}}000{Bl{{b{Ajc}}}{}}000{{{b{Kn}}}{{b{Bn}}}}{{{b{Ef}}}{{b{Bn}}}}{{{b{BCf}}}{{b{Bn}}}}{{{b{AAh}}}{{b{Bn}}}}{Blf}000{{{b{Kn}}{b{AjCl}}}{{C`{fCn}}}}0{{{b{Ef}}{b{AjCl}}}{{C`{fCn}}}}0{{{b{BCf}}{b{AjCl}}}{{C`{fCn}}}}0{{{b{AAh}}{b{AjCl}}}{{C`{fCn}}}}0{BChKn}{cc{}}000{{{b{Bn}}}{{C`{hEf}}}}{{}}000{{}Bl}000{{}c{}}000{Dlh}{{{b{Kn}}}{{Af{{b{n}}}}}}{{{b{Ef}}}{{Af{{b{n}}}}}}{{{b{BCf}}}{{Af{{b{n}}}}}}{{{b{AAh}}}{{Af{{b{n}}}}}}{bD`}000{{{b{BCj}}}D`}{c{{C`{e}}}{}{}}000{{}{{C`{c}}}{}}000{bH`}000{{}c{}}000{BClAf}{BCnAf}{BD`Af}{BCnBl}{BClBDb}{BD`Df}{BClHj}{BCnHj}{BD`Hj}{BDdAf}{BDfAf}{BDdBCh}{BDfBDh}{BDdHj}{BDfHj}{BDjAf}{BDlAf}{BDnAf}{BDjJl}{BDlJl}{BDnBE`}{BDjHj}{BDlHj}{BDnHj}{LhAf}{LjAf}{LlAf}{LnAf}{M`Af}{MbAf}{LjD`}{M`D`}{LlBl}{LhD`}{LnMd}{MbJl}{LhHj}{LjHj}{LlHj}{LnHj}{M`Hj}{MbHj}``````````{{bd}f}0{{{b{BEb}}ABj}{{`{{AAl{}{{Fn{{C`{fBEd}}}}}}Gb}}}}{{{b{BEf}}ABj}{{AAn{{Jl{AAl}}}}}}{{BEhce}BEh{{BEj{{A`{j}}}}}{{A@h{{Jl{BEf}}}}}}{{bABj}{{AAn{{Jl{AAl}}}}}}{{{b{{BEl{c}}}}ABj}{{C`{fBEd}}}{BEbF`}}{b{{b{n}}}}{{{b{BEd}}}{{Af{{b{Ad}}}}}}{b{{b{c}}}{}}000{{{b{Aj}}}{{b{Ajc}}}{}}000{AB`BEh}{{{b{BEd}}}{{Af{{b{n}}}}}}{{{b{BEn}}}BEn}{{{b{{BEl{c}}}}}{{BEl{c}}}{F`BEbF`}}{{b{b{Ajc}}}f{}}0{{bj}f}0{{}{{Bh{c}}}{}}000{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}000{b{{Bh{{b{c}}}}}{}}000{Bl{{b{c}}}{}}000{Bl{{b{Ajc}}}{}}000{{{b{BEd}}}{{b{Bn}}}}{Blf}000{{{b{BEn}}}{{b{AB`}}}}{{{b{BEh}}}{{b{AB`}}}}{{{b{BEn}}{b{AjCl}}}Jd}{{{b{BEh}}{b{AjCl}}}Jd}{{{b{BEd}}{b{AjCl}}}Jd}0{{{b{{BEl{c}}}}{b{AjCl}}}Jd{BF`BEbF`}}{cc{}}0{ABhBEd}{AE`BEd}{{{Jl{n}}}BEd}{AMfBEd}{AGjBEd}55{cBEd{nGbGd}}{{{b{c}}}c{}}0{{}}{{}Bl}000{{}c{}}000{{{b{BEn}}}Bj}{AB`BEh}{{ce}{{BEl{c}}}{BEbF`}{{G`{Kh}{{Fn{Bj}}}}GbGd}}{{{b{BEb}}ABf}{{`{{AAl{}{{Fn{{C`{ABjBEd}}}}}}Gb}}}}{{{b{BEf}}ABf}{{AAn{{Jl{AAl}}}}}}{{bABf}{{AAn{{Jl{AAl}}}}}}{{{b{{BEl{c}}}}ABf}{{`{{AAl{}{{Fn{{C`{ABjBEd}}}}}}Gb}}}{BEbF`}}{{{b{BEb}}}{{`{{AAl{}{{Fn{f}}}}Gb}}}}{{{b{BEf}}}{{AAn{{Jl{AAl}}}}}}{{{b{BEn}}}{{C`{fBFb}}}}{{{b{{BEl{c}}}}}{{`{{AAl{}{{Fn{f}}}}Gb}}}{BEbF`}}{b{{AAn{{Jl{AAl}}}}}}{{{b{BEd}}}{{Af{{b{n}}}}}}{BEhBEn}{bc{}}0{bD`}{c{{C`{e}}}{}{}}000{{}{{C`{c}}}{}}000{bH`}000{{}c{}}000{BFdAf}{BFdABh}{BFfAE`}{BFhJl}{BFdHj}``{b{{b{c}}}{}}0{{{b{Aj}}}{{b{Ajc}}}{}}0{{}{{Bh{c}}}{}}0{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}0{b{{Bh{{b{c}}}}}{}}0{Bl{{b{c}}}{}}0{Bl{{b{Ajc}}}{}}0{{{b{BFj}}Al}Hn}{{{b{BFj}}}Jb}{Blf}0{{{b{BFl}}{b{AjCl}}}Jd}{{{b{BFj}}{b{AjCl}}}Jd}{cc{}}0{{}Bl}0{{}c{}}0{BFjCf}{BFjD`}{{{b{BFj}}{b{Kh}}Mn}{{BFn{f}}}}{BFjEb}{{}{{BFn{BFj}}}}{{}{{C`{{Dj{BbB`BG`}}BGb}}}}{Bj{{C`{{Dj{BbB`BG`}}BGb}}}}{D`{{BFn{BFj}}}}{c{{C`{e}}}{}{}}0{{}{{C`{c}}}{}}0{bH`}0{{}c{}}0","D":"GFb","p":[[1,"reference",null,null,1],[5,"Private",3799],[1,"unit"],[5,"PublicKey",0,3800],[1,"u8"],[1,"array"],[10,"Error",3801],[1,"slice"],[6,"KeyParsingError",0,3800],[5,"Backtrace",3802],[6,"Option",3803,null,1],[5,"RelayUrlParseError",0,3804],[0,"mut"],[5,"SecretKey",0,3800],[5,"NodeAddr",0,3805],[5,"RelayUrl",0,3804],[5,"RelayMap",0,3806],[5,"RelayNode",0,3806],[6,"Ordering",3807],[5,"Compat",3808],[1,"bool"],[1,"usize"],[1,"str"],[6,"Result",3809,null,1],[10,"Deserializer",3810],[17,"Item"],[6,"SocketAddr",3811],[10,"Iterator",3812],[5,"BTreeSet",3813],[5,"Formatter",3814],[5,"Error",3814],[5,"String",3815],[5,"VerifyingKey",3816],[5,"DecodeError",3817],[5,"Error",3818],[5,"SigningKey",3819],[1,"tuple",null,null,1],[5,"NodeInfo",3561,3820],[5,"RemoteInfo",1097,3821],[5,"NodeTicket",3822],[5,"Url",3823],[10,"IntoIterator",3824],[6,"DecodingError",3562,3820],[10,"CryptoRngCore",3825],[17,"Value"],[10,"Watcher",0,3826],[5,"Disconnected",3826],[10,"Clone",3827],[10,"Eq",3807],[5,"Arc",3828,null,1],[10,"Hasher",3829],[5,"InitializedFut",3826],[10,"Nullable",3826],[5,"Map",3826],[17,"Output"],[10,"Fn",3830],[10,"Send",3831],[10,"Sync",3831],[5,"Context",3832],[6,"Poll",3833],[10,"Serializer",3834],[5,"Signature",3835],[5,"Stream",3826],[5,"TypeId",3836],[5,"NextFut",3826],[15,"Decode",323],[15,"Key",323],[15,"DecodeInvalidLength",323],[5,"SpanTrace",3837],[1,"u16"],[5,"ConcurrentDiscovery",3561],[10,"Discovery",3561],[5,"NodeData",3561,3820],[5,"UserData",3561,3820],[6,"ParseError",3561,3820],[6,"IntoDiscoveryError",3561],[6,"DiscoveryError",3561],[5,"Lagged",3561],[5,"DiscoveryItem",3561],[5,"DiscoveryContext",3561],[5,"DnsResolver",1053,3838],[8,"Result",3814],[6,"IrohAttr",3820],[5,"TxtAttrs",3820],[6,"PkarrError",793],[5,"Box",3839,null,1],[5,"SignedPacket",3840],[5,"Vec",3841],[5,"TxtLookup",3838],[10,"IntoDiscovery",3561],[1,"u64"],[8,"NodeId",0,3800],[8,"Boxed",3842],[1,"u32"],[6,"EncodingError",3562,3820],[15,"NoServiceConfigured",677],[15,"NoResults",677],[15,"User",677],[15,"User",686],[15,"UnexpectedFormat",3611],[15,"AttrFromString",3611],[15,"NumLabels",3611],[15,"Utf8",3611],[15,"NotAnIrohRecord",3611],[15,"DecodingError",3611],[5,"Utf8Error",3843],[5,"DnsDiscoveryBuilder",708],[5,"DnsDiscovery",708],[5,"MdnsDiscoveryBuilder",751],[5,"MdnsDiscovery",751],[5,"Duration",3844],[5,"PkarrPublisherBuilder",793],[5,"PkarrPublisher",793],[5,"PkarrResolverBuilder",793],[5,"PkarrResolver",793],[5,"PkarrRelayClient",793],[15,"PublicKey",954],[6,"PublicKeyError",3845],[15,"Verify",954],[6,"SignedPacketVerifyError",3840],[15,"HttpSend",954],[5,"Error",3846],[15,"HttpPayload",954],[15,"Encoding",954],[15,"HttpRequest",954],[5,"StatusCode",3847],[15,"InvalidRelayUrl",954],[5,"Builder",961],[5,"DhtDiscovery",961],[5,"Client",3848],[5,"StaticProvider",1019],[10,"Into",3849,null,1],[5,"TokioRuntimeProvider",3850],[5,"GenericConnector",3851],[5,"Resolver",3852],[6,"IpAddr",3853],[6,"DnsError",3838],[10,"ToString",3815],[5,"StaggeredError",3838],[6,"LookupError",3562,3820],[5,"Name",3854],[10,"Future",3855,null,1],[5,"Pin",3856],[5,"Endpoint",1097],[5,"Accept",1097],[5,"Incoming",1097],[5,"Connecting",1097],[6,"ConnectionError",1097,3857],[5,"Connection",1097],[5,"AcceptBi",1097,3858],[5,"AcceptUni",1097,3858],[5,"ServerConfig",1097,3859],[5,"AckFrequencyConfig",1097,3860],[5,"VarInt",1097,3861],[5,"FrameStats",1097,3862],[5,"TransportConfig",1097,3860],[5,"Builder",1097],[6,"AddNodeAddrError",1097,3863],[5,"DirectAddrInfo",1097,3821],[5,"DirectAddr",1097,3863],[10,"HandshakeTokenKey",1097,3864],[10,"AeadKey",1097,3864],[6,"AlpnError",1097],[6,"ConnectWithOptsError",1097],[6,"ConnectError",1097],[6,"BindError",1097],[6,"GetMappingAddressError",1097],[5,"RemoteNodeIdError",1097],[5,"SocketAddrV4",3811],[5,"SocketAddrV6",3811],[5,"MtuDiscoveryConfig",1097,3860],[5,"PathStats",1097,3862],[10,"ControllerFactory",1097,3865],[5,"Instant",3866],[10,"Controller",1097,3865],[5,"Chunk",1097,3867],[5,"Bytes",3868],[5,"UdpStats",1097,3862],[5,"Written",1097,3869],[6,"SendDatagramError",1097,3858],[6,"ReadToEndError",1097,3870],[6,"ReadError",1097,3870],[6,"ResetError",1097,3870],[6,"ReadExactError",1097,3870],[6,"WriteError",1097,3871],[6,"StoppedError",1097,3871],[5,"ConnectionStats",1097,3862],[6,"ControlMsg",1097,3821],[5,"ClosedStream",1097,3872],[6,"ConnectionType",1097,3821],[6,"Source",1097,3873],[5,"ConnectionClose",1097,3874],[5,"ApplicationClose",1097,3874],[5,"TransportError",1097],[5,"TransportErrorCode",1097],[5,"StreamId",1097,3875],[6,"DirectAddrType",1097,3863],[6,"PathSelection",1097],[5,"ConnectOptions",1097],[6,"RelayMode",1097],[5,"Direct",3826],[5,"UnexpectedEnd",3876],[10,"Buf",3877],[6,"Dir",3875],[10,"Stream",3878],[5,"RecvStream",1097,3870],[5,"SendStream",1097,3871],[10,"BufMut",3879],[5,"ExportKeyingMaterialError",1097,3864],[5,"WeakConnectionHandle",1097,3858],[5,"RetryError",1097,3880],[5,"CryptoError",1097,3864],[5,"UnsupportedVersion",1097,3864],[5,"IncomingFuture",1097],[5,"ZeroRttAccepted",1097],[6,"ReadableError",3881],[6,"FrameType",3882],[6,"Close",3874],[5,"Unspecified",3883],[6,"Error",3884],[5,"InvalidFrame",3874],[5,"VarIntBoundsExceeded",3861],[10,"Any",3836],[10,"CryptoServerConfig",1097],[5,"ConnectionId",3885],[5,"Keys",3864],[6,"Side",3875],[5,"Incoming",3880],[5,"IdleTimeout",3860],[5,"EndpointMetrics",3099],[5,"RttEstimator",3886],[5,"OpenBi",1097,3858],[5,"OpenUni",1097,3858],[5,"ReadDatagram",1097,3858],[5,"Error",3887],[5,"ReadBuf",3888],[1,"i32"],[5,"HashMap",3889],[5,"TransportParameters",3884],[10,"Session",3864],[10,"TimeSource",3859],[1,"f32"],[1,"u128"],[5,"ValidationTokenConfig",3859],[5,"CertificateDer",3890],[6,"PrivateKeyDer",3890],[6,"Error",3891],[15,"Empty",3052],[15,"EmptyPruned",3052],[15,"OwnAddress",3052],[15,"ConnectionError",3059],[15,"Unavailable",3059],[15,"UnknownHandshake",3059],[15,"MagicSpawn",3066],[15,"Discovery",3066],[15,"Connect",3072],[15,"Connection",3072],[15,"AddNodeAddr",3078],[15,"SelfConnect",3078],[15,"NoAddress",3078],[15,"Quinn",3078],[6,"ConnectError",3892],[15,"DiscoveryStart",3089],[15,"Discover",3089],[15,"NoAddress",3089],[15,"Discovery",3097],[15,"NamedApp",3097],[5,"RelayMetrics",3099],[5,"Counter",3893],[5,"MagicsockMetrics",3099],[10,"Iterable",3894],[5,"PortmapMetrics",3099],[5,"MetricItem",3895],[10,"MetricsGroup",3895],[5,"Options",3275,3896],[6,"Probe",3275,3897],[5,"Report",3275,3898],[5,"QuicConfig",3275,3899],[5,"ClientConfig",3900],[5,"RelayLatencies",3275,3898],[5,"Metrics",3275,3901],[5,"Endpoint",3902],[5,"MaxLengthExceededError",3562,3820],[6,"SignedPacketBuildError",3840],[10,"NodeIdExt",3562,3820],[15,"InvalidEncodingZ32",3587],[15,"InvalidLength",3587],[15,"InvalidSignature",3587],[6,"Z32Error",3903],[15,"FailedBuildingPacket",3596],[15,"InvalidTxtEntry",3596],[6,"SimpleDnsError",3904],[15,"ParseError",3602],[15,"LookupFailed",3602],[15,"InvalidLabel",3602],[5,"ProtoError",3905],[10,"ProtocolHandler",3629],[6,"AcceptError",3629],[10,"DynProtocolHandler",3629],[5,"RouterBuilder",3629],[10,"AsRef",3849],[5,"AccessLimit",3629],[5,"Router",3629],[10,"Debug",3814],[5,"JoinError",3906],[15,"Connection",3750],[15,"MissingRemoteNodeId",3750],[15,"User",3750],[5,"DnsPkarrServer",3755,3907],[5,"CleanupDropGuard",3755],[8,"Result",3887],[5,"Server",3908],[6,"SpawnError",3908]],"r":[[0,3800],[1,3800],[2,1097],[3,3800],[4,3800],[5,3800],[6,3805],[7,3800],[8,3800],[9,3806],[10,1097],[11,3806],[12,3804],[13,3804],[14,3800],[15,3826],[16,3826],[17,3800],[18,3800],[19,3805],[20,3804],[21,3806],[22,3806],[23,3800],[24,3800],[25,3804],[26,3800],[27,3800],[28,3804],[29,3800],[30,3800],[31,3800],[32,3800],[33,3805],[34,3804],[35,3804],[36,3806],[37,3806],[38,3800],[39,3800],[40,3800],[41,3805],[42,3804],[43,3804],[44,3806],[45,3806],[46,3800],[47,3804],[48,3800],[49,3800],[50,3805],[51,3804],[52,3806],[53,3806],[54,3800],[55,3800],[56,3805],[57,3804],[58,3806],[59,3806],[60,3800],[61,3800],[62,3805],[63,3804],[64,3806],[65,3806],[66,3800],[67,3805],[68,3804],[69,3806],[70,3800],[71,3805],[72,3804],[73,3806],[74,3800],[75,3800],[76,3800],[77,3805],[78,3804],[79,3804],[80,3806],[81,3806],[82,3800],[83,3800],[84,3800],[85,3805],[86,3804],[87,3804],[88,3806],[89,3806],[90,3800],[91,3800],[92,3800],[93,3805],[94,3804],[95,3804],[96,3806],[97,3806],[98,3806],[100,3800],[101,3800],[102,3800],[103,3805],[104,3804],[105,3804],[106,3804],[107,3806],[108,3806],[109,3800],[110,3800],[111,3800],[112,3805],[113,3804],[114,3804],[115,3806],[116,3806],[117,3800],[118,3804],[119,3800],[120,3800],[121,3805],[122,3804],[123,3806],[124,3805],[125,3805],[128,3800],[129,3800],[130,3800],[131,3805],[132,3804],[133,3804],[134,3806],[135,3806],[136,3806],[138,3800],[139,3805],[140,3804],[141,3806],[142,3806],[143,3800],[144,3800],[145,3800],[146,3805],[147,3805],[148,3805],[149,3804],[150,3804],[151,3804],[152,3806],[153,3806],[154,3806],[155,3806],[156,3806],[157,3806],[158,3800],[159,3800],[160,3800],[161,3800],[162,3800],[163,3805],[164,3804],[165,3804],[166,3804],[167,3804],[168,3806],[169,3806],[170,3806],[171,3806],[172,3800],[173,3800],[174,3800],[175,3800],[176,3800],[177,3800],[178,3800],[179,3800],[180,3800],[181,3805],[182,3805],[183,3805],[184,3805],[185,3805],[186,3805],[187,3804],[188,3804],[189,3804],[190,3806],[191,3806],[192,3806],[193,3806],[194,3806],[195,3800],[196,3800],[197,3806],[198,3806],[199,3805],[200,3800],[201,3800],[202,3805],[203,3804],[204,3806],[205,3806],[206,3800],[207,3800],[208,3804],[209,3800],[210,3800],[211,3826],[212,3806],[213,3800],[214,3804],[215,3800],[216,3804],[217,3800],[218,3800],[219,3800],[220,3805],[221,3804],[222,3804],[223,3806],[224,3806],[225,3826],[226,3800],[227,3800],[228,3800],[229,3805],[230,3804],[231,3804],[232,3806],[233,3806],[234,3805],[235,3806],[236,3806],[237,3826],[240,3805],[241,3805],[242,3909],[243,3806],[244,3826],[245,3800],[246,3805],[247,3804],[248,3806],[249,3826],[251,3800],[252,3800],[253,3806],[254,3805],[255,3805],[256,3800],[257,3800],[258,3800],[259,3805],[260,3804],[261,3806],[262,3800],[263,3800],[264,3804],[265,3826],[266,3826],[268,3800],[269,3800],[270,3800],[271,3805],[272,3804],[273,3806],[274,3806],[275,3800],[276,3800],[277,3804],[278,3804],[279,3806],[280,3806],[281,3800],[282,3800],[283,3800],[284,3800],[285,3800],[286,3800],[287,3800],[288,3805],[289,3804],[290,3804],[291,3806],[292,3806],[293,3800],[294,3800],[295,3800],[296,3805],[297,3804],[298,3804],[299,3806],[300,3806],[301,3800],[302,3800],[303,3800],[304,3805],[305,3804],[306,3804],[307,3806],[308,3806],[309,3826],[310,3806],[311,3806],[312,3800],[313,3800],[314,3800],[315,3800],[316,3805],[317,3804],[318,3804],[319,3806],[320,3806],[321,3805],[322,3805],[334,3910],[349,3820],[351,3820],[359,3820],[362,3820],[363,3820],[364,3820],[365,3820],[366,3820],[367,3820],[370,3820],[371,3820],[372,3820],[373,3820],[374,3820],[377,3820],[378,3820],[382,3820],[383,3820],[387,3820],[388,3820],[389,3820],[390,3820],[397,3820],[398,3820],[399,3820],[400,3820],[407,3820],[411,3820],[412,3820],[413,3820],[414,3820],[416,3820],[417,3820],[418,3820],[420,3820],[421,3820],[422,3820],[424,3820],[425,3820],[426,3820],[427,3820],[428,3820],[429,3820],[436,3820],[437,3820],[438,3820],[439,3820],[446,3820],[447,3820],[448,3820],[449,3820],[456,3820],[457,3820],[459,3820],[460,3820],[461,3820],[462,3820],[463,3820],[471,3820],[472,3820],[473,3820],[474,3820],[475,3820],[482,3820],[486,3820],[489,3820],[490,3820],[491,3820],[492,3820],[500,3820],[501,3820],[502,3820],[503,3820],[504,3820],[505,3820],[506,3820],[507,3820],[508,3820],[509,3820],[510,3820],[511,3820],[512,3820],[513,3820],[514,3820],[515,3820],[516,3820],[517,3820],[527,3820],[528,3820],[529,3820],[530,3820],[531,3820],[532,3820],[533,3820],[534,3820],[535,3820],[536,3820],[549,3820],[550,3820],[551,3820],[552,3820],[553,3820],[556,3820],[557,3820],[558,3820],[559,3820],[563,3820],[564,3820],[565,3820],[566,3820],[573,3820],[574,3820],[575,3820],[576,3820],[585,3820],[589,3820],[590,3820],[594,3820],[596,3820],[601,3820],[605,3820],[606,3820],[607,3820],[614,3820],[616,3820],[617,3820],[618,3820],[620,3820],[621,3820],[622,3820],[626,3820],[627,3820],[628,3820],[629,3820],[630,3820],[631,3820],[638,3820],[639,3820],[640,3820],[641,3820],[648,3820],[649,3820],[650,3820],[651,3820],[658,3820],[661,3820],[662,3820],[663,3820],[664,3820],[671,3820],[672,3820],[673,3820],[674,3820],[675,3820],[676,3820],[710,3838],[711,3838],[1053,3838],[1054,3838],[1055,3838],[1056,3838],[1057,3838],[1058,3838],[1059,3838],[1060,3838],[1061,3838],[1062,3838],[1063,3838],[1064,3838],[1065,3838],[1066,3838],[1067,3838],[1068,3838],[1069,3838],[1070,3838],[1071,3838],[1072,3838],[1073,3838],[1074,3838],[1075,3838],[1076,3838],[1077,3838],[1078,3838],[1079,3838],[1080,3838],[1081,3838],[1082,3838],[1083,3838],[1084,3838],[1085,3838],[1086,3838],[1087,3838],[1088,3838],[1089,3838],[1090,3838],[1091,3838],[1092,3838],[1093,3838],[1094,3838],[1095,3838],[1096,3838],[1100,3858],[1101,3858],[1102,3860],[1104,3863],[1105,3864],[1108,3873],[1109,3874],[1110,3857],[1116,3821],[1117,3867],[1118,3857],[1119,3872],[1120,3870],[1121,3871],[1129,3874],[1130,3857],[1131,3857],[1133,3858],[1134,3870],[1135,3870],[1136,3871],[1137,3871],[1138,3862],[1139,3821],[1140,3821],[1141,3865],[1142,3865],[1143,3864],[1147,3821],[1148,3863],[1149,3821],[1150,3863],[1151,3858],[1154,3873],[1158,3863],[1159,3863],[1161,3864],[1165,3870],[1166,3862],[1168,3864],[1171,3870],[1175,3863],[1176,3857],[1177,3861],[1178,3861],[1180,3821],[1181,3860],[1184,3873],[1187,3821],[1188,3858],[1189,3858],[1190,3863],[1193,3862],[1194,3821],[1195,3821],[1196,3863],[1197,3863],[1198,3863],[1200,3870],[1201,3858],[1202,3870],[1203,3870],[1204,3870],[1205,3870],[1206,3870],[1207,3821],[1208,3873],[1211,3821],[1213,3870],[1214,3857],[1215,3870],[1216,3880],[1219,3873],[1221,3858],[1222,3871],[1223,3859],[1224,3873],[1226,3871],[1227,3871],[1228,3875],[1230,3857],[1231,3858],[1232,3870],[1233,3860],[1235,3857],[1237,3873],[1238,3862],[1240,3863],[1242,3858],[1243,3864],[1244,3861],[1245,3857],[1246,3858],[1247,3871],[1248,3869],[1250,3870],[1251,3870],[1252,3871],[1253,3871],[1254,3858],[1255,3870],[1256,3870],[1257,3870],[1258,3870],[1259,3871],[1260,3871],[1261,3861],[1262,3862],[1263,3862],[1264,3862],[1265,3862],[1266,3869],[1267,3821],[1268,3821],[1269,3821],[1270,3872],[1271,3821],[1272,3873],[1273,3857],[1274,3860],[1275,3860],[1276,3859],[1277,3874],[1278,3874],[1281,3875],[1282,3863],[1283,3863],[1294,3860],[1295,3862],[1296,3860],[1297,3862],[1301,3821],[1302,3863],[1303,3821],[1304,3864],[1305,3860],[1309,3858],[1310,3880],[1311,3870],[1312,3870],[1313,3870],[1314,3870],[1315,3871],[1316,3871],[1317,3872],[1318,3857],[1319,3863],[1327,3863],[1337,3860],[1338,3862],[1339,3858],[1340,3858],[1341,3858],[1342,3858],[1343,3858],[1344,3858],[1345,3858],[1346,3880],[1347,3870],[1348,3870],[1349,3870],[1350,3870],[1351,3870],[1352,3871],[1353,3871],[1354,3871],[1355,3860],[1356,3861],[1357,3867],[1358,3862],[1359,3862],[1360,3862],[1361,3862],[1362,3869],[1363,3821],[1364,3821],[1365,3821],[1366,3872],[1367,3821],[1368,3873],[1369,3857],[1370,3860],[1371,3860],[1372,3859],[1373,3864],[1374,3864],[1375,3864],[1376,3874],[1377,3874],[1378,3863],[1381,3875],[1382,3863],[1383,3863],[1401,3858],[1402,3858],[1403,3858],[1404,3858],[1405,3858],[1406,3858],[1407,3858],[1408,3880],[1409,3870],[1410,3870],[1411,3870],[1412,3870],[1413,3870],[1414,3871],[1415,3871],[1416,3871],[1417,3860],[1418,3861],[1419,3867],[1420,3862],[1421,3862],[1422,3862],[1423,3862],[1424,3869],[1425,3821],[1426,3821],[1427,3821],[1428,3872],[1429,3821],[1430,3873],[1431,3857],[1432,3860],[1433,3860],[1434,3859],[1435,3864],[1436,3864],[1437,3864],[1438,3874],[1439,3874],[1440,3863],[1443,3875],[1444,3863],[1445,3863],[1464,3865],[1466,3867],[1467,3862],[1468,3869],[1469,3863],[1476,3869],[1478,3858],[1479,3870],[1480,3870],[1481,3870],[1482,3870],[1483,3871],[1484,3871],[1485,3861],[1486,3862],[1487,3862],[1488,3862],[1489,3862],[1490,3869],[1491,3821],[1492,3821],[1493,3821],[1494,3872],[1495,3821],[1496,3873],[1497,3857],[1498,3860],[1499,3860],[1500,3859],[1501,3874],[1502,3874],[1505,3875],[1506,3863],[1507,3863],[1513,3865],[1514,3858],[1515,3870],[1516,3870],[1517,3870],[1518,3870],[1519,3871],[1520,3871],[1521,3861],[1522,3862],[1523,3862],[1524,3862],[1525,3862],[1526,3869],[1527,3821],[1528,3821],[1529,3821],[1530,3872],[1531,3821],[1532,3873],[1533,3857],[1534,3860],[1535,3860],[1536,3859],[1537,3874],[1538,3874],[1541,3875],[1542,3863],[1543,3863],[1549,3858],[1550,3870],[1551,3870],[1552,3870],[1553,3870],[1554,3871],[1555,3871],[1556,3861],[1557,3862],[1558,3862],[1559,3862],[1560,3862],[1561,3869],[1562,3821],[1563,3821],[1564,3821],[1565,3872],[1566,3821],[1567,3873],[1568,3857],[1569,3860],[1570,3860],[1571,3859],[1572,3874],[1573,3874],[1576,3875],[1577,3863],[1578,3863],[1588,3861],[1589,3875],[1590,3863],[1591,3863],[1593,3861],[1594,3875],[1595,3863],[1596,3863],[1597,3858],[1598,3858],[1599,3858],[1600,3858],[1601,3858],[1602,3858],[1603,3858],[1604,3880],[1605,3870],[1606,3870],[1607,3870],[1608,3870],[1609,3870],[1610,3871],[1611,3871],[1612,3871],[1613,3860],[1614,3861],[1615,3867],[1616,3862],[1617,3862],[1618,3862],[1619,3862],[1620,3869],[1621,3821],[1622,3821],[1623,3821],[1624,3872],[1625,3821],[1626,3873],[1627,3857],[1628,3860],[1629,3860],[1630,3859],[1631,3864],[1632,3864],[1633,3864],[1634,3874],[1635,3874],[1636,3863],[1639,3875],[1640,3863],[1641,3863],[1659,3858],[1660,3858],[1661,3858],[1662,3858],[1663,3858],[1664,3858],[1665,3858],[1666,3880],[1667,3870],[1668,3870],[1669,3870],[1670,3870],[1671,3870],[1672,3871],[1673,3871],[1674,3871],[1675,3860],[1676,3861],[1677,3867],[1678,3862],[1679,3862],[1680,3862],[1681,3862],[1682,3869],[1683,3821],[1684,3821],[1685,3821],[1686,3872],[1687,3821],[1688,3873],[1689,3857],[1690,3860],[1691,3860],[1692,3859],[1693,3864],[1694,3864],[1695,3864],[1696,3874],[1697,3874],[1698,3863],[1701,3875],[1702,3863],[1703,3863],[1721,3858],[1722,3858],[1723,3858],[1724,3858],[1725,3858],[1726,3858],[1727,3858],[1728,3880],[1729,3870],[1730,3870],[1731,3870],[1732,3870],[1733,3870],[1734,3871],[1735,3871],[1736,3871],[1737,3860],[1738,3861],[1739,3867],[1740,3862],[1741,3862],[1742,3862],[1743,3862],[1744,3869],[1745,3821],[1746,3821],[1747,3821],[1748,3872],[1749,3821],[1750,3873],[1751,3857],[1752,3860],[1753,3860],[1754,3859],[1755,3864],[1756,3864],[1757,3864],[1758,3874],[1759,3874],[1760,3863],[1763,3875],[1764,3863],[1765,3863],[1783,3860],[1784,3862],[1787,3821],[1790,3862],[1792,3862],[1793,3859],[1794,3860],[1795,3862],[1796,3862],[1797,3862],[1798,3862],[1799,3860],[1800,3860],[1802,3862],[1803,3861],[1805,3875],[1806,3860],[1807,3861],[1808,3862],[1809,3862],[1810,3862],[1811,3862],[1812,3869],[1813,3872],[1814,3821],[1815,3860],[1816,3860],[1821,3858],[1822,3858],[1823,3858],[1824,3858],[1825,3858],[1826,3858],[1827,3858],[1828,3880],[1829,3870],[1830,3870],[1831,3870],[1832,3870],[1833,3870],[1834,3871],[1835,3871],[1836,3871],[1837,3860],[1838,3861],[1839,3867],[1840,3862],[1841,3862],[1842,3862],[1843,3862],[1844,3869],[1845,3821],[1846,3821],[1847,3821],[1848,3872],[1849,3821],[1850,3873],[1851,3857],[1852,3860],[1853,3860],[1854,3859],[1855,3864],[1856,3864],[1857,3864],[1858,3874],[1859,3874],[1860,3863],[1863,3875],[1864,3863],[1865,3863],[1883,3858],[1884,3858],[1885,3858],[1886,3858],[1887,3858],[1888,3858],[1889,3858],[1890,3880],[1891,3870],[1892,3870],[1893,3870],[1894,3870],[1895,3870],[1896,3871],[1897,3871],[1898,3871],[1899,3860],[1900,3861],[1901,3867],[1902,3862],[1903,3862],[1904,3862],[1905,3862],[1906,3869],[1907,3821],[1908,3821],[1909,3821],[1910,3872],[1911,3821],[1912,3873],[1913,3857],[1914,3860],[1915,3860],[1916,3859],[1917,3864],[1918,3864],[1919,3864],[1920,3874],[1921,3874],[1922,3863],[1925,3875],[1926,3863],[1927,3863],[1945,3863],[1952,3821],[1953,3821],[1954,3821],[1955,3821],[1956,3873],[1957,3875],[1967,3858],[1968,3858],[1969,3858],[1970,3858],[1971,3858],[1972,3858],[1973,3858],[1974,3880],[1975,3870],[1976,3870],[1977,3870],[1978,3870],[1979,3870],[1980,3870],[1981,3871],[1982,3871],[1983,3871],[1984,3871],[1985,3860],[1986,3861],[1987,3867],[1988,3862],[1989,3862],[1990,3862],[1991,3862],[1992,3869],[1993,3821],[1994,3821],[1995,3821],[1996,3872],[1997,3821],[1998,3873],[1999,3857],[2000,3860],[2001,3860],[2002,3859],[2003,3864],[2004,3864],[2005,3864],[2006,3874],[2007,3874],[2008,3863],[2011,3875],[2012,3863],[2013,3863],[2031,3860],[2032,3861],[2034,3875],[2035,3858],[2036,3870],[2037,3870],[2038,3870],[2039,3870],[2040,3871],[2041,3871],[2042,3861],[2043,3867],[2044,3869],[2045,3821],[2046,3821],[2047,3821],[2048,3872],[2049,3821],[2050,3873],[2051,3857],[2052,3864],[2053,3874],[2054,3874],[2057,3875],[2058,3863],[2059,3863],[2062,3858],[2063,3858],[2064,3858],[2065,3870],[2066,3870],[2067,3870],[2068,3870],[2069,3870],[2070,3870],[2071,3870],[2072,3870],[2073,3870],[2074,3870],[2075,3870],[2076,3870],[2077,3871],[2078,3871],[2079,3871],[2080,3871],[2081,3871],[2082,3871],[2083,3861],[2084,3861],[2085,3861],[2086,3867],[2087,3867],[2088,3867],[2089,3869],[2090,3869],[2091,3869],[2092,3821],[2093,3821],[2094,3821],[2095,3821],[2096,3821],[2097,3821],[2098,3821],[2099,3821],[2100,3821],[2101,3872],[2102,3872],[2103,3872],[2104,3821],[2105,3821],[2106,3821],[2107,3873],[2108,3873],[2109,3873],[2110,3857],[2111,3857],[2112,3857],[2113,3864],[2114,3864],[2115,3864],[2116,3874],[2117,3874],[2118,3874],[2119,3874],[2120,3874],[2121,3874],[2128,3875],[2129,3875],[2130,3875],[2131,3863],[2132,3863],[2133,3863],[2134,3863],[2135,3863],[2136,3863],[2143,3874],[2144,3874],[2146,3871],[2147,3858],[2148,3858],[2149,3858],[2150,3880],[2151,3880],[2152,3870],[2153,3870],[2154,3870],[2155,3870],[2156,3870],[2157,3870],[2158,3870],[2159,3870],[2160,3870],[2161,3871],[2162,3871],[2163,3871],[2164,3871],[2165,3871],[2166,3860],[2167,3861],[2168,3861],[2169,3867],[2170,3862],[2171,3862],[2172,3862],[2173,3862],[2174,3869],[2175,3821],[2176,3821],[2177,3821],[2178,3821],[2179,3872],[2180,3872],[2181,3821],[2182,3821],[2183,3873],[2184,3873],[2185,3857],[2186,3857],[2187,3860],[2188,3860],[2189,3859],[2190,3864],[2191,3864],[2192,3864],[2193,3874],[2194,3874],[2195,3874],[2196,3874],[2197,3863],[2198,3863],[2203,3875],[2204,3875],[2205,3863],[2206,3863],[2207,3863],[2233,3862],[2234,3862],[2235,3874],[2236,3858],[2237,3858],[2238,3858],[2239,3858],[2240,3858],[2241,3858],[2242,3858],[2243,3858],[2244,3880],[2245,3870],[2246,3870],[2247,3870],[2248,3870],[2249,3870],[2250,3870],[2251,3870],[2252,3870],[2253,3870],[2254,3870],[2255,3870],[2256,3871],[2257,3871],[2258,3871],[2259,3871],[2260,3871],[2261,3871],[2262,3871],[2263,3860],[2264,3861],[2265,3861],[2266,3861],[2267,3861],[2268,3861],[2269,3861],[2270,3867],[2271,3862],[2272,3862],[2273,3862],[2274,3862],[2275,3869],[2276,3821],[2277,3821],[2278,3821],[2279,3872],[2280,3821],[2281,3873],[2282,3857],[2283,3857],[2284,3857],[2285,3860],[2286,3860],[2287,3859],[2288,3864],[2289,3864],[2290,3864],[2291,3864],[2292,3874],[2293,3874],[2294,3874],[2295,3863],[2301,3875],[2302,3875],[2303,3863],[2304,3863],[2327,3858],[2328,3870],[2329,3870],[2330,3870],[2331,3870],[2332,3871],[2333,3871],[2334,3861],[2335,3862],[2336,3862],[2337,3862],[2338,3862],[2339,3869],[2340,3821],[2341,3821],[2342,3821],[2343,3872],[2344,3821],[2345,3873],[2346,3857],[2347,3860],[2348,3860],[2349,3859],[2350,3874],[2351,3874],[2354,3875],[2355,3863],[2356,3863],[2362,3861],[2363,3861],[2364,3861],[2367,3862],[2368,3821],[2369,3861],[2370,3873],[2371,3875],[2372,3863],[2373,3863],[2375,3870],[2376,3871],[2378,3862],[2379,3858],[2380,3880],[2381,3870],[2382,3870],[2383,3870],[2384,3870],[2385,3871],[2386,3871],[2387,3872],[2388,3857],[2389,3863],[2397,3859],[2398,3859],[2399,3875],[2400,3858],[2401,3858],[2402,3858],[2403,3858],[2404,3858],[2405,3858],[2406,3858],[2407,3880],[2408,3870],[2409,3870],[2410,3870],[2411,3870],[2412,3870],[2413,3871],[2414,3871],[2415,3871],[2416,3860],[2417,3861],[2418,3867],[2419,3862],[2420,3862],[2421,3862],[2422,3862],[2423,3869],[2424,3821],[2425,3821],[2426,3821],[2427,3872],[2428,3821],[2429,3873],[2430,3857],[2431,3860],[2432,3860],[2433,3859],[2434,3864],[2435,3864],[2436,3864],[2437,3874],[2438,3874],[2439,3863],[2442,3875],[2443,3863],[2444,3863],[2463,3860],[2464,3860],[2465,3865],[2466,3875],[2468,3860],[2469,3858],[2470,3858],[2471,3858],[2472,3858],[2473,3858],[2474,3858],[2475,3858],[2476,3880],[2477,3870],[2478,3870],[2479,3870],[2480,3870],[2481,3870],[2482,3871],[2483,3871],[2484,3871],[2485,3860],[2486,3861],[2487,3867],[2488,3862],[2489,3862],[2490,3862],[2491,3862],[2492,3869],[2493,3821],[2494,3821],[2495,3821],[2496,3872],[2497,3821],[2498,3873],[2499,3857],[2500,3860],[2501,3860],[2502,3859],[2503,3864],[2504,3864],[2505,3864],[2506,3874],[2507,3874],[2508,3863],[2511,3875],[2512,3863],[2513,3863],[2532,3865],[2533,3858],[2534,3858],[2535,3858],[2536,3858],[2537,3858],[2543,3880],[2544,3861],[2545,3862],[2546,3870],[2547,3858],[2549,3860],[2552,3821],[2553,3821],[2554,3821],[2555,3821],[2556,3821],[2557,3821],[2558,3821],[2560,3862],[2561,3862],[2562,3862],[2563,3860],[2564,3860],[2565,3860],[2566,3862],[2568,3860],[2569,3859],[2570,3862],[2571,3862],[2572,3862],[2574,3859],[2575,3860],[2576,3860],[2577,3860],[2579,3858],[2580,3859],[2581,3875],[2583,3862],[2584,3862],[2587,3821],[2588,3862],[2589,3867],[2590,3865],[2591,3865],[2592,3865],[2593,3865],[2594,3865],[2595,3864],[2598,3860],[2599,3861],[2600,3875],[2601,3863],[2602,3863],[2603,3862],[2604,3862],[2605,3862],[2608,3860],[2609,3862],[2610,3858],[2611,3858],[2612,3858],[2613,3858],[2614,3858],[2619,3871],[2620,3870],[2621,3870],[2622,3871],[2623,3871],[2624,3871],[2625,3859],[2626,3859],[2627,3871],[2630,3870],[2631,3870],[2632,3870],[2634,3870],[2635,3870],[2636,3874],[2637,3874],[2639,3860],[2640,3860],[2641,3870],[2645,3821],[2651,3860],[2652,3871],[2653,3862],[2654,3862],[2657,3859],[2659,3862],[2660,3861],[2661,3864],[2665,3860],[2666,3860],[2667,3860],[2668,3862],[2669,3862],[2670,3821],[2671,3821],[2672,3821],[2673,3821],[2674,3873],[2678,3871],[2681,3858],[2682,3870],[2683,3870],[2684,3870],[2685,3870],[2686,3871],[2687,3871],[2688,3857],[2689,3863],[2696,3821],[2697,3821],[2701,3870],[2702,3862],[2703,3871],[2704,3862],[2705,3862],[2706,3860],[2707,3862],[2708,3862],[2709,3859],[2710,3860],[2711,3858],[2712,3870],[2713,3870],[2714,3870],[2715,3870],[2716,3871],[2717,3871],[2718,3861],[2719,3862],[2720,3862],[2721,3862],[2722,3862],[2723,3869],[2724,3821],[2725,3821],[2726,3821],[2727,3872],[2728,3821],[2729,3873],[2730,3857],[2731,3860],[2732,3860],[2733,3859],[2734,3874],[2735,3874],[2738,3875],[2739,3863],[2740,3863],[2746,3858],[2747,3880],[2748,3870],[2749,3870],[2750,3870],[2751,3870],[2752,3871],[2753,3871],[2754,3861],[2755,3821],[2756,3872],[2757,3821],[2758,3873],[2759,3857],[2760,3874],[2761,3874],[2762,3863],[2765,3875],[2766,3863],[2773,3859],[2774,3859],[2775,3859],[2777,3858],[2778,3858],[2779,3858],[2780,3858],[2781,3858],[2782,3858],[2783,3858],[2784,3880],[2785,3870],[2786,3870],[2787,3870],[2788,3870],[2789,3870],[2790,3871],[2791,3871],[2792,3871],[2793,3860],[2794,3861],[2795,3861],[2796,3861],[2797,3861],[2798,3867],[2799,3862],[2800,3862],[2801,3862],[2802,3862],[2803,3869],[2804,3821],[2805,3821],[2806,3821],[2807,3872],[2808,3821],[2809,3873],[2810,3857],[2811,3860],[2812,3860],[2813,3859],[2814,3864],[2815,3864],[2816,3864],[2817,3874],[2818,3874],[2819,3863],[2822,3875],[2823,3863],[2824,3863],[2842,3858],[2843,3858],[2844,3858],[2845,3858],[2846,3858],[2847,3858],[2848,3858],[2849,3880],[2850,3870],[2851,3870],[2852,3870],[2853,3870],[2854,3870],[2855,3871],[2856,3871],[2857,3871],[2858,3860],[2859,3861],[2860,3867],[2861,3862],[2862,3862],[2863,3862],[2864,3862],[2865,3869],[2866,3821],[2867,3821],[2868,3821],[2869,3872],[2870,3821],[2871,3873],[2872,3857],[2873,3860],[2874,3860],[2875,3859],[2876,3864],[2877,3864],[2878,3864],[2879,3874],[2880,3874],[2881,3863],[2884,3875],[2885,3863],[2886,3863],[2904,3858],[2905,3858],[2906,3858],[2907,3858],[2908,3858],[2911,3863],[2912,3858],[2913,3858],[2914,3858],[2915,3858],[2916,3858],[2917,3858],[2918,3858],[2919,3880],[2920,3870],[2921,3870],[2922,3870],[2923,3870],[2924,3870],[2925,3871],[2926,3871],[2927,3871],[2928,3860],[2929,3861],[2930,3867],[2931,3862],[2932,3862],[2933,3862],[2934,3862],[2935,3869],[2936,3821],[2937,3821],[2938,3821],[2939,3872],[2940,3821],[2941,3873],[2942,3857],[2943,3860],[2944,3860],[2945,3859],[2946,3864],[2947,3864],[2948,3864],[2949,3874],[2950,3874],[2951,3863],[2954,3875],[2955,3863],[2956,3863],[2974,3862],[2975,3862],[2976,3860],[2978,3859],[2979,3859],[2980,3858],[2981,3858],[2982,3858],[2983,3858],[2984,3858],[2985,3858],[2986,3858],[2987,3880],[2988,3870],[2989,3870],[2990,3870],[2991,3870],[2992,3870],[2993,3871],[2994,3871],[2995,3871],[2996,3860],[2997,3861],[2998,3867],[2999,3862],[3000,3862],[3001,3862],[3002,3862],[3003,3869],[3004,3821],[3005,3821],[3006,3821],[3007,3872],[3008,3821],[3009,3873],[3010,3857],[3011,3860],[3012,3860],[3013,3859],[3014,3864],[3015,3864],[3016,3864],[3017,3874],[3018,3874],[3019,3863],[3022,3875],[3023,3863],[3024,3863],[3042,3865],[3044,3859],[3045,3859],[3047,3871],[3048,3871],[3049,3871],[3050,3871],[3051,3871],[3275,3897],[3276,3901],[3277,3896],[3278,3897],[3279,3897],[3280,3897],[3281,3899],[3282,3898],[3283,3898],[3284,3897],[3285,3898],[3286,3898],[3287,3899],[3288,3896],[3289,3901],[3290,3896],[3291,3901],[3292,3897],[3293,3898],[3294,3898],[3295,3899],[3296,3896],[3297,3901],[3298,3897],[3299,3898],[3300,3898],[3301,3899],[3302,3896],[3303,3898],[3304,3899],[3305,3897],[3306,3898],[3307,3898],[3308,3899],[3309,3896],[3310,3897],[3311,3898],[3312,3898],[3313,3899],[3314,3896],[3315,3897],[3316,3898],[3317,3898],[3318,3899],[3319,3896],[3320,3897],[3321,3897],[3322,3901],[3323,3897],[3324,3898],[3325,3898],[3326,3899],[3327,3896],[3328,3901],[3329,3897],[3330,3898],[3331,3898],[3332,3899],[3333,3896],[3334,3901],[3335,3897],[3336,3898],[3337,3898],[3338,3899],[3339,3896],[3340,3901],[3341,3898],[3342,3898],[3343,3896],[3344,3901],[3345,3897],[3346,3898],[3347,3898],[3348,3899],[3349,3896],[3350,3901],[3351,3897],[3352,3898],[3353,3898],[3354,3899],[3355,3896],[3356,3901],[3357,3896],[3358,3901],[3359,3897],[3360,3898],[3361,3898],[3362,3899],[3363,3896],[3364,3899],[3365,3897],[3366,3898],[3367,3898],[3368,3897],[3369,3897],[3370,3897],[3371,3898],[3372,3898],[3373,3898],[3374,3898],[3375,3898],[3376,3898],[3377,3901],[3378,3901],[3379,3901],[3380,3897],[3381,3897],[3382,3898],[3383,3898],[3384,3898],[3385,3899],[3386,3896],[3387,3901],[3388,3897],[3389,3898],[3390,3898],[3391,3899],[3392,3896],[3393,3897],[3394,3898],[3395,3898],[3396,3899],[3397,3896],[3398,3898],[3399,3898],[3400,3898],[3401,3896],[3402,3901],[3403,3897],[3404,3898],[3405,3898],[3406,3899],[3407,3896],[3408,3896],[3409,3901],[3410,3897],[3411,3898],[3412,3898],[3413,3899],[3414,3896],[3415,3899],[3416,3899],[3417,3898],[3418,3898],[3419,3898],[3420,3898],[3421,3901],[3422,3897],[3423,3898],[3424,3896],[3425,3898],[3426,3901],[3427,3901],[3428,3901],[3429,3897],[3430,3898],[3431,3898],[3432,3899],[3433,3896],[3434,3897],[3435,3898],[3436,3901],[3437,3897],[3438,3898],[3439,3898],[3440,3899],[3441,3896],[3442,3901],[3443,3897],[3444,3898],[3445,3898],[3446,3899],[3447,3896],[3448,3901],[3449,3897],[3450,3898],[3451,3898],[3452,3899],[3453,3896],[3454,3898],[3455,3898],[3456,3901],[3457,3897],[3458,3898],[3459,3898],[3460,3899],[3461,3896],[3462,3820],[3463,3820],[3464,3820],[3465,3820],[3466,3820],[3467,3820],[3468,3820],[3469,3820],[3470,3820],[3471,3820],[3472,3820],[3473,3820],[3474,3820],[3475,3820],[3476,3820],[3477,3820],[3478,3820],[3479,3820],[3480,3820],[3481,3820],[3482,3820],[3483,3820],[3484,3820],[3485,3820],[3486,3820],[3487,3820],[3488,3820],[3489,3820],[3490,3820],[3491,3820],[3492,3820],[3493,3820],[3494,3820],[3495,3820],[3496,3820],[3497,3820],[3498,3820],[3499,3820],[3500,3820],[3501,3820],[3502,3820],[3503,3820],[3504,3820],[3505,3820],[3506,3820],[3507,3820],[3508,3820],[3509,3820],[3510,3820],[3511,3820],[3512,3820],[3513,3820],[3514,3820],[3515,3820],[3516,3820],[3517,3820],[3518,3820],[3519,3820],[3520,3820],[3521,3820],[3522,3820],[3523,3820],[3524,3820],[3525,3820],[3526,3820],[3527,3820],[3528,3820],[3529,3820],[3530,3820],[3531,3820],[3532,3820],[3533,3820],[3534,3820],[3535,3820],[3536,3820],[3537,3820],[3538,3820],[3539,3820],[3540,3820],[3541,3820],[3542,3820],[3543,3820],[3544,3820],[3545,3820],[3546,3820],[3547,3820],[3548,3820],[3549,3820],[3550,3820],[3551,3820],[3552,3820],[3553,3820],[3554,3820],[3555,3820],[3556,3820],[3557,3820],[3558,3820],[3559,3820],[3560,3820],[3561,3820],[3562,3820],[3563,3820],[3564,3820],[3565,3820],[3566,3820],[3567,3820],[3568,3820],[3569,3820],[3570,3820],[3571,3820],[3572,3820],[3573,3820],[3574,3820],[3575,3820],[3576,3820],[3577,3820],[3578,3820],[3579,3820],[3580,3820],[3581,3820],[3582,3820],[3583,3820],[3584,3820],[3585,3820],[3586,3820],[3756,3907],[3758,3907],[3760,3907],[3762,3907],[3764,3907],[3766,3907],[3768,3907],[3770,3907],[3771,3907],[3772,3907],[3774,3907],[3776,3907],[3778,3907],[3780,3907],[3782,3907],[3783,3907],[3784,3907],[3785,3907],[3786,3907],[3787,3907],[3790,3907],[3792,3907],[3794,3907],[3796,3907],[3798,3907]],"b":[[158,"impl-Debug-for-PublicKey"],[159,"impl-Display-for-PublicKey"],[160,"impl-Display-for-KeyParsingError"],[161,"impl-Debug-for-KeyParsingError"],[164,"impl-Display-for-RelayUrl"],[165,"impl-Debug-for-RelayUrl"],[166,"impl-Display-for-RelayUrlParseError"],[167,"impl-Debug-for-RelayUrlParseError"],[168,"impl-Debug-for-RelayMap"],[169,"impl-Display-for-RelayMap"],[170,"impl-Display-for-RelayNode"],[171,"impl-Debug-for-RelayNode"],[175,"impl-From%3CDecodeError%3E-for-KeyParsingError"],[176,"impl-From%3CError%3E-for-KeyParsingError"],[179,"impl-From%3CSigningKey%3E-for-SecretKey"],[180,"impl-From%3C%5Bu8;+32%5D%3E-for-SecretKey"],[181,"impl-From%3C(PublicKey,+Option%3CRelayUrl%3E,+%26%5BSocketAddr%5D)%3E-for-NodeAddr"],[182,"impl-From%3CPublicKey%3E-for-NodeAddr"],[184,"impl-From%3CNodeInfo%3E-for-NodeAddr"],[185,"impl-From%3CRemoteInfo%3E-for-NodeAddr"],[186,"impl-From%3CNodeTicket%3E-for-NodeAddr"],[191,"impl-From%3CRelayNode%3E-for-RelayMap"],[192,"impl-From%3CRelayUrl%3E-for-RelayMap"],[197,"impl-FromIterator%3CRelayNode%3E-for-RelayMap"],[198,"impl-FromIterator%3CRelayUrl%3E-for-RelayMap"],[283,"impl-TryFrom%3C%26%5Bu8;+32%5D%3E-for-PublicKey"],[284,"impl-TryFrom%3C%26%5Bu8%5D%3E-for-PublicKey"],[513,"impl-Display-for-UserData"],[514,"impl-Debug-for-UserData"],[516,"impl-Debug-for-ParseError"],[517,"impl-Display-for-ParseError"],[519,"impl-Debug-for-IntoDiscoveryError"],[520,"impl-Display-for-IntoDiscoveryError"],[521,"impl-Display-for-DiscoveryError"],[522,"impl-Debug-for-DiscoveryError"],[525,"impl-Display-for-Lagged"],[526,"impl-Debug-for-Lagged"],[531,"impl-From%3CNodeAddr%3E-for-NodeInfo"],[532,"impl-From%3CDiscoveryItem%3E-for-NodeInfo"],[533,"impl-From%3CTxtAttrs%3CIrohAttr%3E%3E-for-NodeInfo"],[534,"impl-From%3C%26TxtAttrs%3CIrohAttr%3E%3E-for-NodeInfo"],[881,"impl-Display-for-PkarrError"],[882,"impl-Debug-for-PkarrError"],[2148,"impl-Display-for-SendDatagramError"],[2149,"impl-Debug-for-SendDatagramError"],[2150,"impl-Display-for-RetryError"],[2151,"impl-Debug-for-RetryError"],[2153,"impl-Debug-for-ReadToEndError"],[2154,"impl-Display-for-ReadToEndError"],[2155,"impl-Debug-for-ReadError"],[2156,"impl-Display-for-ReadError"],[2157,"impl-Debug-for-ResetError"],[2158,"impl-Display-for-ResetError"],[2159,"impl-Debug-for-ReadExactError"],[2160,"impl-Display-for-ReadExactError"],[2162,"impl-Display-for-WriteError"],[2163,"impl-Debug-for-WriteError"],[2164,"impl-Debug-for-StoppedError"],[2165,"impl-Display-for-StoppedError"],[2167,"impl-Debug-for-VarInt"],[2168,"impl-Display-for-VarInt"],[2175,"impl-Debug-for-ControlMsg"],[2176,"impl-Display-for-ControlMsg"],[2179,"impl-Debug-for-ClosedStream"],[2180,"impl-Display-for-ClosedStream"],[2181,"impl-Display-for-ConnectionType"],[2182,"impl-Debug-for-ConnectionType"],[2183,"impl-Display-for-Source"],[2184,"impl-Debug-for-Source"],[2185,"impl-Display-for-ConnectionError"],[2186,"impl-Debug-for-ConnectionError"],[2193,"impl-Debug-for-ConnectionClose"],[2194,"impl-Display-for-ConnectionClose"],[2195,"impl-Debug-for-ApplicationClose"],[2196,"impl-Display-for-ApplicationClose"],[2197,"impl-Display-for-AddNodeAddrError"],[2198,"impl-Debug-for-AddNodeAddrError"],[2199,"impl-Display-for-TransportError"],[2200,"impl-Debug-for-TransportError"],[2201,"impl-Debug-for-TransportErrorCode"],[2202,"impl-Display-for-TransportErrorCode"],[2203,"impl-Debug-for-StreamId"],[2204,"impl-Display-for-StreamId"],[2206,"impl-Debug-for-DirectAddrType"],[2207,"impl-Display-for-DirectAddrType"],[2211,"impl-Display-for-ConnectWithOptsError"],[2212,"impl-Debug-for-ConnectWithOptsError"],[2213,"impl-Display-for-ConnectError"],[2214,"impl-Debug-for-ConnectError"],[2215,"impl-Display-for-BindError"],[2216,"impl-Debug-for-BindError"],[2217,"impl-Display-for-GetMappingAddressError"],[2218,"impl-Debug-for-GetMappingAddressError"],[2224,"impl-Debug-for-AlpnError"],[2225,"impl-Display-for-AlpnError"],[2228,"impl-Display-for-RemoteNodeIdError"],[2229,"impl-Debug-for-RemoteNodeIdError"],[2249,"impl-From%3CResetError%3E-for-ReadError"],[2250,"impl-From%3CReadableError%3E-for-ReadError"],[2251,"impl-From%3CConnectionError%3E-for-ReadError"],[2257,"impl-From%3CStoppedError%3E-for-WriteError"],[2259,"impl-From%3CConnectionError%3E-for-WriteError"],[2260,"impl-From%3CClosedStream%3E-for-WriteError"],[2264,"impl-From%3Cu16%3E-for-VarInt"],[2265,"impl-From%3CStreamId%3E-for-VarInt"],[2266,"impl-From%3CFrameType%3E-for-VarInt"],[2268,"impl-From%3Cu32%3E-for-VarInt"],[2269,"impl-From%3Cu8%3E-for-VarInt"],[2283,"impl-From%3CTransportError%3E-for-ConnectionError"],[2284,"impl-From%3CClose%3E-for-ConnectionError"],[2296,"impl-From%3CTransportErrorCode%3E-for-TransportError"],[2297,"impl-From%3CError%3E-for-TransportError"],[2298,"impl-From%3CInvalidFrame%3E-for-TransportError"],[2310,"impl-From%3CConnectionError%3E-for-ConnectError"],[2311,"impl-From%3CConnectWithOptsError%3E-for-ConnectError"],[2620,"impl-RecvStream"],[2621,"impl-AsyncRead-for-RecvStream"],[2623,"impl-SendStream"],[2624,"impl-AsyncWrite-for-SendStream"],[2794,"impl-TryFrom%3Cusize%3E-for-VarInt"],[2795,"impl-TryFrom%3Cu128%3E-for-VarInt"],[2796,"impl-TryFrom%3Cu64%3E-for-VarInt"],[3380,"impl-Debug-for-Probe"],[3381,"impl-Display-for-Probe"],[3382,"impl-Debug-for-Report"],[3383,"impl-Display-for-Report"],[3535,"impl-Display-for-EncodingError"],[3536,"impl-Debug-for-EncodingError"],[3537,"impl-Display-for-DecodingError"],[3538,"impl-Debug-for-DecodingError"],[3539,"impl-Display-for-MaxLengthExceededError"],[3540,"impl-Debug-for-MaxLengthExceededError"],[3541,"impl-Debug-for-LookupError"],[3542,"impl-Display-for-LookupError"],[3693,"impl-Display-for-AcceptError"],[3694,"impl-Debug-for-AcceptError"],[3698,"impl-From%3CConnectionError%3E-for-AcceptError"],[3699,"impl-From%3CRemoteNodeIdError%3E-for-AcceptError"],[3700,"impl-From%3CBox%3Cdyn+Error+%2B+Send+%2B+Sync%3E%3E-for-AcceptError"],[3701,"impl-From%3CError%3E-for-AcceptError"],[3702,"impl-From%3CClosedStream%3E-for-AcceptError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAACYL5AADAAAACwAAABIABQAZAEkAZQAXAIEABwCLACEArgAAALAAAQC0AAMAuQABALwAAADAAAAAwgAAAMYAAADJAAkA1gALAPYAAwACAQQACAEBAA4BJwA6AQcARAEHAF4BAABgAQAAaQEBAG0BBQB0AQQAewEgAJ0BKwDKARwA6gEJAPUBGwAUAgMAGQIAABwCAAAfAgAAKAIDAC0CAAAvAg4ASQIAAFUCAABZAgAAXAIAAGACAwBmAgAAaQIDAG4CBAB0Ah4AlgIJAKYCHgDJAgMAzwIJANoCAwDgAgEA5AIBAOcCCADzAgMA+AINAAgDAQAMAwEADwMKABwDBAAjAwAAKQMSAEADKABsAwwAfwMJAI8DAwCWAwAAmQMAAJsDEACtAwUAtAMFALsDBgDEAwQAzAMOANwDAwDiAwAA5AMBAOkDAQDuAwAA8AMAAPIDBAD4AwMA/gMAAAAEDAAPBAAAEQQAABMEAAAVBAAAFwQAABkEBAAhBAIAJQQLADIEAQBCBAAARAQEAFAEAQBUBAAAWAQAAGMEAQBmBAAAaQQAAG0EAACCBAAAhAQBAIcEAQCQBAAAnAQAAKIEAQCnBAAAsAQAAL0EAADFBAAA2AQAANoEAADnBCIAEAUAABIFAAAeBRgAPAV7AL4FBgDHBSIA6wVFADUGAwA6Br0A/wYAAAEHAAAGBwEADAcQAB4HhwCwBz8A8QduAGQIUwDECAAAxwgAAMoIAgDOCAAA0AgAANIIAADUCAIA2QgCAN0IAQDsCAEA8ggAAPUIAAD5CAIA/ggAAAYJAgAKCQAAEwkAABgJIgBACQAAQgkEAEsJEgBhCT0A5gkJAAcKAAALCgIAGAoBAB0KAAAoCgMALQoBADIKCgA+CgEAQQoAAF4KAQBvCgQAegoOAI8KAACRCgEAlAoBAJgKPQDaChAA7gpxAGELPQClCz0A7QssAB4MAAAhDAAAIwwRADgMDgBKDA4AXQwDAGIMCQBwDAAAcgwFAIAMAwCSDAIAlgwHAJ8MBgCpDAYAsQwPAMMMAADIDAMA1QwFANwMCwDqDDMAHw0FACYNFQBCDQQASw0FAF4NAQBlDRkAgQ0KAI0NBgCYDQQAng0gAMANGADeDQcA6w0HAPQNOgAwDgAAMg4BADcOAgA9DgsASg4fAGwOBABzDgQAew4GAIsOAQCQDgIAlA4XAK4ODQC+DgMAxA4BANAOBwA=","P":[[29,"T"],[30,""],[31,"T"],[46,""],[54,"T"],[60,""],[70,"K"],[74,"T"],[98,""],[100,"T"],[105,""],[106,"T"],[117,""],[119,"D"],[121,"__D"],[124,""],[143,"K"],[158,""],[174,"T"],[175,""],[177,"T"],[179,""],[183,"T"],[184,""],[188,"T"],[191,""],[194,"T"],[195,""],[197,"T"],[199,""],[200,"T"],[206,""],[210,"R"],[211,"Watcher::Value"],[212,""],[213,"H"],[214,"__H"],[215,""],[225,"Watcher::Value,T,W"],[226,"U"],[234,""],[237,"Watcher::Value,T,"],[240,""],[244,"Watcher::Value,W"],[245,""],[249,"Watcher::Value"],[251,""],[257,"S"],[259,"__S"],[262,""],[265,"Watcher::Value"],[268,""],[269,"T"],[275,""],[282,"U,T"],[283,""],[285,"U,T"],[286,""],[287,"U,T"],[293,"U"],[301,""],[309,"Watcher::Value"],[310,""],[313,"V"],[321,""],[322,""],[376,""],[378,""],[387,"T"],[407,""],[416,"T"],[420,""],[425,"K"],[426,"T"],[456,""],[459,"T"],[462,""],[463,"T"],[467,"Deref::Target"],[468,"T"],[474,""],[475,"T"],[482,""],[503,"K"],[512,""],[528,"T"],[531,""],[535,"T"],[536,""],[537,"T"],[539,""],[540,"T"],[547,""],[551,"T"],[555,""],[558,"__H"],[559,""],[573,"U"],[583,""],[616,"T"],[620,""],[627,"U,T"],[628,""],[629,"U,T"],[638,"U"],[648,""],[661,"V"],[671,""],[712,"T"],[716,""],[718,"T"],[728,""],[733,"T"],[735,""],[737,"U"],[739,""],[743,"U,T"],[745,"U"],[747,""],[749,"V"],[753,""],[754,"T"],[758,""],[759,"T"],[769,""],[773,"T"],[775,""],[777,"U"],[779,""],[785,"U,T"],[787,"U"],[789,""],[791,"V"],[793,""],[815,"T"],[827,""],[835,"T"],[838,""],[841,"T"],[871,""],[888,"T"],[897,""],[904,"U"],[910,""],[923,"T"],[926,""],[927,"U,T"],[933,"U"],[939,""],[947,"V"],[953,""],[964,"T"],[968,""],[972,"T"],[973,""],[974,"T"],[980,""],[982,"T"],[986,""],[991,"T"],[994,""],[998,"U"],[1000,""],[1009,"T"],[1010,"U,T"],[1012,"U"],[1014,""],[1017,"V"],[1021,""],[1022,""],[1023,"T"],[1025,""],[1026,"T"],[1027,""],[1028,"T"],[1031,""],[1032,"T"],[1034,""],[1036,"T"],[1037,","],[1038,"T"],[1039,""],[1041,"U"],[1042,""],[1047,""],[1048,"T"],[1049,"U,T"],[1050,"U"],[1051,""],[1052,"V"],[1054,""],[1057,"T"],[1059,""],[1061,"T"],[1062,""],[1063,"T"],[1066,""],[1067,"T"],[1069,""],[1072,"T"],[1074,""],[1075,"U"],[1076,""],[1082,""],[1086,""],[1087,""],[1091,"T"],[1092,"U,T"],[1093,"U"],[1094,""],[1095,"V"],[1096,""],[1298,""],[1299,""],[1339,"T"],[1463,""],[1514,"T"],[1549,""],[1593,"K"],[1597,"T"],[1783,""],[1788,""],[1790,""],[1803,"B"],[1806,""],[1821,"T"],[1945,""],[1952,"__D"],[1957,""],[1959,""],[1960,""],[2032,"B"],[2035,""],[2062,"K"],[2143,""],[2236,"T"],[2243,""],[2244,"T"],[2246,""],[2247,"T"],[2249,""],[2252,"T"],[2253,""],[2254,"T"],[2255,""],[2256,"T"],[2257,""],[2258,"T"],[2259,""],[2262,"T"],[2264,""],[2267,"T"],[2268,""],[2270,"T"],[2283,""],[2285,"T"],[2289,""],[2290,"T"],[2292,""],[2293,"T"],[2296,""],[2299,"T"],[2301,""],[2302,"T"],[2309,""],[2312,"T"],[2313,""],[2314,"T"],[2322,""],[2323,"T"],[2362,""],[2369,"__H"],[2374,""],[2469,"U"],[2531,""],[2539,"IntoFuture::IntoFuture"],[2540,""],[2615,"Future::Output"],[2619,""],[2660,""],[2661,""],[2670,"__S"],[2675,""],[2711,"T"],[2746,""],[2777,"U,T"],[2794,""],[2797,"U,T"],[2842,"U"],[2904,"F"],[2911,""],[2980,"V"],[3042,""],[3116,"T"],[3124,""],[3128,"T"],[3129,""],[3130,"T"],[3142,""],[3149,"T"],[3157,"__D"],[3160,""],[3179,"T"],[3184,""],[3191,"U"],[3195,""],[3248,"__S"],[3251,"T"],[3252,"U,T"],[3256,"U"],[3260,""],[3271,"V"],[3284,""],[3291,"T"],[3303,""],[3310,"T"],[3315,""],[3321,"K"],[3322,"T"],[3340,""],[3344,"T"],[3356,"__D"],[3357,""],[3368,"K"],[3377,""],[3387,"T"],[3398,""],[3409,"U"],[3415,""],[3428,"__S"],[3429,"T"],[3434,""],[3436,"U,T"],[3442,"U"],[3448,""],[3456,"V"],[3467,""],[3494,"T"],[3502,""],[3506,"T"],[3518,""],[3519,"T"],[3527,""],[3544,"T"],[3548,""],[3557,"U"],[3561,""],[3571,"U,T"],[3575,"U"],[3579,""],[3583,"V"],[3587,""],[3643,","],[3644,""],[3645,"P"],[3646,""],[3648,"T"],[3656,""],[3659,"P"],[3660,"T"],[3662,""],[3664,"T"],[3684,""],[3695,"P"],[3696,"T"],[3698,""],[3703,"T"],[3708,""],[3713,"U"],[3717,""],[3719,"P,F"],[3720,""],[3723,"P"],[3724,""],[3727,"P"],[3728,""],[3731,"T"],[3733,""],[3734,"U,T"],[3738,"U"],[3742,""],[3746,"V"],[3750,""],[3757,"T"],[3771,""],[3777,"T"],[3779,""],[3781,"U"],[3783,""],[3791,"U,T"],[3793,"U"],[3795,""],[3797,"V"]]}],["iroh_base",{"t":"TPPPGTFIFFFFFINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNONNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOPTPFGPKPNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNMNNNNNNNNNNNNOOOOOOOOOOOO","n":["BYTE_SIZE","Decode","DecodeInvalidLength","Key","KeyParsingError","LENGTH","NodeAddr","NodeId","PublicKey","RelayUrl","RelayUrlParseError","SecretKey","Signature","SignatureError","as_bytes","as_error_source","","as_ref","backtrace","","borrow","","","","","","","","borrow_mut","","","","","","","cause","","clone","","","","","clone_into","","","","","clone_to_uninit","","","","","cmp","","","deref","description","","deserialize","","","","","direct_addresses","","eq","","","","fmt","","","","","","","","","","","","","","fmt_short","from","","","","","","","","","","","","","","","","","","","from_bytes","","","from_components","from_parts","from_slice","from_str","","","","generate","hash","","in_current_span","","into","","","","","","","is_empty","new","node_id","partial_cmp","","","public","","r_bytes","relay_url","","s_bytes","secret","serialize","","","","","sign","source","","ticket","to_bytes","","","to_owned","","","","","to_string","","","","","to_vec","try_from","","","","","","","","","","","try_into","","","","","","","type_id","","","","","","","verify","with_direct_addresses","with_relay_url","backtrace","","","source","","span_trace","","","Encoding","KIND","Kind","NodeTicket","ParseError","Postcard","Ticket","Verify","as_error_source","backtrace","borrow","","borrow_mut","","cause","clone","clone_into","clone_to_uninit","description","deserialize","","eq","fmt","","","","from","","","","","from_bytes","","from_str","in_current_span","into","","new","node_addr","serialize","","source","to_bytes","","to_owned","to_string","","try_from","","try_into","","type_id","","verification_failed","wrong_prefix","backtrace","","","","expected","message","source","","span_trace","","",""],"q":[[0,"iroh_base"],[189,"iroh_base::KeyParsingError"],[197,"iroh_base::ticket"],[252,"iroh_base::ticket::ParseError"],[264,"iroh_base::key"],[265,"core::error"],[266,"backtrace::capture"],[267,"core::option"],[268,"iroh_base::relay_url"],[269,"ed25519"],[270,"iroh_base::node_addr"],[271,"core::cmp"],[272,"core::result"],[273,"serde::de"],[274,"core::net::socket_addr"],[275,"core::iter::traits::iterator"],[276,"alloc::collections::btree::set"],[277,"core::fmt"],[278,"alloc::string"],[279,"ed25519_dalek::signature"],[280,"ed25519_dalek::verifying"],[281,"data_encoding"],[282,"ed25519_dalek::errors"],[283,"ed25519_dalek::signing"],[284,"iroh_base::ticket::node"],[285,"url"],[286,"core::iter::traits::collect"],[287,"signature::error"],[288,"rand_core"],[289,"core::hash"],[290,"serde::ser"],[291,"alloc::vec"],[292,"core::any"],[293,"n0_snafu::spantrace"],[294,"postcard::error"]],"i":"Ahn00`b````````01Ad1203112AjAlAn36452103536421064210642104100536421011641066664455210033466664455522211110036426166420240536452103111410426116264210253`662642106450366644452210364521036452103411ElEnF`21210FdFf1``1`111Dh20220002100002200222100202001021000202020222FjFlFnG`30213210","f":"``````````````{{{d{b}}}{{d{{h{f}}}}}}{d{{d{j}}}}0{{{d{b}}}{{d{{l{f}}}}}}{{{d{n}}}{{Ab{{d{A`}}}}}}{{{d{Ad}}}{{Ab{{d{A`}}}}}}{d{{d{c}}}{}}0500000{{{d{Af}}}{{d{Afc}}}{}}000000{{{d{n}}}{{Ab{{d{j}}}}}}{{{d{Ad}}}{{Ab{{d{j}}}}}}{{{d{Ah}}}Ah}{{{d{b}}}b}{{{d{Aj}}}Aj}{{{d{Al}}}Al}{{{d{An}}}An}{{d{d{Afc}}}B`{}}0000{{df}B`}0000{{{d{b}}{d{b}}}Bb}{{{d{Al}}{d{Al}}}Bb}{{{d{An}}{d{An}}}Bb}{{{d{An}}}{{d{c}}}{}}{{{d{n}}}{{d{Bd}}}}{{{d{Ad}}}{{d{Bd}}}}{c{{Bf{Ah}}}Bh}{c{{Bf{b}}}Bh}{c{{Bf{Aj}}}Bh}{c{{Bf{Al}}}Bh}{c{{Bf{An}}}Bh}{{{d{Al}}}{{`{{Bn{}{{Bj{{d{Bl}}}}}}}}}}{AlC`}{{{d{Ah}}{d{Ah}}}Cb}{{{d{b}}{d{b}}}Cb}{{{d{Al}}{d{Al}}}Cb}{{{d{An}}{d{An}}}Cb}{{{d{Ah}}{d{AfCd}}}{{Bf{B`Cf}}}}000{{{d{b}}{d{AfCd}}}Ch}0{{{d{n}}{d{AfCd}}}Ch}0{{{d{Aj}}{d{AfCd}}}Ch}{{{d{Al}}{d{AfCd}}}Ch}{{{d{An}}{d{AfCd}}}Ch}0{{{d{Ad}}{d{AfCd}}}Ch}0{{{d{b}}}Cj}{{{d{{h{f}}}}}Ah}{cc{}}{ClAh}{{{h{f}}}Ah}{Cnb}3{D`n}{Dbn}5{DdAj}6{{{h{f}}}Aj}7{{{Df{b{Ab{An}}{d{{l{Bl}}}}}}}Al}{DhAl}{DjAl}{DlAn};;<{{{d{{h{f}}}}}{{Bf{bDb}}}}{{{d{{h{f}}}}}Aj}{{{h{f}}{h{f}}}Ah}{{b{Ab{An}}c}Al{{Dn{}{{Bj{Bl}}}}}}{{{d{{l{f}}}}}{{Bf{AhE`}}}}{{{d{Bd}}}{{Bf{AhE`}}}}{{{d{Bd}}}{{Bf{bc}}}{}}{{{d{Bd}}}{{Bf{Ajc}}}{}}{{{d{Bd}}}{{Bf{Anc}}}{}}{cAjEb}{{{d{b}}{d{Afc}}}B`Ed}{{{d{An}}{d{Afc}}}B`Ed}{{}}0{{}c{}}000000{{{d{Al}}}Cb}{bAl}{AlDj}{{{d{b}}{d{b}}}{{Ab{Bb}}}}{{{d{Al}}{d{Al}}}{{Ab{Bb}}}}{{{d{An}}{d{An}}}{{Ab{Bb}}}}{{{d{b}}}Cn}{{{d{Aj}}}b}{{{d{Ah}}}{{d{{h{f}}}}}}{{{d{Al}}}{{Ab{{d{An}}}}}}{AlAb}2{{{d{Aj}}}{{d{Dd}}}}{{{d{Ah}}c}BfEf}{{{d{b}}c}BfEf}{{{d{Aj}}c}BfEf}{{{d{Al}}c}BfEf}{{{d{An}}c}BfEf}{{{d{Aj}}{d{{l{f}}}}}Ah}{{{d{n}}}{{Ab{{d{j}}}}}}{{{d{Ad}}}{{Ab{{d{j}}}}}}`{{{d{Ah}}}{{h{f}}}}0{{{d{Aj}}}{{h{f}}}}{dc{}}0000{dCj}0000{{{d{Ah}}}{{Eh{f}}}}{{{d{{l{f}}}}}{{Bf{AhE`}}}}{c{{Bf{e}}}{}{}}0{{{d{{h{f}}}}}{{Bf{bc}}}{}}{{{d{{l{f}}}}}{{Bf{bc}}}{}}2{{{d{{l{f}}}}}{{Bf{Ajc}}}{}}3333{{}{{Bf{c}}}{}}000000{dEj}000000{{{d{b}}{d{{l{f}}}}{d{Ah}}}{{Bf{B`Db}}}}{{Alc}Al{{Dn{}{{Bj{Bl}}}}}}{{AlAn}Al}{ElAb}{EnAb}{F`Ab}{ElD`}{EnDb}{ElFb}{EnFb}{F`Fb}````````{d{{d{j}}}}{{{d{Fd}}}{{Ab{{d{A`}}}}}}{d{{d{c}}}{}}0{{{d{Af}}}{{d{Afc}}}{}}0{{{d{Fd}}}{{Ab{{d{j}}}}}}{{{d{Dh}}}Dh}{{d{d{Afc}}}B`{}}{{df}B`}{{{d{Fd}}}{{d{Bd}}}}{{{d{Bd}}}{{Bf{FfFd}}}}{c{{Bf{Dh}}}Bh}{{{d{Dh}}{d{Dh}}}Cb}{{{d{Dh}}{d{AfCd}}}Ch}0{{{d{Fd}}{d{AfCd}}}Ch}0{cc{}}{AlDh}1{D`Fd}{FhFd}{{{d{{l{f}}}}}{{Bf{FfFd}}}}{{{d{{l{f}}}}}{{Bf{DhFd}}}}{{{d{Bd}}}{{Bf{Dhc}}}{}}{{}}{{}c{}}07{{{d{Dh}}}{{d{Al}}}}{{{d{Ff}}}Cj}{{{d{Dh}}c}BfEf}{{{d{Fd}}}{{Ab{{d{j}}}}}}{{{d{Ff}}}{{Eh{f}}}}{{{d{Dh}}}{{Eh{f}}}}{dc{}}{dCj}0{c{{Bf{e}}}{}{}}0{{}{{Bf{c}}}{}}0{dEj}0{{{d{Bd}}}Fd}0{FjAb}{FlAb}{FnAb}{G`Ab}{Fjd}{G`d}{FlFh}{FnD`}{FjFb}{FlFb}{FnFb}{G`Fb}","D":"Jb","p":[[5,"PublicKey",0,264],[1,"reference",null,null,1],[1,"u8"],[1,"array"],[10,"Error",265],[1,"slice"],[6,"KeyParsingError",0,264],[5,"Backtrace",266],[6,"Option",267,null,1],[5,"RelayUrlParseError",0,268],[0,"mut"],[5,"Signature",0,269],[5,"SecretKey",0,264],[5,"NodeAddr",0,270],[5,"RelayUrl",0,268],[1,"unit"],[6,"Ordering",271],[1,"str"],[6,"Result",272,null,1],[10,"Deserializer",273],[17,"Item"],[6,"SocketAddr",274],[10,"Iterator",275],[5,"BTreeSet",276],[1,"bool"],[5,"Formatter",277],[5,"Error",277],[8,"Result",277],[5,"String",278],[5,"InternalSignature",279],[5,"VerifyingKey",280],[5,"DecodeError",281],[8,"SignatureError",0,282],[5,"SigningKey",283],[1,"tuple",null,null,1],[5,"NodeTicket",197,284],[8,"NodeId",0,264],[5,"Url",285],[10,"IntoIterator",286],[5,"Error",287],[10,"CryptoRngCore",288],[10,"Hasher",289],[10,"Serializer",290],[5,"Vec",291],[5,"TypeId",292],[15,"Decode",189],[15,"Key",189],[15,"DecodeInvalidLength",189],[5,"SpanTrace",293],[6,"ParseError",197],[10,"Ticket",197],[6,"Error",294],[15,"Kind",252],[15,"Postcard",252],[15,"Encoding",252],[15,"Verify",252]],"r":[[0,269],[1,264],[2,264],[3,264],[4,264],[5,264],[6,270],[7,264],[8,264],[9,268],[10,268],[11,264],[12,269],[13,282],[14,264],[15,264],[16,268],[17,264],[18,264],[19,268],[20,269],[21,264],[22,264],[23,264],[24,264],[25,270],[26,268],[27,268],[28,269],[29,264],[30,264],[31,264],[32,270],[33,268],[34,268],[35,264],[36,268],[37,269],[38,264],[39,264],[40,270],[41,268],[42,269],[43,264],[44,264],[45,270],[46,268],[47,269],[48,264],[49,264],[50,270],[51,268],[52,264],[53,270],[54,268],[55,268],[56,264],[57,268],[58,269],[59,264],[60,264],[61,270],[62,268],[63,270],[64,270],[65,269],[66,264],[67,270],[68,268],[69,269],[70,269],[71,269],[72,269],[73,264],[74,264],[75,264],[76,264],[77,264],[78,270],[79,268],[80,268],[81,268],[82,268],[83,264],[84,269],[85,269],[86,269],[87,269],[88,264],[89,264],[90,264],[91,264],[92,264],[93,264],[94,264],[95,264],[96,270],[97,270],[98,270],[99,270],[100,268],[101,268],[102,268],[103,269],[104,264],[105,264],[106,269],[107,270],[108,269],[109,269],[110,264],[111,264],[112,268],[113,264],[114,264],[115,268],[116,264],[117,268],[118,269],[119,264],[120,264],[121,264],[122,270],[123,268],[124,268],[125,270],[126,270],[127,270],[128,264],[129,270],[130,268],[131,264],[132,264],[133,269],[134,270],[135,270],[136,269],[137,264],[138,269],[139,264],[140,264],[141,270],[142,268],[143,264],[144,264],[145,268],[147,269],[148,269],[149,264],[150,269],[151,264],[152,264],[153,270],[154,268],[155,269],[156,264],[157,264],[158,268],[159,268],[160,269],[161,269],[162,269],[163,264],[164,264],[165,264],[166,264],[167,264],[168,264],[169,270],[170,268],[171,268],[172,269],[173,264],[174,264],[175,264],[176,270],[177,268],[178,268],[179,269],[180,264],[181,264],[182,264],[183,270],[184,268],[185,268],[186,264],[187,270],[188,270],[200,284],[207,284],[209,284],[212,284],[213,284],[214,284],[217,284],[218,284],[219,284],[220,284],[223,284],[224,284],[229,284],[230,284],[232,284],[234,284],[235,284],[237,284],[240,284],[241,284],[242,284],[244,284],[246,284],[248,284]],"b":[[69,"impl-Display-for-Signature"],[70,"impl-LowerHex-for-Signature"],[71,"impl-Debug-for-Signature"],[72,"impl-UpperHex-for-Signature"],[73,"impl-Debug-for-PublicKey"],[74,"impl-Display-for-PublicKey"],[75,"impl-Display-for-KeyParsingError"],[76,"impl-Debug-for-KeyParsingError"],[79,"impl-Display-for-RelayUrl"],[80,"impl-Debug-for-RelayUrl"],[81,"impl-Debug-for-RelayUrlParseError"],[82,"impl-Display-for-RelayUrlParseError"],[84,"impl-From%3C%26%5Bu8;+ed25519::::SignatureBytes::%7Bconstant%230%7D%5D%3E-for-Signature"],[86,"impl-From%3CInternalSignature%3E-for-Signature"],[87,"impl-From%3C%5Bu8;+ed25519::::SignatureBytes::%7Bconstant%230%7D%5D%3E-for-Signature"],[90,"impl-From%3CDecodeError%3E-for-KeyParsingError"],[91,"impl-From%3CError%3E-for-KeyParsingError"],[93,"impl-From%3CSigningKey%3E-for-SecretKey"],[95,"impl-From%3C%5Bu8;+32%5D%3E-for-SecretKey"],[97,"impl-From%3C(PublicKey,+Option%3CRelayUrl%3E,+%26%5BSocketAddr%5D)%3E-for-NodeAddr"],[98,"impl-From%3CNodeTicket%3E-for-NodeAddr"],[99,"impl-From%3CPublicKey%3E-for-NodeAddr"],[147,"impl-Signature"],[148,"impl-SignatureEncoding-for-Signature"],[164,"impl-TryFrom%3C%26%5Bu8;+32%5D%3E-for-PublicKey"],[165,"impl-TryFrom%3C%26%5Bu8%5D%3E-for-PublicKey"],[219,"impl-Display-for-NodeTicket"],[220,"impl-Debug-for-NodeTicket"],[221,"impl-Display-for-ParseError"],[222,"impl-Debug-for-ParseError"],[226,"impl-From%3CDecodeError%3E-for-ParseError"],[227,"impl-From%3CError%3E-for-ParseError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAALcAGgAQAC8AQgARAFUAAABXAAIAWwABAF4AAABgAAAAYgAAAGQAAQBuAAMAcwADAIEAAgCLAAQAkQABAJUAAACXAAkAogAYAL4ABwDOAAoA2gAFAOMAAQDmAAIA7gABAPEACQD9AAMAAgEGAA==","P":[[20,"T"],[22,""],[23,"T"],[35,""],[42,"T"],[47,""],[55,"Deref::Target"],[56,""],[58,"D"],[61,"__D"],[63,""],[85,"T"],[86,""],[89,"T"],[90,""],[92,"T"],[93,""],[94,"T"],[95,""],[96,"T"],[97,""],[101,"T"],[103,""],[107,""],[108,""],[110,"FromStr::Err"],[113,"R"],[114,"H"],[115,"__H"],[116,""],[118,"U"],[125,""],[138,"S"],[141,"__S"],[143,""],[150,"T"],[155,""],[162,"U,T"],[164,"TryFrom::Error"],[166,"U,T"],[167,"TryFrom::Error"],[168,"U,T"],[172,"U"],[179,""],[187,""],[188,""],[207,"T"],[211,""],[213,"T"],[214,""],[217,"D"],[218,""],[223,"T"],[224,""],[225,"T"],[226,""],[230,"FromStr::Err"],[231,""],[232,"U"],[234,""],[237,"S"],[238,""],[241,"T"],[242,""],[244,"U,T"],[246,"U"],[248,""]]}],["iroh_bench",{"t":"FGGGPPPFPPPPNNNNNNNNNNNNNNNNHONNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNONNNNNCOOONCOHCCNOONNNNNNNNNNNNNNNNNNNNNONNNNNSHHHHHHSHHHHHHFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFONNNNNNOOOONNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNONOOOHOOONNNNNNOONNNNNN","n":["ClientStats","Commands","ConnectionSelector","EndpointSelector","Iroh","","","Opt","Quinn","","","S2n","__clone_box","","augment_args","augment_args_for_update","augment_subcommands","augment_subcommands_for_update","borrow","","","","","borrow_mut","","","","","client_handler","clients","clone","","clone_into","","clone_to_uninit","","close","","command","","command_for_update","","compat","","","","","compat_mut","","","","","compat_ref","","","","","configure_tracing_subscriber","default","deref","","","","","deref_mut","","","","","download_size","drop","","","","","fmt","","from","","","","","from_arg_matches","","from_arg_matches_mut","","from_ref","","group_id","has_subcommand","init","","","","","initial_mtu","into","","","","","iroh","max_streams","metrics","only_relay","print","quinn","read_unordered","rt","s2n","stats","","","streams","to_owned","","try_from","","","","","try_into","","","","","type_id","","","","","update_from_arg_matches","","update_from_arg_matches_mut","","upload_size","vzip","","","","","ALPN","client","connect_client","handle_client_stream","server","server_endpoint","transport_config","ALPN","client","connect_client","handle_client_stream","server","server_endpoint","transport_config","Opt","__clone_box","augment_args","augment_args_for_update","borrow","borrow_mut","clone","clone_into","clone_to_uninit","command","command_for_update","compat","compat_mut","compat_ref","deref","deref_mut","drop","fmt","from","from_arg_matches","from_arg_matches_mut","from_ref","group_id","init","into","to_owned","try_from","try_into","type_id","update_from_arg_matches","update_from_arg_matches_mut","vzip","Stats","StreamStats","TransferResult","avg_chunk_size","borrow","","","borrow_mut","","","chunk_size","chunk_time","chunks","","compat","","","compat_mut","","","compat_ref","","","default","","deref","","","deref_mut","","","drop","","","duration","duration_hist","fmt","","","from","","","init","","","into","","","new","print","size","stream_finished","stream_stats","streams","throughput","throughput_bps","throughput_hist","total_duration","total_size","try_from","","","try_into","","","ttfb","ttfb_hist","type_id","","","vzip","",""],"q":[[0,"iroh_bench"],[141,"iroh_bench::iroh"],[148,"iroh_bench::quinn"],[155,"iroh_bench::s2n"],[187,"iroh_bench::stats"],[260,"dyn_clone::sealed"],[261,"clap_builder::builder::command"],[262,"n0_snafu::error"],[263,"async_compat"],[264,"core::fmt"],[265,"clap_builder::parser::matches::arg_matches"],[266,"clap_builder"],[267,"core::result"],[268,"clap_builder::util::id"],[269,"core::option"],[270,"tokio::runtime::runtime"],[271,"core::any"],[272,"iroh_base::node_addr"],[273,"iroh_base::relay_url"],[274,"iroh::endpoint"],[275,"iroh_quinn_proto::config::transport"],[276,"core::net::socket_addr"],[277,"rustls_pki_types"],[278,"iroh_quinn::endpoint"],[279,"iroh_quinn::connection"],[280,"hdrhistogram"],[281,"core::time"]],"i":"````lnAh`21000A`00113210Ab43210`1212121432121432104321043210`0432104321014321021432102121211243210143210`1110`1```311214321043210432102121143210```````````````Ed000000000000000000000000000000```DfEjEf2102000210210210210102102102201021021021022121112`01110210220102102","f":"````````````{{bd}f}0{hh}000{b{{b{c}}}{}}0000{{{b{j}}}{{b{jc}}}{}}0000{{lnA`}{{Ad{Ab}}}}{A`Af}{{{b{Ah}}}Ah}{{{b{A`}}}A`}{{b{b{jc}}}f{}}0{{bAj}f}0{lf}{{{b{n}}Al{b{{An{Aj}}}}}f}{{}h}000{{}{{B`{c}}}{}}0000{{{b{j}}}{{B`{{b{jc}}}}}{}}0000{b{{B`{{b{c}}}}}{}}0000{{}f}{{}Ab}{Af{{b{c}}}{}}0000{Af{{b{jc}}}{}}0000{A`Bb}{Aff}0000{{{b{Ah}}{b{jBd}}}Bf}{{{b{A`}}{b{jBd}}}Bf}{cc{}}0000{{{b{Bh}}}{{Bl{AhBj}}}}{{{b{Bh}}}{{Bl{A`Bj}}}}{{{b{jBh}}}{{Bl{AhBj}}}}{{{b{jBh}}}{{Bl{A`Bj}}}}{{{b{c}}}c{}}0{{}{{C`{Bn}}}}{{{b{Cb}}}Cd}{{}Af}0000{A`Cf}{{}c{}}0000`{A`Af}{A`Cd}0{{{b{Ab}}Af}f}`1{{}Ch}``{{{b{n}}}f}34{bc{}}0{c{{Bl{e}}}{}{}}0000{{}{{Bl{c}}}{}}0000{bCj}0000{{{b{jAh}}{b{Bh}}}{{Bl{fBj}}}}{{{b{jA`}}{b{Bh}}}{{Bl{fBj}}}}{{{b{jAh}}{b{jBh}}}{{Bl{fBj}}}}{{{b{jA`}}{b{jBh}}}{{Bl{fBj}}}}{A`Bb}{{}c{}}0000{{}b}{{Cl{C`{Cn}}A`}{{Ad{Ab}}}}{{Cl{C`{Cn}}A`}{{Ad{{Dd{D`Db}}}}}}{{{b{Db}}BbCd}{{Ad{{Dd{DfDf}}}}}}{{D`A`}{{Ad{f}}}}{{{b{Ch}}{b{{C`{Cn}}}}{b{A`}}}{{Dd{ClD`}}}}{{AfCf}Dh}6{{DjDlA`}{{Ad{Ab}}}}{{DjDlA`}{{Ad{{Dd{DnE`}}}}}}{{{b{E`}}BbCd}{{Ad{{Dd{DfDf}}}}}}{{DnA`}{{Ad{f}}}}{{{b{Ch}}DlEb{b{A`}}}{{Dd{DjDn}}}}5`{{bd}f}{hh}0{b{{b{c}}}{}}{{{b{j}}}{{b{jc}}}{}}{{{b{Ed}}}Ed}{{b{b{jc}}}f{}}{{bAj}f}{{}h}0{{}{{B`{c}}}{}}{{{b{j}}}{{B`{{b{jc}}}}}{}}{b{{B`{{b{c}}}}}{}}{Af{{b{c}}}{}}{Af{{b{jc}}}{}}{Aff}{{{b{Ed}}{b{jBd}}}Bf}{cc{}}{{{b{Bh}}}{{Bl{EdBj}}}}{{{b{jBh}}}{{Bl{EdBj}}}}{{{b{c}}}c{}}{{}{{C`{Bn}}}}{{}Af}{{}c{}}{bc{}}{c{{Bl{e}}}{}{}}{{}{{Bl{c}}}{}}{bCj}{{{b{jEd}}{b{Bh}}}{{Bl{fBj}}}}{{{b{jEd}}{b{jBh}}}{{Bl{fBj}}}}{{}c{}}```{DfBb}{b{{b{c}}}{}}00{{{b{j}}}{{b{jc}}}{}}00{EfEh}0{EfBb}4{{}{{B`{c}}}{}}00{{{b{j}}}{{B`{{b{jc}}}}}{}}00{b{{B`{{b{c}}}}}{}}00{{}Ej}{{}Ef}{Af{{b{c}}}{}}00{Af{{b{jc}}}{}}00{Aff}00{DfEl}:{{{b{Ej}}{b{jBd}}}Bf}{{{b{Ef}}{b{jBd}}}Bf}{{{b{Df}}{b{jBd}}}Bf}{cc{}}00{{}Af}00{{}c{}}00{{ElBbElBb}Df}{{{b{Ej}}{b{Cb}}}f}{DfBb}{{{b{jEj}}Df}f}{EjEf}{EjAf}{DfEn}{{ElBb}En}{EfEh}{EjEl}{EjBb}{c{{Bl{e}}}{}{}}00{{}{{Bl{c}}}{}}00{DfEl}5{bCj}00{{}c{}}00","D":"Dj","p":[[1,"reference",null,null,1],[5,"Private",260],[1,"unit"],[5,"Command",261],[0,"mut"],[6,"EndpointSelector",0],[6,"ConnectionSelector",0],[5,"Opt",0],[5,"ClientStats",0],[8,"Result",262],[1,"usize"],[6,"Commands",0],[1,"u8"],[1,"u32"],[1,"slice"],[5,"Compat",263],[1,"u64"],[5,"Formatter",264],[8,"Result",264],[5,"ArgMatches",265],[8,"Error",266],[6,"Result",267,null,1],[5,"Id",268],[6,"Option",269,null,1],[1,"str"],[1,"bool"],[1,"u16"],[5,"Runtime",270],[5,"TypeId",271],[5,"NodeAddr",272],[5,"RelayUrl",273],[5,"Endpoint",274],[5,"Connection",274],[1,"tuple",null,null,1],[5,"TransferResult",187],[5,"TransportConfig",275],[6,"SocketAddr",276],[5,"CertificateDer",277],[5,"Endpoint",278],[5,"Connection",279],[6,"PrivateKeyDer",277],[5,"Opt",155],[5,"StreamStats",187],[5,"Histogram",280],[5,"Stats",187],[5,"Duration",281],[1,"f64"]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAN8AEQAAABwAHwAmAEcABgBTAAwAZgAAAGoAAQBtAAMAcwAUAIkABQCRAAAAlAABAJgAAACbABIArwAEALUALQDmAAIA7AAYAA==","P":[[18,"T"],[28,""],[32,"T"],[34,""],[42,"T"],[57,""],[59,"T"],[69,""],[77,"T"],[82,""],[86,"T"],[88,""],[96,"U"],[102,""],[114,"T"],[116,"U,T"],[121,"U"],[126,""],[136,"V"],[141,""],[159,"T"],[161,""],[162,"T"],[163,""],[166,"T"],[171,""],[173,"T"],[174,""],[176,"T"],[177,""],[179,"U"],[180,"T"],[181,"U,T"],[182,"U"],[183,""],[186,"V"],[190,""],[191,"T"],[197,""],[201,"T"],[210,""],[212,"T"],[218,""],[226,"T"],[229,""],[232,"U"],[235,""],[246,"U,T"],[249,"U"],[252,""],[257,"V"]]}],["iroh_dns_server",{"t":"FNNNNNNNNNCCNNNNCNNNCNNNCCNNNNNNGFPPFFFNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNOONNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNOFFFFNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNGPFFFPPGPPPNNNNOONNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFNNNNNNNOOOOOONNNNOOOONNOOOOOONNNNFNNNNNNNNHNNNNNNFNNNNNNNNNONNNOONNNNN","n":["ZoneStore","__clone_box","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","config","dns","fmt","from","from_ref","get_signed_packet","http","in_memory","insert","into","metrics","new","persistent","resolve","server","state","to_owned","try_from","try_into","type_id","vzip","with_mainline_fallback","BootstrapOption","Config","Custom","Default","MainlineConfig","MetricsConfig","StoreConfig","__clone_box","bind_addr","bootstrap","borrow","","","","","borrow_mut","","","","","clone","clone_into","clone_to_uninit","compat","","","","","compat_mut","","","","","compat_ref","","","","","data_dir","default","","","","deserialize","","","","","disabled","","dns","enabled","fmt","","","","","from","","","","","from_ref","http","https","into","","","","","load","mainline","metrics","pkarr_put_rate_limit","serialize","","","","","signed_packet_store_path","to_owned","try_from","","","","","try_into","","","","","type_id","","","","","vzip","","","","","zone_store","DnsConfig","DnsHandler","DnsServer","Handle","__clone_box","","","answer_request","bind_addr","borrow","","","","borrow_mut","","","","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","compat_mut","","","","compat_ref","","","","default_soa","default_ttl","deserialize","fmt","","","from","","","","from_ref","","","handle_request","into","","","","local_addr","new","origins","port","rr_a","rr_aaaa","rr_ns","run_until_done","send_response","serialize","shutdown","spawn","to_owned","","","try_from","","","","try_into","","","","type_id","","","","vzip","","","","CertMode","Disabled","HttpConfig","HttpServer","HttpsConfig","LetsEncrypt","Manual","RateLimitConfig","SelfSigned","Simple","Smart","__clone_box","","","","bind_addr","","borrow","","","","","borrow_mut","","","","","cert_mode","clone","","","","clone_into","","","","clone_to_uninit","","","","compat","","","","","compat_mut","","","","","compat_ref","","","","","default","","deserialize","","","","domains","eq","equivalent","","","fmt","","","","","from","","","","","from_ref","","","","http_addr","https_addr","into","","","","","letsencrypt_contact","letsencrypt_prod","port","","run_until_done","serialize","","","","shutdown","spawn","to_owned","","","","to_string","try_from","","","","","try_into","","","","","type_id","","","","","vzip","","","","","Metrics","as_iterable","borrow","borrow_mut","compat","compat_mut","compat_ref","default","dns_lookup_error","dns_lookup_notfound","dns_lookup_success","dns_requests","dns_requests_https","dns_requests_udp","field_count","field_ref","fmt","from","http_requests","http_requests_duration_ms","http_requests_error","http_requests_success","into","name","pkarr_publish_noop","pkarr_publish_update","store_packets_expired","store_packets_inserted","store_packets_removed","store_packets_updated","try_from","try_into","type_id","vzip","Server","borrow","borrow_mut","compat","compat_mut","compat_ref","from","into","run_until_error","run_with_config_until_ctrl_c","shutdown","spawn","try_from","try_into","type_id","vzip","AppState","__clone_box","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","dns_handler","from","from_ref","into","metrics","store","to_owned","try_from","try_into","type_id","vzip"],"q":[[0,"iroh_dns_server"],[32,"iroh_dns_server::config"],[134,"iroh_dns_server::dns"],[221,"iroh_dns_server::http"],[344,"iroh_dns_server::metrics"],[378,"iroh_dns_server::server"],[394,"iroh_dns_server::state"],[415,"dyn_clone::sealed"],[416,"iroh_dns_server::store"],[417,"async_compat"],[418,"core::fmt"],[419,"pkarr::signed_packet"],[420,"core::option"],[421,"n0_snafu::error"],[422,"alloc::sync"],[423,"std::path"],[424,"core::convert"],[425,"hickory_proto::rr::domain::name"],[426,"hickory_proto::rr::record_type"],[427,"hickory_proto::rr::rr_set"],[428,"core::result"],[429,"core::any"],[430,"serde::de"],[431,"iroh_dns_server::http::rate_limiting"],[432,"serde::ser"],[433,"hickory_server::server::request_handler"],[434,"bytes::bytes"],[435,"alloc::string"],[436,"core::future::future"],[437,"alloc::boxed"],[438,"core::pin"],[439,"hickory_server::server::response_handler"],[440,"core::net::socket_addr"],[441,"alloc::vec"],[442,"hickory_server::authority::message_response"],[443,"hickory_proto::rr::resource"],[444,"core::iter::traits::iterator"],[445,"core::marker"],[446,"iroh_dns_server::http::tls"],[447,"iroh_metrics::iterable"],[448,"iroh_metrics::metrics"],[449,"iroh_metrics::base"]],"i":"`j00000000``0000`000`000``000000``Bn0```CdC`CbCh3214032143330321403214032140031403214220103214032143000321400000321403032140321403214032140````ClDbDh12Ef32103213213213210321032103213333210321321203210233333013003210321032103210321`Cn```Fl0`01110FhFj10G`432104321143214321432104321043210432144432113333433210432143210004321112104321004321304321043210432104321`Aj00000000000000000000000000000000`Gn0000000`000000`Gb0000000000000000000","f":"`{{bd}f}{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{{b{j}}}j}{{b{b{hc}}}f{}}{{bl}f}{{}{{n{c}}}{}}{{{b{h}}}{{n{{b{hc}}}}}{}}{b{{n{{b{c}}}}}{}}``{{{b{j}}{b{hA`}}}Ab}{cc{}}{{{b{c}}}c{}}{{{b{j}}{b{`}}}{{Ah{{Af{Ad}}}}}}```{{}c{}}```{{{b{j}}{b{`}}{b{Bd}}Bf}{{Ah{{Af{{Al{Bh}}}}}}}}``{bc{}}{c{{Bj{e}}}{}{}}{{}{{Bj{c}}}{}}{bBl}{{}c{}}{{jBn}j}```````{{bd}f}{C`Af}{CbAf}{b{{b{c}}}{}}0000{{{b{h}}}{{b{hc}}}{}}0000{{{b{Cd}}}Cd}{{b{b{hc}}}f{}}{{bl}f}{{}{{n{c}}}{}}0000{{{b{h}}}{{n{{b{hc}}}}}{}}0000{b{{n{{b{c}}}}}{}}0000{{}{{Ah{Cf}}}}{{}Ch}{{}Cd}{{}Cb}{{}Bn}{c{{Bj{Ch}}}Cj}{c{{Bj{Cd}}}Cj}{c{{Bj{C`}}}Cj}{c{{Bj{Cb}}}Cj}{c{{Bj{Bn}}}Cj}{{}C`}{C`An}{ChCl}{CbAn}{{{b{Ch}}{b{hA`}}}Ab}{{{b{Cd}}{b{hA`}}}Ab}{{{b{C`}}{b{hA`}}}Ab}{{{b{Cb}}{b{hA`}}}Ab}{{{b{Bn}}{b{hA`}}}Ab}{cc{}}0000{{{b{c}}}c{}}{ChAf}0{{}c{}}0000{c{{Ah{Ch}}}{{Bb{B`}}}}22{ChCn}{{{b{Ch}}c}BjD`}{{{b{Cd}}c}BjD`}{{{b{C`}}c}BjD`}{{{b{Cb}}c}BjD`}{{{b{Bn}}c}BjD`}{{}{{Ah{Cf}}}}{bc{}}{c{{Bj{e}}}{}{}}0000{{}{{Bj{c}}}{}}0000{bBl}0000{{}c{}}0000>````{{bd}f}00{{{b{Db}}Dd}{{Ah{Df}}}}{ClAf}{b{{b{c}}}{}}000{{{b{h}}}{{b{hc}}}{}}000{{{b{Cl}}}Cl}{{{b{Db}}}Db}{{{b{Dh}}}Dh}{{b{b{hc}}}f{}}00{{bl}f}00{{}{{n{c}}}{}}000{{{b{h}}}{{n{{b{hc}}}}}{}}000{b{{n{{b{c}}}}}{}}000{ClDj}{ClDl}{c{{Bj{Cl}}}Cj}{{{b{Cl}}{b{hA`}}}Ab}{{{b{Db}}{b{hA`}}}Ab}{{{b{Dh}}{b{hA`}}}Ab}{cc{}}000{{{b{c}}}c{}}00{{{b{Db}}{b{Dd}}c}{{Eb{{E`{Dn}}}}}Ed}{{}c{}}000{{{b{Ef}}}Eh}{{j{b{Cl}}{Al{Aj}}}{{Ah{Db}}}}{ClEj}{ClEl}{ClAf}00{Ef{{Ah{f}}}}{{{b{hDh}}{En{cegi}}}{{Eb{{E`{Dn}}}}}{{Fd{}{{F`{{b{Fb}}}}}}Ff}{{Fd{}{{F`{{b{Fb}}}}}}Ff}{{Fd{}{{F`{{b{Fb}}}}}}Ff}{{Fd{}{{F`{{b{Fb}}}}}}Ff}}{{{b{Cl}}c}BjD`}2{{ClDb}{{Ah{Ef}}}}{bc{}}00{c{{Bj{e}}}{}{}}000{{}{{Bj{c}}}{}}000{bBl}000{{}c{}}000```````````{{bd}f}000{FhAf}{FjAf}{b{{b{c}}}{}}0000{{{b{h}}}{{b{hc}}}{}}0000{FjFl}{{{b{Cn}}}Cn}{{{b{Fl}}}Fl}{{{b{Fh}}}Fh}{{{b{Fj}}}Fj}{{b{b{hc}}}f{}}000{{bl}f}000{{}{{n{c}}}{}}0000{{{b{h}}}{{n{{b{hc}}}}}{}}0000{b{{n{{b{c}}}}}{}}0000{{}Cn}{{}{{b{Cn}}}}{c{{Bj{Cn}}}Cj}{c{{Bj{Fl}}}Cj}{c{{Bj{Fh}}}Cj}{c{{Bj{Fj}}}Cj}{FjEj}{{{b{Fl}}{b{Fl}}}An}{{b{b{c}}}An{}}00{{{b{Cn}}{b{hA`}}}Ab}{{{b{Fl}}{b{hA`}}}{{Bj{fFn}}}}{{{b{Fl}}{b{hA`}}}Ab}{{{b{Fh}}{b{hA`}}}Ab}{{{b{Fj}}{b{hA`}}}Ab}{cc{}}0000{{{b{c}}}c{}}000{{{b{G`}}}{{Af{Eh}}}}0{{}c{}}0000{FjAf}0{FhEl}{FjEl}{G`{{Ah{f}}}}{{{b{Cn}}c}BjD`}{{{b{Fl}}c}BjD`}{{{b{Fh}}c}BjD`}{{{b{Fj}}c}BjD`}4{{{Af{Fh}}{Af{Fj}}CnGb}{{Ah{G`}}}}{bc{}}000{bDj}{c{{Bj{e}}}{}{}}0000{{}{{Bj{c}}}{}}0000{bBl}0000{{}c{}}0000`{b{{b{Gd}}}}{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{}{{n{c}}}{}}{{{b{h}}}{{n{{b{hc}}}}}{}}{b{{n{{b{c}}}}}{}}{{}Aj}{AjGf}00000{{{b{Aj}}}Gh}{{{b{Aj}}Gh}{{Af{Gj}}}}{{{b{Aj}}{b{hA`}}}Ab}{cc{}}4444{{}c{}}{{{b{Aj}}}{{b{Gl}}}}666666{c{{Bj{e}}}{}{}}{{}{{Bj{c}}}{}}{bBl}{{}c{}}`{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{}{{n{c}}}{}}{{{b{h}}}{{n{{b{hc}}}}}{}}{b{{n{{b{c}}}}}{}};:{Gn{{Ah{f}}}}{Ch{{Ah{f}}}}1{{Chj{Al{Aj}}}{{Ah{Gn}}}};:98`{{bd}f}87{{{b{Gb}}}Gb}{{b{b{hc}}}f{}}{{bl}f}987{GbDb}{cc{}}{{{b{c}}}c{}}{{}c{}}{GbAl}{Gbj}{bc{}}{c{{Bj{e}}}{}{}}{{}{{Bj{c}}}{}}{bBl}{{}c{}}","D":"AAj","p":[[1,"reference",null,null,1],[5,"Private",415],[1,"unit"],[0,"mut"],[5,"ZoneStore",0,416],[1,"u8"],[5,"Compat",417],[5,"Formatter",418],[8,"Result",418],[5,"SignedPacket",419],[6,"Option",420,null,1],[8,"Result",421],[5,"Metrics",344],[5,"Arc",422,null,1],[1,"bool"],[5,"Path",423],[10,"AsRef",424],[5,"Name",425],[6,"RecordType",426],[5,"RecordSet",427],[6,"Result",428,null,1],[5,"TypeId",429],[6,"BootstrapOption",32],[5,"MetricsConfig",32],[5,"MainlineConfig",32],[5,"StoreConfig",32],[5,"PathBuf",423],[5,"Config",32],[10,"Deserializer",430],[5,"DnsConfig",134],[6,"RateLimitConfig",221,431],[10,"Serializer",432],[5,"DnsHandler",134],[5,"Request",433],[5,"Bytes",434],[5,"Handle",134],[5,"String",435],[1,"u32"],[10,"Future",436,null,1],[5,"Box",437,null,1],[5,"Pin",438],[10,"ResponseHandler",439],[5,"DnsServer",134],[6,"SocketAddr",440],[5,"Vec",441],[1,"u16"],[5,"MessageResponse",442],[17,"Item"],[5,"Record",443],[10,"Iterator",444],[10,"Send",445],[5,"HttpConfig",221],[5,"HttpsConfig",221],[6,"CertMode",221,446],[5,"Error",418],[5,"HttpServer",221],[5,"AppState",394],[10,"Iterable",447],[5,"Counter",448],[1,"usize"],[5,"MetricItem",449],[1,"str"],[5,"Server",378]],"r":[[0,416],[1,416],[2,416],[3,416],[4,416],[5,416],[6,416],[7,416],[8,416],[9,416],[12,416],[13,416],[14,416],[15,416],[17,416],[18,416],[19,416],[21,416],[22,416],[23,416],[26,416],[27,416],[28,416],[29,416],[30,416],[31,416],[221,446],[222,431],[226,446],[227,446],[228,431],[229,446],[230,431],[231,431],[232,431],[233,446],[239,431],[240,446],[244,431],[245,446],[249,431],[250,446],[253,431],[254,446],[257,431],[258,446],[262,431],[263,446],[267,431],[268,446],[272,431],[273,446],[276,431],[277,431],[278,431],[279,446],[283,446],[284,446],[285,446],[286,446],[287,431],[288,446],[289,446],[293,431],[294,446],[297,431],[298,446],[304,431],[305,446],[313,431],[314,446],[319,431],[320,446],[323,446],[325,431],[326,446],[330,431],[331,446],[335,431],[336,446],[340,431],[341,446]],"b":[[276,"impl-Default-for-RateLimitConfig"],[277,"impl-Default-for-%26RateLimitConfig"],[288,"impl-Display-for-CertMode"],[289,"impl-Debug-for-CertMode"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAABIBIQACAAgADQAAAA8AAAAbAAQAKAAAACsAGwBIAAgAVQAEAF8AAABrAAQAcQAUAIsAAgCQABwArwADALcAAwDHAAEAywASAOkAAwDvAAkA+gAgABwBCAAqAQMAOgEDAEABGABaAQYAZwECAHABAAB3AQMAfAEEAIcBAwCMAQgAlwEAAJsBBAA=","P":[[2,"T"],[4,""],[5,"T"],[6,""],[7,"T"],[12,""],[13,"T"],[15,""],[19,"U"],[21,""],[22,""],[23,""],[26,"T"],[27,"U,T"],[28,"U"],[29,""],[30,"V"],[31,""],[42,"T"],[52,""],[53,"T"],[54,""],[55,"T"],[70,""],[75,"__D"],[80,""],[89,"T"],[95,""],[97,"U"],[102,""],[103,""],[106,"__S"],[111,""],[112,"T"],[113,"U,T"],[118,"U"],[123,""],[128,"V"],[133,""],[143,"T"],[151,""],[154,"T"],[157,""],[160,"T"],[172,""],[174,"__D"],[175,""],[178,"T"],[185,"R"],[186,"U"],[190,""],[198,",,,"],[199,"__S"],[200,""],[202,"T"],[205,"U,T"],[209,"U"],[213,""],[217,"V"],[232,""],[238,"T"],[248,""],[253,"T"],[257,""],[261,"T"],[276,""],[278,"__D"],[282,""],[284,"K"],[287,""],[292,"T"],[301,""],[303,"U"],[308,""],[313,"__S"],[317,""],[319,"T"],[323,""],[324,"U,T"],[329,"U"],[334,""],[339,"V"],[345,""],[346,"T"],[351,""],[361,"T"],[362,""],[366,"U"],[367,""],[374,"U,T"],[375,"U"],[376,""],[377,"V"],[379,"T"],[385,"U"],[386,""],[390,"U,T"],[391,"U"],[392,""],[393,"V"],[395,""],[396,"T"],[398,""],[399,"T"],[400,""],[401,"T"],[404,""],[405,"T"],[407,"U"],[408,""],[410,"T"],[411,"U,T"],[412,"U"],[413,""],[414,"V"]]}],["iroh_relay",{"t":"EFFFFNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNCNNNNOCCONNCNNNNNNNNNNNNNNNNNNONNNNNFFFFGPGPPPPPPPPPPPPPPPPGGPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOSSSSSGFPPSSPPPFFPFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOSSSSPGPGPSPPPPPGPTFFKFPPGPPFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOCCCCCPPGGPPPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOSHPPGPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOGFPPGPPPPPPPSSPPPPPGPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOSPPGSSFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOGGPPPPGFSPPPPFPPFPPPFPFFPFPFFGGPFPNNNOOOONNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNONONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONONNOOOONOONNOOOOOOONNNNNNCONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOHHHHH","n":["MAX_PACKET_SIZE","PingTracker","RelayMap","RelayNode","RelayQuicConfig","__clone_box","","","borrow","","","","borrow_mut","","","","client","clone","","","clone_into","","","clone_to_uninit","","","cmp","","compare","","compat","","","","compat_mut","","","","compat_ref","","","","contains_node","default","","default_timeout","defaults","deref","","","","deref_mut","","","","deserialize","","dns","drop","","","","empty","eq","","","equivalent","","","","","","","","","fmt","","","","","","from","","","","","","","from_iter","","get_node","http","init","","","","into","","","","is_empty","len","new","new_ping","node_info","nodes","partial_cmp","","pong_received","port","protos","quic","","serialize","","server","timeout","to_owned","","","to_string","","try_from","","","","try_into","","","","type_id","","","","url","urls","vzip","","","","Client","ClientBuilder","ClientSink","ClientStream","ConnectError","Dial","DialError","Dns","ExceedsMaxPacketSize","Handshake","InvalidRelayUrl","InvalidTargetPort","InvalidTlsServername","InvalidUrl","InvalidWebsocketUrl","Io","NoLocalAddr","Protocol","ProxyConnect","ProxyConnectInvalidStatus","ProxyInvalidTargetPort","ProxyInvalidTlsServername","ProxyInvalidUrl","RecvError","SendError","StreamError","","Timeout","Tls","UnexpectedUpgradeStatus","Upgrade","Websocket","__clone_box","address_family_selector","as_error_source","","","","backtrace","","","","borrow","","","","","","","","borrow_mut","","","","","","","","cause","","","","clone","clone_into","clone_to_uninit","compat","","","","","","","","compat_mut","","","","","","","","compat_ref","","","","","","","","connect","deref","","","","","","","","deref_mut","","","","","","","","description","","","","drop","","","","","","","","fmt","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","in_current_span","","","","init","","","","","","","","insecure_skip_cert_verify","into","","","","","","","","key_cache_capacity","local_addr","make_dangerous_client_config","new","poll_close","","poll_flush","","poll_next","","poll_ready","","proxy_url","source","","","","split","start_send","","to_owned","to_string","","","","try_from","","","","","","","","try_into","","","","","","","","try_poll_next","","type_id","","","","","","","","vzip","","","","","","","","backtrace","","","","","","","","","","code","source","","","","","span_trace","","","","","","","","","","url","","backtrace","","","","","","","","","","proxy_hostname","proxy_url","source","","","","span_trace","","","","","","","","","","status","url","backtrace","","source","","span_trace","","backtrace","","size","source","span_trace","","DEFAULT_HTTPS_PORT","DEFAULT_HTTP_PORT","DEFAULT_KEY_CACHE_CAPACITY","DEFAULT_METRICS_PORT","DEFAULT_RELAY_QUIC_PORT","DnsError","DnsResolver","InvalidResponse","MissingHost","N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING","NoResponse","Resolve","ResolveBoth","StaggeredError","TXT","Timeout","TxtLookup","__clone_box","","","as_error_source","","backtrace","","borrow","","","","","borrow_mut","","","","","cause","","clear_cache","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","","compat_mut","","","","","compat_ref","","","","","default","deref","","","","","deref_mut","","","","","description","","drop","","","","","fmt","","","","","","","","from","","","","","","","","","in_current_span","","init","","","","","into","","","","","into_iter","lookup_ipv4","lookup_ipv4_ipv6","lookup_ipv4_ipv6_staggered","lookup_ipv4_staggered","lookup_ipv6","lookup_ipv6_staggered","lookup_node_by_domain_name","lookup_node_by_domain_name_staggered","lookup_node_by_id","lookup_node_by_id_staggered","lookup_txt","new","reset","resolve","resolve_host","source","","to_owned","","","to_string","","","try_from","","","","","try_into","","","","","txt_data","type_id","","","","","vzip","","","","","with_nameserver","backtrace","","","","","","ipv4","ipv6","source","","span_trace","","","","","","CLIENT_AUTH_HEADER","RELAY_PATH","RELAY_PROBE_PATH","RELAY_PROTOCOL_VERSION","AttrFromString","DecodingError","","EncodingError","FailedBuildingPacket","IROH_TXT_NAME","InvalidEncodingZ32","InvalidLabel","InvalidLength","InvalidSignature","InvalidTxtEntry","LookupError","LookupFailed","MAX_LENGTH","MaxLengthExceededError","NodeData","NodeIdExt","NodeInfo","NotAnIrohRecord","NumLabels","ParseError","","UnexpectedFormat","UserData","Utf8","__clone_box","","","add_direct_addresses","as_error_source","","","","","as_ref","backtrace","","","","","borrow","","","","","","","","borrow_mut","","","","","","","","cause","","","","","clear_direct_addresses","clone","","","clone_into","","","clone_to_uninit","","","cmp","compare","compat","","","","","","","","compat_mut","","","","","","","","compat_ref","","","","","","","","data","default","deref","","","","","","","","","deref_mut","","","","","","","","","description","","","","","direct_addresses","drop","","","","","","","","eq","","","equivalent","","","","","","","","","fmt","","","","","","","","","","","","","","from","","","","","","","","","","","","from_parts","from_pkarr_signed_packet","from_str","from_txt_lookup","from_z32","hash","in_current_span","","","","","init","","","","","","","","into","","","","","","","","into_node_addr","new","","node_id","partial_cmp","relay_url","set_relay_url","set_user_data","source","","","","","to_node_addr","to_owned","","","to_pkarr_signed_packet","to_string","","","","","","to_txt_strings","to_z32","try_from","","","","","","","","","try_into","","","","","","","","type_id","","","","","","","","user_data","vzip","","","","","","","","with_direct_addresses","","with_relay_url","","with_user_data","","backtrace","","","len","source","","span_trace","","","backtrace","","source","","span_trace","","backtrace","","","source","","","span_trace","","","backtrace","","","","","","key","label","num_labels","s","source","","span_trace","","","","","","common","disco","handshake","relay","streams","ClientAuth","ClientToRelayDatagrams","FrameType","FrameTypeError","Health","NodeGone","Ping","Pong","RelayToClientDatagrams","Restarting","ServerChallenge","ServerConfirmsAuth","ServerDeniesAuth","UnexpectedEnd","UnknownFrameType","__clone_box","as_error_source","backtrace","borrow","","borrow_mut","","cause","clone","clone_into","clone_to_uninit","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","description","drop","","eq","equivalent","","","fmt","","","","from","","in_current_span","init","","into","","source","to_owned","to_string","","try_from","","","try_from_primitive","try_into","","type_id","","vzip","","backtrace","","span_trace","","tag","MAGIC","looks_like_disco_wrapper","ClientAuthHeaderInvalid","DeserializationError","Error","FrameTypeError","ServerDeniedAuth","Timeout","UnexpectedEnd","UnexpectedFrameType","Websocket","as_error_source","backtrace","borrow","borrow_mut","cause","compat","compat_mut","compat_ref","deref","deref_mut","description","drop","fmt","","from","","","in_current_span","init","into","source","to_string","try_from","try_into","type_id","vzip","backtrace","","","","","","","","expected_types","frame_type","","reason","source","","","","span_trace","","","","","","","","value","ClientToRelayMsg","Datagrams","","","Error","FrameTooLarge","FrameTypeError","Health","InvalidFrame","InvalidFrameType","InvalidProtocolMessageEncoding","InvalidPublicKey","MAX_PACKET_SIZE","MAX_PAYLOAD_SIZE","NodeGone","Ping","","Pong","","RelayToClientMsg","Restarting","SerDe","Timeout","TooSmall","UnexpectedFrame","__clone_box","","","as_error_source","backtrace","borrow","","","","borrow_mut","","","","cause","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","compat_mut","","","","compat_ref","","","","contents","deref","","","","deref_mut","","","","description","drop","","","","ecn","eq","","","equivalent","","","","","","","","","fmt","","","","","from","","","","","","","","in_current_span","init","","","","into","","","","segment_size","source","to_owned","","","to_string","try_from","","","","try_into","","","","typ","type_id","","","","vzip","","","","datagrams","dst_node_id","backtrace","","","","","","","","","","expected","frame_len","frame_type","got","source","","","","","span_trace","","","","","","","","","","datagrams","problem","reconnect_in","remote_node_id","try_for","ALPN_QUIC_ADDR_DISC","Connect","Connection","Error","QUIC_ADDR_DISC_CLOSE_CODE","QUIC_ADDR_DISC_CLOSE_REASON","QuicClient","WatchRecv","__clone_box","as_error_source","backtrace","borrow","","borrow_mut","","cause","clone","clone_into","clone_to_uninit","compat","","compat_mut","","compat_ref","","create_conn","deref","","deref_mut","","description","drop","","fmt","","","from","","","","","in_current_span","init","","into","","new","source","to_owned","to_string","try_from","","try_into","","type_id","","vzip","","backtrace","","","source","","","span_trace","","","Access","AccessConfig","AcmeEventStreamFinished","Allow","BindTcpListener","BindTlsListener","CertConfig","ClientRateLimit","DEFAULT_CERT_RELOAD_INTERVAL","Deny","Everyone","JoinError","LetsEncrypt","Limits","LocalAddr","Manual","Metrics","","NoLocalAddr","NoRelayServicesEnabled","QuicConfig","QuicSpawn","RelayConfig","RelayMetrics","Reloading","ReloadingResolver","Restricted","Server","ServerConfig","SpawnError","SupervisorError","TaskCancelled","TlsConfig","TlsHeaderParse","__clone_box","","","accept_conn_burst","accept_conn_limit","accepts","access","as_error_source","","as_iterable","backtrace","","bind_addr","borrow","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","bytes_per_second","bytes_recv","bytes_rx_ratelimited_total","bytes_sent","cause","","cert","certificates","client_rx","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","","","","","","","","","","","","compat_mut","","","","","","","","","","","","","","","compat_ref","","","","","","","","","","","","","","","conns_rx_ratelimited_total","default","","","","deref","","","","","","","","","","","","","","","","deref_mut","","","","","","","","","","","","","","","description","","disco_packets_dropped","disco_packets_recv","disco_packets_sent","disconnects","drop","","","","","","","","","","","","","","","eq","equivalent","","","field_count","field_ref","fmt","","","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","got_ping","groups","groups_cloned","http_addr","http_bind_addr","http_url","https_addr","https_bind_addr","https_url","in_current_span","","init","","","","","","","","","","","","","","","","into","","","","","","","","","","","","","","","is_allowed","key_cache_capacity","limits","max_burst_bytes","metrics","metrics_addr","name","","other_packets_dropped","other_packets_recv","other_packets_sent","quic","quic_addr","quic_bind_addr","relay","reload","resolve","send_packets_dropped","send_packets_recv","send_packets_sent","sent_pong","server","server_config","","shutdown","","source","","spawn","task_handle","testing","tls","to_owned","","","to_string","","try_from","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","unique_client_keys","unknown_frames","vzip","","","","","","","","","","","","","","","certs","state","addr","backtrace","","","","","","source","","","","","span_trace","","","","","","backtrace","","","","","source","","span_trace","","","","","quic_config","relay_config","self_signed_tls_certs_and_config","server_config","tls_config"],"q":[[0,"iroh_relay"],[140,"iroh_relay::client"],[367,"iroh_relay::client::ConnectError"],[395,"iroh_relay::client::DialError"],[423,"iroh_relay::client::RecvError"],[429,"iroh_relay::client::SendError"],[435,"iroh_relay::defaults"],[440,"iroh_relay::dns"],[590,"iroh_relay::dns::DnsError"],[606,"iroh_relay::http"],[610,"iroh_relay::node_info"],[872,"iroh_relay::node_info::DecodingError"],[881,"iroh_relay::node_info::EncodingError"],[887,"iroh_relay::node_info::LookupError"],[896,"iroh_relay::node_info::ParseError"],[914,"iroh_relay::protos"],[919,"iroh_relay::protos::common"],[987,"iroh_relay::protos::common::FrameTypeError"],[992,"iroh_relay::protos::disco"],[994,"iroh_relay::protos::handshake"],[1029,"iroh_relay::protos::handshake::Error"],[1054,"iroh_relay::protos::relay"],[1186,"iroh_relay::protos::relay::ClientToRelayMsg"],[1188,"iroh_relay::protos::relay::Error"],[1217,"iroh_relay::protos::relay::RelayToClientMsg"],[1222,"iroh_relay::quic"],[1280,"iroh_relay::quic::Error"],[1289,"iroh_relay::server"],[1666,"iroh_relay::server::CertConfig"],[1668,"iroh_relay::server::SpawnError"],[1686,"iroh_relay::server::SupervisorError"],[1698,"iroh_relay::server::testing"],[1703,"dyn_clone::sealed"],[1704,"iroh_relay::relay_map"],[1705,"core::cmp"],[1706,"async_compat"],[1707,"iroh_base::relay_url"],[1708,"iroh_relay::ping_tracker"],[1709,"core::time"],[1710,"core::result"],[1711,"serde::de"],[1712,"core::fmt"],[1713,"core::iter::traits::collect"],[1714,"alloc::sync"],[1715,"core::option"],[1716,"core::iter::traits::iterator"],[1717,"serde::ser"],[1718,"alloc::string"],[1719,"core::any"],[1720,"core::ops::function"],[1721,"core::marker"],[1722,"core::error"],[1723,"iroh_relay::client::conn"],[1724,"backtrace::capture"],[1725,"tokio_websockets::error"],[1726,"std::io::error"],[1727,"tokio::time::error"],[1728,"core::net::socket_addr"],[1729,"rustls::client::client_conn"],[1730,"iroh_base::key"],[1731,"core::convert"],[1732,"core::pin"],[1733,"core::task::wake"],[1734,"core::task::poll"],[1735,"url"],[1736,"http::status"],[1737,"hyper::error"],[1738,"n0_snafu::spantrace"],[1739,"hickory_resolver::error"],[1740,"hickory_resolver::resolver"],[1741,"hickory_resolver::lookup"],[1742,"core::net::ip_addr"],[1743,"reqwest::dns::resolve"],[1744,"alloc::boxed"],[1745,"http::header::name"],[1746,"alloc::collections::btree::set"],[1747,"pkarr::signed_packet"],[1748,"iroh_base::node_addr"],[1749,"core::hash"],[1750,"alloc::vec"],[1751,"z32"],[1752,"ed25519_dalek::errors"],[1753,"simple_dns::simple_dns_error"],[1754,"hickory_proto::error"],[1755,"core::str::error"],[1756,"num_enum"],[1757,"iroh_quinn_proto::varint"],[1758,"postcard::error"],[1759,"http::header::value"],[1760,"bytes::bytes"],[1761,"iroh_quinn::connection"],[1762,"iroh_quinn_proto::endpoint"],[1763,"iroh_quinn_proto::connection"],[1764,"tokio::sync::watch::error"],[1765,"iroh_quinn::endpoint"],[1766,"iroh_relay::server::metrics"],[1767,"iroh_metrics::metrics"],[1768,"iroh_metrics::iterable"],[1769,"core::num::nonzero"],[1770,"rustls_pki_types"],[1771,"core::default"],[1772,"iroh_relay::server::resolver"],[1773,"iroh_metrics::base"],[1774,"tokio::runtime::task::error"],[1775,"rustls::crypto::signer"],[1776,"reloadable_core"],[1777,"rustls::server::server_conn"],[1778,"tokio_util::task::abort_on_drop"],[1779,"tokio_rustls_acme::state"]],"i":"`````jlnAj3210321`32132132121210321032103213010`0321032121`032133213332221110332210333221333`032103213300`32101``221`032132032103210321230321`````Dn`E`Dh22121212Dl22222``1023333Cl02143214321430EbEfEh547632105476333547632105476321054763210354763210547632105476547632105544776632105544477776666321054765476321035476321030`32121202135476221354765476321054763210205476321054763210GlGnH`HbHdHfHhHjHlHn476530987654321098IfIhIjIlInJ`JbJdJfJh138762987654321045JjJl1010JnK`0110```````Fd0``000``0`FlKhKj3Kb404032140321403321321321403214032140321340321403214040321440032114440332214040321403212333333333333333403214014032140321140321403213MfMhMjMlMnN`3351543210````Nn`0`Nh`NjLl112`0Nf````44`14`4Nd1Lj154Nl473650476523014765230147650472231231231336523014765230147652301471265230114765230114765047265230147231222333111665523300144776652230114771131On4761587634125876341258232243337615823422764158207634412587634125876341258376341258323232A@`A@bA@d120210A@jA@l1010AA`AAbAAd210210AAhAAjAAlAAnAB`ABb413520543210`````ABh0``000000000ABf010010100111101010101001011111100100101001101101101010ABlABn100``En0`00000000000000000000000000000000ACbACdACfAChACjAClACnAD`11026530765432107``ADfGj`El020000``22121`2000021ADh11132013201320320320132013201320013201320113200320333222000113201111320011320132001320113201320313201320ADn0AE`AEbAEdAEfAEhAEjAElAEnAF`AFb9829765419876543210AFdAFfAFh20`AFj0````0AFl1110101000101010010101101101111011010010110101010AGhAGjAGl210210``AHlAInAHj0```1AHf3AIf`20`424`2``0`1````4`2AIl4AI`AGn0AH`AHd79179AHn25AJdAJ`39;2AId679AIh<>69325;=4178:0<>8666<>1079=89=89=869325;=4178:0<>69325;=4178:0<>69325;=4178:0<>66927693325;=4178:0<>69325;=4178:0<><>666669325;=4178:0<>====6669325;=4178:0<<>>69325;=4178:0<>>699050010<>693325;=4178:0<>69325;=4178:0<>;5580269666201233666694130<>00`59=8<>69325;=4178:0<>69325;=4178:0<>69325;=4178:0<>6669325;=4178:0<>AKhAKjAKnAL`ALbALdALfALh543210432105ALlALnAM`AMbAMd4243210`````","f":"`````{{bd}f}00{b{{b{c}}}{}}000{{{b{h}}}{{b{hc}}}{}}000`{{{b{j}}}j}{{{b{l}}}l}{{{b{n}}}n}{{b{b{hc}}}f{}}00{{bA`}f}00{{{b{l}}{b{l}}}Ab}{{{b{n}}{b{n}}}Ab}{{b{b{c}}}Ab{}}0{{}{{Ad{c}}}{}}000{{{b{h}}}{{Ad{{b{hc}}}}}{}}000{b{{Ad{{b{c}}}}}{}}000{{{b{j}}{b{Af}}}Ah}{{}Aj}{{}n}{{{b{Aj}}}Al}`{An{{b{c}}}{}}000{An{{b{hc}}}{}}000{c{{B`{l}}}Bb}{c{{B`{n}}}Bb}`{Anf}000{{}j}{{{b{j}}{b{j}}}Ah}{{{b{l}}{b{l}}}Ah}{{{b{n}}{b{n}}}Ah}{{b{b{c}}}Ah{}}00000000{{{b{Aj}}{b{hBd}}}Bf}{{{b{j}}{b{hBd}}}Bf}0{{{b{l}}{b{hBd}}}Bf}0{{{b{n}}{b{hBd}}}Bf}{cc{}}{Afj}{lj}2{Afl}33{cj{{Bj{}{{Bh{l}}}}}}{cj{{Bj{}{{Bh{Af}}}}}}{{{b{j}}{b{Af}}}{{Bn{{b{{Bl{l}}}}}}}}`{{}An}000{{}c{}}000{{{b{j}}}Ah}{{{b{j}}}An}{AlAj}{{{b{hAj}}}{{C`{A`}}}}`{{{b{j}}}{{`{{Cb{}{{Bh{{b{{Bl{l}}}}}}}}}}}}{{{b{l}}{b{l}}}{{Bn{Ab}}}}{{{b{n}}{b{n}}}{{Bn{Ab}}}}{{{b{hAj}}{C`{A`}}}f}{nCd}``{lBn}{{{b{l}}c}B`Cf}{{{b{n}}c}B`Cf}`{{{b{hAj}}}f}{bc{}}00{bCh}0{c{{B`{e}}}{}{}}000{{}{{B`{c}}}{}}000{bCj}000{lAf}{{{b{j}}}{{`{{Cb{}{{Bh{{b{Af}}}}}}}}}}{{}c{}}000````````````````````````````````{{bd}f}{{Clc}Cl{{D`{}{{Cn{Ah}}}}DbDd}}{b{{b{Df}}}}000{{{b{Dh}}}{{Bn{{b{Dj}}}}}}{{{b{Dl}}}{{Bn{{b{Dj}}}}}}{{{b{Dn}}}{{Bn{{b{Dj}}}}}}{{{b{E`}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0000000{{{b{h}}}{{b{hc}}}{}}0000000{{{b{Dh}}}{{Bn{{b{Df}}}}}}{{{b{Dl}}}{{Bn{{b{Df}}}}}}{{{b{Dn}}}{{Bn{{b{Df}}}}}}{{{b{E`}}}{{Bn{{b{Df}}}}}}{{{b{Cl}}}Cl}{{b{b{hc}}}f{}}{{bA`}f}{{}{{Ad{c}}}{}}0000000{{{b{h}}}{{Ad{{b{hc}}}}}{}}0000000{b{{Ad{{b{c}}}}}{}}0000000{{{b{Cl}}}{{B`{EbDn}}}}{An{{b{c}}}{}}0000000{An{{b{hc}}}{}}0000000{{{b{Dh}}}{{b{Ed}}}}{{{b{Dl}}}{{b{Ed}}}}{{{b{Dn}}}{{b{Ed}}}}{{{b{E`}}}{{b{Ed}}}}{Anf}0000000{{{b{Dh}}{b{hBd}}}Bf}0{{{b{Dl}}{b{hBd}}}Bf}0{{{b{Dn}}{b{hBd}}}Bf}0{{{b{E`}}{b{hBd}}}Bf}0{{{b{Cl}}{b{hBd}}}Bf}{{{b{Eb}}{b{hBd}}}Bf}{{{b{Ef}}{b{hBd}}}Bf}{{{b{Eh}}{b{hBd}}}Bf}{cc{}}{EjDh}1{ElDl}{EjDl}{EjDn}{E`Dn}5{EnDn}{F`E`}{FbE`}{FdE`}99999{{}}000{{}An}0000000{{ClAh}Cl}{{}c{}}0000000{{ClAn}Cl}{{{b{Eh}}}{{Bn{Ff}}}}{{}Fh}{{cFjFl}Cl{{Fn{Af}}}}{{{G`{{b{hEb}}}}{b{hGb}}}{{Gd{{B`{fc}}}}}{}}{{{G`{{b{hEf}}}}{b{hGb}}}{{Gd{{B`{fc}}}}}{}}10{{{G`{{b{hEb}}}}{b{hGb}}}{{Gd{{Bn{c}}}}}{}}{{{G`{{b{hEh}}}}{b{hGb}}}{{Gd{{Bn{c}}}}}{}}32{{ClGf}Cl}{{{b{Dh}}}{{Bn{{b{Df}}}}}}{{{b{Dl}}}{{Bn{{b{Df}}}}}}{{{b{Dn}}}{{Bn{{b{Df}}}}}}{{{b{E`}}}{{Bn{{b{Df}}}}}}{Eb{{Gh{EhEf}}}}{{{G`{{b{hEb}}}}Gj}{{B`{fc}}}{}}{{{G`{{b{hEf}}}}Gj}{{B`{fc}}}{}}{bc{}}{bCh}000{c{{B`{e}}}{}{}}0000000{{}{{B`{c}}}{}}0000000{{{G`{{b{hc}}}}{b{hGb}}}{{Gd{{Bn{B`}}}}}{}}0{bCj}0000000{{}c{}}0000000{GlBn}{GnBn}{H`Bn}{HbBn}{HdBn}{HfBn}{HhBn}{HjBn}{HlBn}{HnBn}{HfI`}{H`Ej}{HbEn}{HdE`}{HhIb}{HnF`}{GlId}{GnId}{H`Id}{HbId}{HdId}{HfId}{HhId}{HjId}{HlId}{HnId}{GlGf}{GnGf}{IfBn}{IhBn}{IjBn}{IlBn}{InBn}{J`Bn}{JbBn}{JdBn}{JfBn}{JhBn}{JfCh}{JbGf}{IhFd}{IjFb}{IlF`}{JdIb}{IfId}{IhId}{IjId}{IlId}{InId}{J`Id}{JbId}{JdId}{JfId}{JhId}{J`I`}{InGf}{JjBn}{JlBn}{JjEl}{JlEj}{JjId}{JlId}{JnBn}{K`Bn}{K`An}{JnEj}{JnId}{K`Id}{{}Cd}0{{}An}11````{{}b}0```````{{bd}f}00{b{{b{Df}}}}0{{{b{Fd}}}{{Bn{{b{Dj}}}}}}{{{b{{Kb{c}}}}}{{Bn{{b{Dj}}}}}{KdKf}}{b{{b{c}}}{}}0000{{{b{h}}}{{b{hc}}}{}}0000{{{b{Fd}}}{{Bn{{b{Df}}}}}}{{{b{{Kb{c}}}}}{{Bn{{b{Df}}}}}{KdKf}}{{{b{Fl}}}f}{{{b{Fl}}}Fl}{{{b{Kh}}}Kh}{{{b{Kj}}}Kj}{{b{b{hc}}}f{}}00{{bA`}f}00{{}{{Ad{c}}}{}}0000{{{b{h}}}{{Ad{{b{hc}}}}}{}}0000{b{{Ad{{b{c}}}}}{}}0000{{}Fl}{An{{b{c}}}{}}0000{An{{b{hc}}}{}}0000{{{b{Fd}}}{{b{Ed}}}}{{{b{{Kb{c}}}}}{{b{Ed}}}{KdKf}}{Anf}0000{{{b{Fd}}{b{hBd}}}Bf}0{{{b{{Kb{c}}}}{b{hBd}}}Bf{KdKdKf}}{{{b{{Kb{c}}}}{b{hBd}}}Bf{KdKf}}{{{b{Fl}}{b{hBd}}}Bf}{{{b{Kh}}{b{hBd}}}Bf}{{{b{Kj}}{b{hBd}}}Bf}0{FbFd}{KlFd}{cc{}}0{KnFl}11{L`Kh}2{{}}0{{}An}0000{{}c{}}0000{Khc{}}{{{b{Fl}}cAl}{{B`{{`{{Cb{}{{Bh{Lb}}}}}}Fd}}}Ld}0{{{b{Fl}}cAl{b{{Lh{Lf}}}}}{{B`{{`{{Cb{}{{Bh{Lb}}}}}}{Kb{Fd}}}}}Ld}010{{{b{Fl}}{b{Ed}}}{{B`{LjLl}}}}{{{b{Fl}}{b{Ed}}{b{{Lh{Lf}}}}}{{B`{Lj{Kb{Ll}}}}}}{{{b{Fl}}{b{Ln}}{b{Ed}}}{{B`{LjLl}}}}{{{b{Fl}}{b{Ln}}{b{Ed}}{b{{Lh{Lf}}}}}{{B`{Lj{Kb{Ll}}}}}}{{{b{Fl}}cAl}{{B`{KhFd}}}Ld}{{}Fl}{{{b{Fl}}}f}{{{b{Fl}}M`}Mb}{{{b{Fl}}{b{Gf}}AhAl}{{B`{LbFd}}}}{{{b{Fd}}}{{Bn{{b{Df}}}}}}{{{b{{Kb{c}}}}}{{Bn{{b{Df}}}}}{KdKf}}{bc{}}00{bCh}00{c{{B`{e}}}{}{}}0000{{}{{B`{c}}}{}}0000{{{b{Kj}}}{{b{{Lh{{Md{{Lh{A`}}}}}}}}}}{bCj}0000{{}c{}}0000{FfFl}{MfBn}{MhBn}{MjBn}{MlBn}{MnBn}{N`Bn}{MjMd}0{MfFb}{MnKl}{MfId}{MhId}{MjId}{MlId}{MnId}{N`Id}{{}Nb}{{}b}00`````0```````````````````{{bd}f}00{{{b{hNd}}c}f{{Bj{}{{Bh{Ff}}}}}}{b{{b{Df}}}}0000{{{b{Nf}}}{{b{Ed}}}}{{{b{Nh}}}{{Bn{{b{Dj}}}}}}{{{b{Nj}}}{{Bn{{b{Dj}}}}}}{{{b{Nl}}}{{Bn{{b{Dj}}}}}}{{{b{Ll}}}{{Bn{{b{Dj}}}}}}{{{b{Nn}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0000000{{{b{h}}}{{b{hc}}}{}}0000000{{{b{Nh}}}{{Bn{{b{Df}}}}}}{{{b{Nj}}}{{Bn{{b{Df}}}}}}{{{b{Nl}}}{{Bn{{b{Df}}}}}}{{{b{Ll}}}{{Bn{{b{Df}}}}}}{{{b{Nn}}}{{Bn{{b{Df}}}}}}{{{b{hNd}}}f}{{{b{Nd}}}Nd}{{{b{Nf}}}Nf}{{{b{Lj}}}Lj}{{b{b{hc}}}f{}}00{{bA`}f}00{{{b{Nf}}{b{Nf}}}Ab}{{b{b{c}}}Ab{}}{{}{{Ad{c}}}{}}0000000{{{b{h}}}{{Ad{{b{hc}}}}}{}}0000000{b{{Ad{{b{c}}}}}{}}0000000{LjNd}{{}Nd}{An{{b{c}}}{}}00000{{{b{Lj}}}{{b{c}}}{}}11{An{{b{hc}}}{}}0000{{{b{hLj}}}{{b{hc}}}{}}111{{{b{Nh}}}{{b{Ed}}}}{{{b{Nj}}}{{b{Ed}}}}{{{b{Nl}}}{{b{Ed}}}}{{{b{Ll}}}{{b{Ed}}}}{{{b{Nn}}}{{b{Ed}}}}{{{b{Nd}}}{{b{{O`{Ff}}}}}}{Anf}0000000{{{b{Nd}}{b{Nd}}}Ah}{{{b{Nf}}{b{Nf}}}Ah}{{{b{Lj}}{b{Lj}}}Ah}{{b{b{c}}}Ah{}}00000000{{{b{Nh}}{b{hBd}}}Bf}0{{{b{Nj}}{b{hBd}}}Bf}0{{{b{Nd}}{b{hBd}}}Bf}{{{b{Nf}}{b{hBd}}}Bf}0{{{b{Nl}}{b{hBd}}}Bf}0{{{b{Lj}}{b{hBd}}}Bf}{{{b{Ll}}{b{hBd}}}Bf}0{{{b{Nn}}{b{hBd}}}Bf}0{ObNh}{cc{}}0{OdNd}111{OdLj}222{NjNn}{{LnNd}Lj}{{{b{Of}}}{{B`{LjNn}}}}{{{b{Ed}}}{{B`{Nfc}}}{}}{Kh{{B`{LjNn}}}}{{{b{Ed}}}{{B`{LnNj}}}}{{{b{Nf}}{b{hc}}}fOh}{{}}0000{{}An}0000000{{}c{}}0000000{LjOd}{{{Bn{Af}}{O`{Ff}}}Nd}{LnLj}{LjLn}{{{b{Nf}}{b{Nf}}}{{Bn{Ab}}}}{{{b{Nd}}}{{Bn{{b{Af}}}}}}{{{b{hNd}}{Bn{Af}}}f}{{{b{hNd}}{Bn{Nf}}}f}{{{b{Nh}}}{{Bn{{b{Df}}}}}}{{{b{Nj}}}{{Bn{{b{Df}}}}}}{{{b{Nl}}}{{Bn{{b{Df}}}}}}{{{b{Ll}}}{{Bn{{b{Df}}}}}}{{{b{Nn}}}{{Bn{{b{Df}}}}}}{{{b{Lj}}}Od}{bc{}}00{{{b{Lj}}{b{Fj}}Oj}{{B`{OfNh}}}}{bCh}00000{{{b{Lj}}}{{Ol{Ch}}}}{{{b{On}}}Ch}{c{{B`{e}}}{}{}}000{Ch{{B`{Nfc}}}{}}1111{{}{{B`{c}}}{}}0000000{bCj}0000000{{{b{Nd}}}{{Bn{{b{Nf}}}}}}{{}c{}}0000000{{Nd{O`{Ff}}}Nd}{{Lj{O`{Ff}}}Lj}{{Nd{Bn{Af}}}Nd}{{Lj{Bn{Af}}}Lj}{{Nd{Bn{Nf}}}Nd}{{Lj{Bn{Nf}}}Lj}{A@`Bn}{A@bBn}{A@dBn}{A@bAn}{A@`A@f}{A@dA@h}{A@`Id}{A@bId}{A@dId}{A@jBn}{A@lBn}{A@jOb}{A@lA@n}{A@jId}{A@lId}{AA`Bn}{AAbBn}{AAdBn}{AA`Md}{AAbMd}{AAdAAf}{AA`Id}{AAbId}{AAdId}{AAhBn}{AAjBn}{AAlBn}{AAnBn}{AB`Bn}{ABbBn}{AAjCh}{AB`Ch}{AAlAn}{AAhCh}{AAnABd}{ABbMd}{AAhId}{AAjId}{AAlId}{AAnId}{AB`Id}{ABbId}````````````````````{{bd}f}{b{{b{Df}}}}{{{b{ABf}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0{{{b{h}}}{{b{hc}}}{}}0{{{b{ABf}}}{{Bn{{b{Df}}}}}}{{{b{ABh}}}ABh}{{b{b{hc}}}f{}}{{bA`}f}{{}{{Ad{c}}}{}}0{{{b{h}}}{{Ad{{b{hc}}}}}{}}0{b{{Ad{{b{c}}}}}{}}0{An{{b{c}}}{}}0{An{{b{hc}}}{}}0{{{b{ABf}}}{{b{Ed}}}}{Anf}0{{{b{ABh}}{b{ABh}}}Ah}{{b{b{c}}}Ah{}}00{{{b{ABh}}{b{hBd}}}Bf}0{{{b{ABf}}{b{hBd}}}Bf}0{cc{}}0{{}}{{}An}0{{}c{}}0{{{b{ABf}}}{{Bn{{b{Df}}}}}}{bc{}}{bCh}0{Oj{{B`{ABh{ABj{ABh}}}}}}{c{{B`{e}}}{}{}}0{c{{B`{ABh{ABj{ABh}}}}}{}}{{}{{B`{c}}}{}}0{bCj}0{{}c{}}0{ABlBn}{ABnBn}{ABlId}{ABnId}{ABnAC`}{{}b}{{{b{{Lh{A`}}}}}Ah}`````````{b{{b{Df}}}}{{{b{En}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{{b{En}}}{{Bn{{b{Df}}}}}}{{}{{Ad{c}}}{}}{{{b{h}}}{{Ad{{b{hc}}}}}{}}{b{{Ad{{b{c}}}}}{}}{An{{b{c}}}{}}{An{{b{hc}}}{}}{{{b{En}}}{{b{Ed}}}}{Anf}{{{b{En}}{b{hBd}}}Bf}0{ABfEn}{cc{}}{EjEn}{{}}{{}An}{{}c{}}>{bCh}{c{{B`{e}}}{}{}}{{}{{B`{c}}}{}}{bCj}{{}c{}}{ACbBn}{ACdBn}{ACfBn}{AChBn}{ACjBn}{AClBn}{ACnBn}{AD`Bn}{ACnOl}{ACnABh}{AD`ABh}{AClCh}{ACdEj}{ACfFb}{ACjABf}{AD`ADb}{ACbId}{ACdId}{ACfId}{AChId}{ACjId}{AClId}{ACnId}{AD`Id}{ACbADd}````````````{{}An}0```````````{{bd}f}00{b{{b{Df}}}}{{{b{El}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}000{{{b{h}}}{{b{hc}}}{}}000{{{b{El}}}{{Bn{{b{Df}}}}}}{{{b{ADf}}}ADf}{{{b{Gj}}}Gj}{{{b{ADh}}}ADh}{{b{b{hc}}}f{}}00{{bA`}f}00{{}{{Ad{c}}}{}}000{{{b{h}}}{{Ad{{b{hc}}}}}{}}000{b{{Ad{{b{c}}}}}{}}000{ADhADj}{An{{b{c}}}{}}000{An{{b{hc}}}{}}000{{{b{El}}}{{b{Ed}}}}{Anf}000{ADhBn}{{{b{ADf}}{b{ADf}}}Ah}{{{b{Gj}}{b{Gj}}}Ah}{{{b{ADh}}{b{ADh}}}Ah}{{b{b{c}}}Ah{}}00000000{{{b{El}}{b{hBd}}}Bf}0{{{b{ADf}}{b{hBd}}}Bf}{{{b{Gj}}{b{hBd}}}Bf}{{{b{ADh}}{b{hBd}}}Bf}{ADbEl}{ABfEl}{cc{}}{FbEl}111{cADh{{ADl{{Lh{A`}}}}}}{{}}{{}An}000{{}c{}}000{ADhBn}{{{b{El}}}{{Bn{{b{Df}}}}}}{bc{}}00{bCh}{c{{B`{e}}}{}{}}000{{}{{B`{c}}}{}}000{{{b{ADf}}}ABh}{bCj}000{{}c{}}000{ADnADh}{ADnLn}{AE`Bn}{AEbBn}{AEdBn}{AEfBn}{AEhBn}{AEjBn}{AElBn}{AEnBn}{AF`Bn}{AFbBn}{AE`ABh}{AEbAn}{AEnABh}2{AEdFb}{AEfADb}{AEhABf}{AEjA@h}{AF`ABd}{AE`Id}{AEbId}{AEdId}{AEfId}{AEhId}{AEjId}{AElId}{AEnId}{AF`Id}{AFbId}{AFdADh}{AFfCh}{AFhAl}{AFdLn}1{{}b}```{{}AC`}1``{{bd}f}{b{{b{Df}}}}{{{b{AFj}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0{{{b{h}}}{{b{hc}}}{}}0{{{b{AFj}}}{{Bn{{b{Df}}}}}}{{{b{AFl}}}AFl}{{b{b{hc}}}f{}}{{bA`}f}{{}{{Ad{c}}}{}}0{{{b{h}}}{{Ad{{b{hc}}}}}{}}0{b{{Ad{{b{c}}}}}{}}0{{{b{AFl}}Ff{b{Ed}}}{{B`{AFnAFj}}}}{An{{b{c}}}{}}0{An{{b{hc}}}{}}0{{{b{AFj}}}{{b{Ed}}}}{Anf}0{{{b{AFj}}{b{hBd}}}Bf}0{{{b{AFl}}{b{hBd}}}Bf}{cc{}}{AG`AFj}{AGbAFj}{AGdAFj}3{{}}{{}An}0{{}c{}}0{{AGfFh}AFl}{{{b{AFj}}}{{Bn{{b{Df}}}}}}{bc{}}{bCh}{c{{B`{e}}}{}{}}0{{}{{B`{c}}}{}}0{bCj}0{{}c{}}0{AGhBn}{AGjBn}{AGlBn}{AGhAG`}{AGjAGb}{AGlAGd}{AGhId}{AGjId}{AGlId}````````{{}Al}`````````````````````````{{bd}f}00{AGnBn}0{AH`AHb}{AHdAHf}{b{{b{Df}}}}0{b{{b{AHh}}}}{{{b{AHj}}}{{Bn{{b{Dj}}}}}}{{{b{AHl}}}{{Bn{{b{Dj}}}}}}{AHnFf}{b{{b{c}}}{}}00000000000000{{{b{h}}}{{b{hc}}}{}}00000000000000{AI`AIb}999{{{b{AHj}}}{{Bn{{b{Df}}}}}}{{{b{AHl}}}{{Bn{{b{Df}}}}}}{AIdAIf}{{{b{AIh}}}{{Bn{{Ol{AIj}}}}}}>{{{b{AIl}}}AIl}{{{b{AIn}}}AIn}{{{b{AI`}}}AI`}{{b{b{hc}}}f{}}00{{bA`}f}00{{}{{Ad{c}}}{}}00000000000000{{{b{h}}}{{Ad{{b{hc}}}}}{}}00000000000000{b{{Ad{{b{c}}}}}{}}00000000000000{AH`AHb}{{}AH`}{{}AIl}{{}{{AJ`{ce}}}{AJbKd}{AJbKd}}{{}AGn}{An{{b{c}}}{}}0{{{b{{AJd{c}}}}}{{b{e}}}Db{}}1111111111111{An{{b{hc}}}{}}00000000000000{{{b{AHj}}}{{b{Ed}}}}{{{b{AHl}}}{{b{Ed}}}}9999{Anf}00000000000000{{{b{AIn}}{b{AIn}}}Ah}{{b{b{c}}}Ah{}}00{{{b{AH`}}}An}{{{b{AH`}}An}{{Bn{AJf}}}}{{{b{AH`}}{b{hBd}}}Bf}{{{b{AIl}}{b{hBd}}}Bf}{{{b{{AJd{c}}}}{b{hBd}}}Bf{KdDb}}{{{b{{AJ`{ce}}}}{b{hBd}}}BfKdKd}{{{b{{AHd{ce}}}}{b{hBd}}}BfKdKd}{{{b{AHf}}{b{hBd}}}Bf}{{{b{AIn}}{b{hBd}}}Bf}{{{b{AHn}}{b{hBd}}}Bf}{{{b{{AId{ce}}}}{b{hBd}}}BfKdKd}{{{b{AGn}}{b{hBd}}}Bf}{{{b{AI`}}{b{hBd}}}Bf}{{{b{{AIf{ce}}}}{b{hBd}}}BfKdKd}{{{b{AIh}}{b{hBd}}}Bf}{{{b{AHj}}{b{hBd}}}Bf}0{{{b{AHl}}{b{hBd}}}Bf}0{cc{}}0000000000000{AJhAHl}1{AH`AHb}{{{b{AIl}}}{{`{{Cb{}{{Bh{{b{AJj}}}}}}}}}}{{{b{AIl}}}{{`{{Cb{}{{Bh{{Bl{AJj}}}}}}}}}}{{{b{AIh}}}{{Bn{Ff}}}}{AHdFf}{{{b{AIh}}}{{Bn{Af}}}}2{AIdFf}1{{}}0{{}An}0{{cAl}{{B`{{AJd{c}}}}}{Db{AK`{}{{AJl{AJn}}}}}}1111111111111{{}c{}}00000000000000{{{b{AHf}}Ln}Ah}{AHdBn}{AHdAGn}{AI`Bn}{{{b{AIh}}}{{b{AIl}}}}{AJ`Bn}{{{b{AH`}}}{{b{Ed}}}}{{{b{AIl}}}{{b{Ed}}}}{AH`AHb}003{{{b{AIh}}}{{Bn{Ff}}}}>4{{{b{{AJd{c}}}}}f{Db{AK`{}{{AJl{AJn}}}}}}{{{b{{AJd{c}}}}AKb}{{Bn{{Bl{AJn}}}}}{{AK`{}{{AJl{AJn}}}}DbKd}}3333{AIlBl}{AHnAKd}{AIdAKd}{{{AJd{c}}}f{Db{AK`{}{{AJl{AJn}}}}}}{AIh{{B`{fAHl}}}}{{{b{AHj}}}{{Bn{{b{Df}}}}}}{{{b{AHl}}}{{Bn{{b{Df}}}}}}{{{AJ`{ce}}}{{B`{AIhAHj}}}KdKd}{{{b{hAIh}}}{{b{h{AKf{{B`{fAHl}}}}}}}}`{AHdBn}{bc{}}00{bCh}0{c{{B`{e}}}{}{}}00000000000000{{}{{B`{c}}}{}}00000000000000{bCj}00000000000000{AH`AHb}0{{}c{}}00000000000000{AKhOl}{AKjAKl}{AKnFf}{AL`Bn}{ALbBn}{ALdBn}{ALfBn}{ALhBn}{AKnBn}{AL`F`}`{ALdALj}{ALfF`}{ALhF`}{AL`Id}{ALbId}{ALdId}{ALfId}{ALhId}{AKnId}{ALlBn}{ALnBn}{AM`Bn}{AMbBn}{AMdBn}{ALlF`}{AM`AJh}{ALlId}{ALnId}{AM`Id}{AMbId}{AMdId}{{}AHn}{{}{{AHd{f}}}}{{}{{Gh{{Ol{AIj}}AKd}}}}{{}{{AJ`{f}}}}{{}{{AId{f}}}}","D":"BKh","p":[[1,"reference",null,null,1],[5,"Private",1703],[1,"unit"],[0,"mut"],[5,"RelayMap",0,1704],[5,"RelayNode",0,1704],[5,"RelayQuicConfig",0,1704],[1,"u8"],[6,"Ordering",1705],[5,"Compat",1706],[5,"RelayUrl",1707],[1,"bool"],[5,"PingTracker",0,1708],[5,"Duration",1709],[1,"usize"],[6,"Result",1710,null,1],[10,"Deserializer",1711],[5,"Formatter",1712],[8,"Result",1712],[17,"Item"],[10,"IntoIterator",1713],[5,"Arc",1714,null,1],[6,"Option",1715,null,1],[1,"array"],[10,"Iterator",1716],[1,"u16"],[10,"Serializer",1717],[5,"String",1718],[5,"TypeId",1719],[5,"ClientBuilder",140],[17,"Output"],[10,"Fn",1720],[10,"Send",1721],[10,"Sync",1721],[10,"Error",1722],[6,"SendError",140,1723],[5,"Backtrace",1724],[6,"RecvError",140,1723],[6,"ConnectError",140],[6,"DialError",140],[5,"Client",140],[1,"str"],[5,"ClientSink",140],[5,"ClientStream",140],[6,"Error",1725],[6,"Error",1054],[6,"Error",994],[5,"Error",1726],[5,"Elapsed",1727],[6,"DnsError",440],[6,"SocketAddr",1728],[5,"ClientConfig",1729],[5,"SecretKey",1730],[5,"DnsResolver",440],[10,"Into",1731,null,1],[5,"Pin",1732],[5,"Context",1733],[6,"Poll",1734],[5,"Url",1735],[1,"tuple",null,null,1],[6,"ClientToRelayMsg",1054],[15,"InvalidWebsocketUrl",367],[15,"InvalidRelayUrl",367],[15,"Websocket",367],[15,"Handshake",367],[15,"Dial",367],[15,"UnexpectedUpgradeStatus",367],[15,"Upgrade",367],[15,"InvalidTlsServername",367],[15,"NoLocalAddr",367],[15,"Tls",367],[5,"StatusCode",1736],[5,"Error",1737],[5,"SpanTrace",1738],[15,"InvalidTargetPort",395],[15,"Dns",395],[15,"Timeout",395],[15,"Io",395],[15,"InvalidUrl",395],[15,"ProxyConnectInvalidStatus",395],[15,"ProxyInvalidUrl",395],[15,"ProxyConnect",395],[15,"ProxyInvalidTlsServername",395],[15,"ProxyInvalidTargetPort",395],[15,"Protocol",423],[15,"StreamError",423],[15,"StreamError",429],[15,"ExceedsMaxPacketSize",429],[5,"StaggeredError",440],[10,"Debug",1712],[10,"Display",1712],[5,"TxtLookup",440],[5,"TXT",440],[5,"ResolveError",1739],[8,"TokioResolver",1740],[5,"TxtLookup",1741],[6,"IpAddr",1742],[10,"ToString",1718],[1,"u64"],[1,"slice"],[5,"NodeInfo",610],[6,"LookupError",610],[8,"NodeId",1730],[5,"Name",1743],[8,"Resolving",1743],[5,"Box",1744,null,1],[15,"Timeout",590],[15,"NoResponse",590],[15,"ResolveBoth",590],[15,"MissingHost",590],[15,"Resolve",590],[15,"InvalidResponse",590],[5,"HeaderName",1745],[5,"NodeData",610],[5,"UserData",610],[6,"EncodingError",610],[6,"DecodingError",610],[5,"MaxLengthExceededError",610],[6,"ParseError",610],[5,"BTreeSet",1746],[6,"SignedPacketBuildError",1747],[5,"NodeAddr",1748],[5,"SignedPacket",1747],[10,"Hasher",1749],[1,"u32"],[5,"Vec",1750],[10,"NodeIdExt",610],[15,"InvalidEncodingZ32",872],[15,"InvalidLength",872],[15,"InvalidSignature",872],[6,"Z32Error",1751],[8,"SignatureError",1752],[15,"FailedBuildingPacket",881],[15,"InvalidTxtEntry",881],[6,"SimpleDnsError",1753],[15,"ParseError",887],[15,"LookupFailed",887],[15,"InvalidLabel",887],[5,"ProtoError",1754],[15,"UnexpectedFormat",896],[15,"AttrFromString",896],[15,"NumLabels",896],[15,"Utf8",896],[15,"NotAnIrohRecord",896],[15,"DecodingError",896],[5,"Utf8Error",1755],[6,"FrameTypeError",919],[6,"FrameType",919],[5,"TryFromPrimitiveError",1756],[15,"UnexpectedEnd",987],[15,"UnknownFrameType",987],[5,"VarInt",1757],[15,"ClientAuthHeaderInvalid",1029],[15,"Websocket",1029],[15,"Timeout",1029],[15,"UnexpectedEnd",1029],[15,"FrameTypeError",1029],[15,"ServerDeniedAuth",1029],[15,"UnexpectedFrameType",1029],[15,"DeserializationError",1029],[6,"Error",1758],[5,"HeaderValue",1759],[6,"RelayToClientMsg",1054],[5,"Datagrams",1054],[5,"Bytes",1760],[10,"AsRef",1731],[15,"Datagrams",1186],[15,"UnexpectedFrame",1188],[15,"FrameTooLarge",1188],[15,"Timeout",1188],[15,"SerDe",1188],[15,"FrameTypeError",1188],[15,"InvalidPublicKey",1188],[15,"InvalidFrame",1188],[15,"InvalidFrameType",1188],[15,"InvalidProtocolMessageEncoding",1188],[15,"TooSmall",1188],[15,"Datagrams",1217],[15,"Health",1217],[15,"Restarting",1217],[6,"Error",1222],[5,"QuicClient",1222],[5,"Connection",1761],[6,"ConnectError",1762],[6,"ConnectionError",1763],[5,"RecvError",1764],[5,"Endpoint",1765],[15,"Connect",1280],[15,"Connection",1280],[15,"WatchRecv",1280],[5,"Limits",1289],[5,"Metrics",1289,1766],[5,"Counter",1767],[5,"RelayConfig",1289],[6,"AccessConfig",1289],[10,"Iterable",1768],[6,"SpawnError",1289],[6,"SupervisorError",1289],[5,"QuicConfig",1289],[5,"ClientRateLimit",1289],[8,"NonZeroU32",1769],[5,"TlsConfig",1289],[6,"CertConfig",1289],[5,"Server",1289],[5,"CertificateDer",1770],[5,"RelayMetrics",1289,1766],[6,"Access",1289],[5,"ServerConfig",1289],[10,"Default",1771],[5,"ReloadingResolver",1289,1772],[5,"MetricItem",1773],[5,"JoinError",1774],[10,"MetricsGroup",1773],[17,"Value"],[5,"CertifiedKey",1775],[10,"Loader",1776],[5,"ClientHello",1777],[5,"ServerConfig",1777],[5,"AbortOnDropHandle",1778],[15,"Manual",1666],[15,"LetsEncrypt",1666],[5,"AcmeState",1779],[15,"BindTcpListener",1668],[15,"LocalAddr",1668],[15,"QuicSpawn",1668],[15,"TlsHeaderParse",1668],[15,"BindTlsListener",1668],[15,"NoLocalAddr",1668],[5,"InvalidHeaderValue",1759],[15,"Metrics",1686],[15,"AcmeEventStreamFinished",1686],[15,"JoinError",1686],[15,"NoRelayServicesEnabled",1686],[15,"TaskCancelled",1686]],"r":[[0,1054],[1,1708],[2,1704],[3,1704],[4,1704],[5,1704],[6,1704],[7,1704],[8,1708],[9,1704],[10,1704],[11,1704],[12,1708],[13,1704],[14,1704],[15,1704],[17,1704],[18,1704],[19,1704],[20,1704],[21,1704],[22,1704],[23,1704],[24,1704],[25,1704],[26,1704],[27,1704],[28,1704],[29,1704],[30,1708],[31,1704],[32,1704],[33,1704],[34,1708],[35,1704],[36,1704],[37,1704],[38,1708],[39,1704],[40,1704],[41,1704],[42,1704],[43,1708],[44,1704],[45,1708],[47,1708],[48,1704],[49,1704],[50,1704],[51,1708],[52,1704],[53,1704],[54,1704],[55,1704],[56,1704],[58,1708],[59,1704],[60,1704],[61,1704],[62,1704],[63,1704],[64,1704],[65,1704],[66,1704],[67,1704],[68,1704],[69,1704],[70,1704],[71,1704],[72,1704],[73,1704],[74,1704],[75,1708],[76,1704],[77,1704],[78,1704],[79,1704],[80,1704],[81,1708],[82,1704],[83,1704],[84,1704],[85,1704],[86,1704],[87,1704],[88,1704],[89,1704],[90,1704],[92,1708],[93,1704],[94,1704],[95,1704],[96,1708],[97,1704],[98,1704],[99,1704],[100,1704],[101,1704],[102,1708],[103,1708],[105,1704],[106,1704],[107,1704],[108,1708],[109,1704],[112,1704],[113,1704],[114,1704],[116,1708],[117,1704],[118,1704],[119,1704],[120,1704],[121,1704],[122,1708],[123,1704],[124,1704],[125,1704],[126,1708],[127,1704],[128,1704],[129,1704],[130,1708],[131,1704],[132,1704],[133,1704],[134,1704],[135,1704],[136,1708],[137,1704],[138,1704],[139,1704],[148,1723],[157,1723],[163,1723],[164,1723],[165,1723],[166,1723],[174,1723],[175,1723],[178,1723],[179,1723],[182,1723],[183,1723],[190,1723],[191,1723],[198,1723],[199,1723],[205,1723],[206,1723],[213,1723],[214,1723],[221,1723],[222,1723],[230,1723],[231,1723],[238,1723],[239,1723],[246,1723],[247,1723],[250,1723],[251,1723],[258,1723],[259,1723],[260,1723],[261,1723],[270,1723],[271,1723],[272,1723],[273,1723],[274,1723],[287,1723],[288,1723],[291,1723],[292,1723],[300,1723],[301,1723],[321,1723],[322,1723],[329,1723],[330,1723],[333,1723],[334,1723],[341,1723],[342,1723],[351,1723],[352,1723],[359,1723],[360,1723],[1297,1772],[1305,1766],[1312,1766],[1314,1772],[1323,1766],[1328,1766],[1332,1766],[1336,1766],[1337,1766],[1338,1772],[1351,1766],[1352,1766],[1353,1772],[1367,1766],[1368,1766],[1369,1766],[1375,1766],[1378,1766],[1381,1766],[1384,1766],[1385,1766],[1386,1772],[1399,1766],[1400,1766],[1401,1772],[1414,1766],[1415,1766],[1416,1772],[1429,1766],[1430,1766],[1431,1766],[1434,1766],[1435,1766],[1436,1772],[1437,1772],[1450,1766],[1451,1766],[1452,1772],[1467,1766],[1468,1766],[1469,1766],[1470,1766],[1471,1766],[1472,1766],[1473,1772],[1490,1766],[1491,1766],[1492,1766],[1493,1766],[1494,1772],[1509,1766],[1510,1766],[1511,1772],[1525,1766],[1526,1766],[1527,1766],[1536,1766],[1537,1766],[1538,1772],[1539,1772],[1552,1766],[1553,1766],[1554,1772],[1573,1766],[1574,1766],[1575,1766],[1576,1766],[1577,1766],[1582,1772],[1583,1772],[1584,1766],[1585,1766],[1586,1766],[1587,1766],[1588,1766],[1591,1772],[1599,1766],[1604,1766],[1605,1766],[1606,1772],[1619,1766],[1620,1766],[1621,1772],[1634,1766],[1635,1766],[1636,1772],[1649,1766],[1650,1766],[1651,1766],[1652,1766],[1653,1772]],"b":[[76,"impl-Debug-for-RelayMap"],[77,"impl-Display-for-RelayMap"],[78,"impl-Debug-for-RelayNode"],[79,"impl-Display-for-RelayNode"],[82,"impl-From%3CRelayUrl%3E-for-RelayMap"],[83,"impl-From%3CRelayNode%3E-for-RelayMap"],[88,"impl-FromIterator%3CRelayNode%3E-for-RelayMap"],[89,"impl-FromIterator%3CRelayUrl%3E-for-RelayMap"],[258,"impl-Debug-for-SendError"],[259,"impl-Display-for-SendError"],[260,"impl-Display-for-RecvError"],[261,"impl-Debug-for-RecvError"],[262,"impl-Debug-for-ConnectError"],[263,"impl-Display-for-ConnectError"],[264,"impl-Display-for-DialError"],[265,"impl-Debug-for-DialError"],[273,"impl-From%3CError%3E-for-RecvError"],[274,"impl-From%3CError%3E-for-RecvError"],[275,"impl-From%3CError%3E-for-ConnectError"],[276,"impl-From%3CDialError%3E-for-ConnectError"],[278,"impl-From%3CError%3E-for-ConnectError"],[279,"impl-From%3CError%3E-for-DialError"],[280,"impl-From%3CElapsed%3E-for-DialError"],[281,"impl-From%3CDnsError%3E-for-DialError"],[515,"impl-Display-for-DnsError"],[516,"impl-Debug-for-DnsError"],[517,"impl-Debug-for-StaggeredError%3CE%3E"],[518,"impl-Display-for-StaggeredError%3CE%3E"],[521,"impl-Display-for-TXT"],[522,"impl-Debug-for-TXT"],[523,"impl-From%3CElapsed%3E-for-DnsError"],[524,"impl-From%3CResolveError%3E-for-DnsError"],[753,"impl-Display-for-EncodingError"],[754,"impl-Debug-for-EncodingError"],[755,"impl-Display-for-DecodingError"],[756,"impl-Debug-for-DecodingError"],[758,"impl-Display-for-UserData"],[759,"impl-Debug-for-UserData"],[760,"impl-Debug-for-MaxLengthExceededError"],[761,"impl-Display-for-MaxLengthExceededError"],[763,"impl-Display-for-LookupError"],[764,"impl-Debug-for-LookupError"],[765,"impl-Debug-for-ParseError"],[766,"impl-Display-for-ParseError"],[962,"impl-Display-for-FrameType"],[963,"impl-Debug-for-FrameType"],[964,"impl-Display-for-FrameTypeError"],[965,"impl-Debug-for-FrameTypeError"],[1015,"impl-Debug-for-Error"],[1016,"impl-Display-for-Error"],[1017,"impl-From%3CFrameTypeError%3E-for-Error"],[1019,"impl-From%3CError%3E-for-Error"],[1141,"impl-Display-for-Error"],[1142,"impl-Debug-for-Error"],[1146,"impl-From%3CError%3E-for-Error"],[1147,"impl-From%3CFrameTypeError%3E-for-Error"],[1149,"impl-From%3CElapsed%3E-for-Error"],[1255,"impl-Debug-for-Error"],[1256,"impl-Display-for-Error"],[1259,"impl-From%3CConnectError%3E-for-Error"],[1260,"impl-From%3CConnectionError%3E-for-Error"],[1261,"impl-From%3CRecvError%3E-for-Error"],[1505,"impl-Display-for-SpawnError"],[1506,"impl-Debug-for-SpawnError"],[1507,"impl-Display-for-SupervisorError"],[1508,"impl-Debug-for-SupervisorError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAEsFawABAAAABgAKABIAGAAsAAEAMAAJADsAAwBAABEAVAAAAFYAAABZAAAAXQADAGsAAQByAAEAdgAQAIkAAwCSAAAAlAAPAKYABwCvADYA5wAnABABAAASAQMAFwEDACABCwA5AQcAQgEDAEcBbAC7AQEAvwECAMQBAADGARIA2gEzABACAAATAgAAFQIGACECAAAvAgAAMQIRAEQCCQBPAg8AYwIEAGkCBgB1AgQAewIDAIACHwChAiIAxQIXAN4CIgADAwAABwMAAAsDAAAOAwAAEQMNACsDAAAvAwQANQMCADkDBQBBAxgAWwMHAGkDKQCbAwAApQMhAMkDAgDOAxIA5AMWAPwDAgAABB4AJAQBACcEAwA0BCYAXAQMAGoEEgB+BAAAggQFAI0EDACbBAcApQQcAMgEAQDOBBEA4QQJAOwEAgDwBAIA9gQTAAwFAAAOBQEAFQUAABgFAAAbBQIAHwUAACkFAAArBQMAMwUEADkFHQBbBQEAYAU1AJcFJADABSUA9AUAAPcFAQD/BQMABAYMACYGAQAwBgAAOgYBAEAGMQB0Bg4AhQYdAA==","P":[[8,"T"],[17,""],[20,"T"],[23,""],[28,"K"],[30,"T"],[42,""],[47,"T"],[55,"__D"],[58,""],[66,"K"],[75,""],[81,"T"],[82,""],[84,"T"],[85,""],[86,"T"],[90,""],[96,"U"],[100,""],[113,"__S"],[116,""],[117,"T"],[120,""],[122,"U,T"],[126,"U"],[130,""],[136,"V"],[172,""],[173,"S"],[174,""],[182,"T"],[198,""],[203,"T"],[204,""],[205,"T"],[229,""],[230,"T"],[246,""],[270,"T"],[271,""],[272,"T"],[273,""],[277,"T"],[278,""],[282,"T"],[287,""],[300,"U"],[308,""],[311,""],[312,"Sink::Error"],[316,"Stream::Item"],[318,"Sink::Error"],[320,""],[326,"Sink::Error"],[328,"T"],[329,""],[333,"U,T"],[341,"U"],[349,"S"],[351,""],[359,"V"],[367,""],[459,"E"],[460,"T"],[470,""],[471,"E"],[472,""],[476,"T"],[479,""],[482,"T"],[497,""],[498,"T"],[508,""],[509,"E"],[510,""],[517,"E"],[519,""],[525,"T"],[527,""],[528,"T"],[530,""],[531,"T"],[532,""],[539,"U"],[544,"IntoIterator::IntoIter"],[545,""],[551,""],[555,""],[556,""],[561,"E"],[562,"T"],[565,""],[568,"U,T"],[573,"U"],[578,""],[584,"V"],[589,""],[638,""],[639,""],[650,"T"],[666,""],[675,"T"],[678,""],[682,"K"],[683,"T"],[707,""],[709,"T"],[715,"Deref::Target"],[716,"T"],[723,"Deref::Target"],[724,"T"],[727,""],[744,"K"],[753,""],[768,"T"],[770,""],[771,"T"],[774,""],[775,"T"],[778,""],[781,"FromStr::Err"],[782,""],[784,"__H"],[785,""],[798,"U"],[806,""],[820,"T"],[823,""],[832,"U,T"],[836,"TryFrom::Error"],[837,"U,T"],[841,"U"],[849,""],[858,"V"],[866,""],[937,"T"],[941,""],[943,"T"],[944,""],[945,"T"],[955,""],[959,"K"],[962,""],[966,"T"],[968,""],[971,"U"],[973,""],[974,"T"],[975,""],[978,"U,T"],[980,"TryFromPrimitive::Primitive"],[981,"U"],[983,""],[985,"V"],[987,""],[1005,"T"],[1007,""],[1008,"T"],[1013,""],[1018,"T"],[1019,""],[1022,"U"],[1023,""],[1025,"U,T"],[1026,"U"],[1027,""],[1028,"V"],[1029,""],[1084,"T"],[1092,""],[1096,"T"],[1099,""],[1102,"T"],[1114,""],[1115,"T"],[1123,""],[1132,"K"],[1141,""],[1148,"T"],[1149,""],[1150,"T"],[1154,""],[1159,"U"],[1163,""],[1165,"T"],[1168,""],[1169,"U,T"],[1173,"U"],[1177,""],[1182,"V"],[1186,""],[1233,"T"],[1237,""],[1239,"T"],[1240,""],[1241,"T"],[1247,""],[1248,"T"],[1252,""],[1258,"T"],[1259,""],[1262,"T"],[1263,""],[1266,"U"],[1268,""],[1270,"T"],[1271,""],[1272,"U,T"],[1274,"U"],[1276,""],[1278,"V"],[1280,""],[1336,"T"],[1366,""],[1378,"T"],[1381,""],[1384,"T"],[1429,""],[1432,"EC,EA"],[1433,""],[1434,"T"],[1436,"Loader,Deref::Target"],[1437,"T"],[1465,""],[1487,"K"],[1490,""],[1494,"Loader"],[1495,"EC,EA"],[1497,""],[1500,"EC,EA"],[1501,""],[1503,"EC,EA"],[1504,""],[1509,"T"],[1523,""],[1524,"T"],[1525,""],[1538,"Loader"],[1539,""],[1552,"U"],[1567,""],[1582,"Loader"],[1584,""],[1591,"Loader"],[1592,""],[1595,"EC,EA"],[1596,""],[1599,"T"],[1602,""],[1604,"U,T"],[1619,"U"],[1634,""],[1651,"V"],[1666,""]]}]]')); +var searchIndex = new Map(JSON.parse('[["bulk",{"t":"HHHHH","n":["collect_and_print","main","run_iroh","run_quinn","run_s2n"],"q":[[0,"bulk"],[5,"iroh_metrics::base"],[6,"iroh_bench"],[7,"n0_snafu::error"],[8,"iroh_bench::s2n"]],"i":"`````","f":"{{{d{b}}{d{f}}}h}{{}h}{j{{l{h}}}}0{n{{l{h}}}}","D":"`","p":[[1,"str"],[1,"reference",null,null,1],[10,"MetricsGroup",5],[1,"unit"],[5,"Opt",6],[8,"Result",7],[5,"Opt",8]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAAUAAQAAAAUA","P":[]}],["iroh",{"t":"PPEPGTFIFFEFFFFRKNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNOCCNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNCCNOCNNNNNNMCNNONONNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNOOOOOOOOSSSSCCSSSHHHHSSHHHPFPKFGFKGFTPPFFPPGPPPFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNCNNNNNONNCNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFSSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNSSPPPPPSSGFFFFFPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOFFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFSSNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTTFFFFPGKPGPFPGFTTTPFPFPPPGFGFFPFPGPPPPPPFGGKKFKPPPFFGPPPPPPSPPFFTTTPFGKTTPFFTPPTTPPFTTPPPPFFPTGFPPPPPPPFGPGGFPPGPFFPPGFTTPPGFFGPPGFTPPPFFPFPFPPPPFFPFGFFPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONONNNOOOMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNOOONNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNONNONOONOOOONNNONNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNONNNNNNOOONOOONOOONNNONNNOOONNNNNNNNNNOONNOOONMNMNMNNNNNNNOOONNNONNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNONNNNNNNOONMNNONMNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNONMNNONOONOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOFFEFFNOOOOOOOONNNNNNNNNNNOOONNNNNNNNNNNNNNNOOONNNNNNNNNNNNNNNOOOONNNNONNNNNNNNNNNNNNNONNNNNNNNNNOOOONNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOONNNNNNNNNNNNNNNNOOOOOOONNNNPFFGPPFFFNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNOONNOONNONOOONNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNPGPGPSPPPPPGPFFKFPPGPPFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNONNNNNNNNMNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOGFPKPPKFFPNNMMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOFFNNNNNNNNNNNNNNNNNNNNNNNNNNOONONHHNNNNNNNNN","n":["Decode","DecodeInvalidLength","Endpoint","Key","KeyParsingError","LENGTH","NodeAddr","NodeId","PublicKey","RelayMap","RelayMode","RelayNode","RelayUrl","RelayUrlParseError","SecretKey","Value","Watcher","__clone_box","","","","","","as_bytes","as_error_source","","as_ref","backtrace","","borrow","","","","","","","","","borrow_mut","","","","","","","","cause","","clone","","","","","","clone_into","","","","","","clone_to_uninit","","","","","","cmp","","","","compare","","","","compat","","","","","","","","compat_mut","","","","","","","","compat_ref","","","","","","","","contains_node","defaults","deref","","","","","","","","","deref_mut","","","","","","","","description","","deserialize","","","","","direct_addresses","","discovery","dns","drop","","","","","","","","empty","endpoint","eq","","","","","equivalent","","","","","","","","","","","","","","","fmt","","","","","","","","","","","","","","fmt_short","from","","","","","","","","","","","","","","","","","","","","","","from_bytes","","from_iter","","from_parts","from_ref","","","","","","from_str","","","from_z32","generate","get","get_node","hash","","in_current_span","","init","","","","","","","","initialized","into","","","","","","","","is_empty","","len","map","metrics","net_report","new","node_id","node_info","nodes","or","partial_cmp","","","","poll_updated","protocol","public","","quic","relay_url","","secret","serialize","","","","","sign","source","","stream","stream_updates_only","test_utils","to_bytes","to_owned","","","","","","to_string","","","","","","to_z32","try_from","","","","","","","","","","","try_into","","","","","","","","type_id","","","","","","","","updated","url","urls","verify","vzip","","","","","","","","with_direct_addresses","with_relay_url","backtrace","","","source","","span_trace","","","DEFAULT_HTTPS_PORT","DEFAULT_HTTP_PORT","DEFAULT_METRICS_PORT","DEFAULT_RELAY_QUIC_PORT","prod","staging","AP_RELAY_HOSTNAME","EU_RELAY_HOSTNAME","NA_RELAY_HOSTNAME","default_ap_relay_node","default_eu_relay_node","default_na_relay_node","default_relay_map","EU_RELAY_HOSTNAME","NA_RELAY_HOSTNAME","default_eu_relay_node","default_na_relay_node","default_relay_map","AttrFromString","ConcurrentDiscovery","DecodingError","Discovery","DiscoveryContext","DiscoveryError","DiscoveryItem","IntoDiscovery","IntoDiscoveryError","Lagged","MAX_LENGTH","NoResults","NoServiceConfigured","NodeData","NodeInfo","NotAnIrohRecord","NumLabels","ParseError","UnexpectedFormat","User","","UserData","Utf8","__clone_box","","","","add","add_direct_addresses","as_error_source","","","","as_ref","backtrace","","","","borrow","","","","","","","","","","borrow_mut","","","","","","","","","","cause","","","","clear_direct_addresses","clone","","","","clone_into","","","","clone_to_uninit","","","","cmp","compare","compat","","","","","","","","","","compat_mut","","","","","","","","","","compat_ref","","","","","","","","","","data","default","","deref","","","","","","","","","","","","deref_mut","","","","","","","","","","","description","","","","direct_addresses","dns","dns_resolver","drop","","","","","","","","","","empty","eq","","","equivalent","","","","","","","","","fmt","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","","from_err","","from_err_box","","from_parts","from_pkarr_signed_packet","from_ref","","","","from_services","from_str","from_txt_lookup","hash","in_current_span","","","","init","","","","","","","","","","into","","","","","","","","","","into_discovery","","into_node_addr","","last_updated","mdns","new","","","node_id","","","node_info","partial_cmp","pkarr","provenance","publish","","relay_url","resolve","","secret_key","set_relay_url","set_user_data","source","","","","static_provider","subscribe","","to_node_addr","","to_owned","","","","to_pkarr_signed_packet","to_string","","","","","to_txt_strings","try_from","","","","","","","","","","","try_into","","","","","","","","","","type_id","","","","","","","","","","user_data","","val","vzip","","","","","","","","","","with_direct_addresses","","with_relay_url","","with_user_data","","backtrace","","","node_id","provenance","source","span_trace","","","backtrace","provenance","source","span_trace","backtrace","","","","","","key","label","num_labels","s","source","","span_trace","","","","","","DnsDiscovery","DnsDiscoveryBuilder","N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING","borrow","","borrow_mut","","build","builder","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","dns_resolver","drop","","fmt","","from","","init","","into","","into_discovery","","n0_dns","resolve","try_from","","try_into","","type_id","","vzip","","MdnsDiscovery","MdnsDiscoveryBuilder","NAME","borrow","","borrow_mut","","builder","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","drop","","fmt","","from","","init","","into","","into_discovery","","new","publish","resolve","subscribe","try_from","","try_into","","type_id","","vzip","","DEFAULT_PKARR_TTL","DEFAULT_REPUBLISH_INTERVAL","Encoding","HttpPayload","HttpRequest","HttpSend","InvalidRelayUrl","N0_DNS_PKARR_RELAY_PROD","N0_DNS_PKARR_RELAY_STAGING","PkarrError","PkarrPublisher","PkarrPublisherBuilder","PkarrRelayClient","PkarrResolver","PkarrResolverBuilder","PublicKey","Verify","__clone_box","","","as_error_source","backtrace","borrow","","","","","","borrow_mut","","","","","","build","","builder","","cause","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","","","compat_mut","","","","","","compat_ref","","","","","","deref","","","","","","deref_mut","","","","","","description","dht","dns_resolver","","drop","","","","","","fmt","","","","","","","from","","","","","","from_ref","","","in_current_span","init","","","","","","into","","","","","","into_discovery","","","","n0_dns","","new","publish","","republish_interval","resolve","","source","to_owned","","","to_string","try_from","","","","","","try_into","","","","","","ttl","type_id","","","","","","update_node_data","vzip","","","","","","with_dns_resolver","source","","","","","status","url","Builder","DhtDiscovery","__clone_box","borrow","","borrow_mut","","build","builder","client","clone","clone_into","clone_to_uninit","compat","","compat_mut","","compat_ref","","default","","deref","","deref_mut","","dht","drop","","fmt","","from","","from_ref","include_direct_addresses","init","","initial_publish_delay","into","","into_discovery","","n0_dns_pkarr_relay","no_publish","pkarr_relay","publish","republish_delay","resolve","secret_key","to_owned","try_from","","try_into","","ttl","type_id","","vzip","","PROVENANCE","StaticProvider","__clone_box","add_node_info","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","default","deref","deref_mut","drop","fmt","from","from_node_info","from_ref","get_node_info","init","into","into_discovery","new","publish","remove_node_info","resolve","set_node_info","to_owned","try_from","try_into","type_id","vzip","DnsResolver","N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING","__clone_box","borrow","borrow_mut","clear_cache","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","default","deref","deref_mut","drop","fmt","from","","from_ref","init","into","lookup_ipv4","lookup_ipv4_ipv6","lookup_ipv4_ipv6_staggered","lookup_ipv4_staggered","lookup_ipv6","lookup_ipv6_staggered","lookup_node_by_domain_name","lookup_node_by_domain_name_staggered","lookup_node_by_id","lookup_node_by_id_staggered","lookup_txt","new","reset","resolve","resolve_host","to_owned","try_from","try_into","type_id","vzip","with_nameserver","AEAD_LIMIT_REACHED","APPLICATION_ERROR","Accept","AcceptBi","AcceptUni","AckFrequencyConfig","AddNodeAddr","AddNodeAddrError","AeadKey","All","AlpnError","App","ApplicationClose","ApplicationClosed","BindError","Builder","CONNECTION_ID_LIMIT_ERROR","CONNECTION_REFUSED","CRYPTO_BUFFER_EXCEEDED","CallMeMaybe","Chunk","CidsExhausted","ClosedStream","","","Connect","ConnectError","ConnectOptions","ConnectWithOptsError","Connecting","Connection","","ConnectionClose","ConnectionClosed","ConnectionError","","ConnectionLost","","","","","ConnectionStats","ConnectionType","ControlMsg","Controller","ControllerFactory","CryptoError","CryptoServerConfig","Custom","Default","Direct","DirectAddr","DirectAddrInfo","DirectAddrType","Disabled","","Discover","Discovery","","DiscoveryStart","ENV_FORCE_STAGING_RELAYS","Empty","EmptyPruned","Endpoint","ExportKeyingMaterialError","FINAL_SIZE_ERROR","FLOW_CONTROL_ERROR","FRAME_ENCODING_ERROR","FinishedEarly","FrameStats","GetMappingAddressError","HandshakeTokenKey","INTERNAL_ERROR","INVALID_TOKEN","IllegalOrderedRead","Incoming","IncomingFuture","KEY_UPDATE_ERROR","Local","LocallyClosed","MAX","MAX_SIZE","MagicSpawn","Mixed","MtuDiscoveryConfig","NO_ERROR","NO_VIABLE_PATH","NamedApp","NoAddress","","None","OpenBi","OpenUni","OwnAddress","PROTOCOL_VIOLATION","PathSelection","PathStats","Ping","Pong","Portmapped","Qad","Qad4LocalPort","Quinn","Read","ReadDatagram","ReadError","","ReadExactError","ReadToEndError","RecvStream","Relay","","RelayMode","RelayOnly","RemoteInfo","RemoteNodeIdError","Reset","","ResetError","RetryError","STREAM_LIMIT_ERROR","STREAM_STATE_ERROR","Saved","SelfConnect","SendDatagramError","SendStream","ServerConfig","Source","Staging","Stopped","StoppedError","StreamId","TRANSPORT_PARAMETER_ERROR","TimedOut","TooLarge","TooLong","TransportConfig","TransportError","","TransportErrorCode","Udp","UdpStats","Unavailable","Unknown","UnknownHandshake","UnsupportedByPeer","UnsupportedVersion","VarInt","VersionMismatch","WeakConnectionHandle","WriteError","Written","ZeroRttAccepted","ZeroRttRejected","","","","__clone_box","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","accept","","accept_bi","accept_uni","accept_with","ack_eliciting_threshold","ack_frequency","ack_frequency_config","acks","add_discovery","add_node_addr","add_node_addr_with_source","addr","","addrs","aead_from_hkdf","allow_spin","alpn","","alpns","as_error_source","","","","","","","","","","","","","","","","","","backtrace","","","","","","","bind","bind_addr_v4","bind_addr_v6","black_hole_cooldown","black_holes_detected","borrow","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","bound_sockets","build","builder","bytes","","","cause","","","","","","","chunks","clear_discovery","clone","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","clone_box","clone_into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","clone_to_uninit","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","close","","close_reason","closed","cmp","","","","code","compare","","","","compat","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","compat_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","compat_ref","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","congestion_controller_factory","congestion_events","congestion_state","conn_type","","connect","connect_with_opts","connection_close","crypto","","","crypto_buffer_size","current_mtu","cwnd","data_blocked","datagram","datagram_receive_buffer_size","datagram_send_buffer_size","datagram_send_buffer_space","datagrams","decode","","","default","","","","","","","","","","","","","","default_relay_mode","deref","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","deref_mut","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","description","","","","","","","deserialize","","","","","dir","direct_addresses","discovery","","discovery_dht","discovery_local_network","discovery_n0","discovery_stream","dns_resolver","","drop","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","enable_segmentation_offload","encode","","","eq","","","","","","","","","","","","","","","","","","","","","","","","","","","equivalent","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","error_code","","export_keying_material","finish","fmt","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","force_staging_infra","frame","frame_rx","frame_tx","frame_type","from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from_ref","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","from_u32","from_u64","from_u64_unchecked","handshake_data","","handshake_done","has_send_address","hash","","","","","home_relay","id","","ignore","immediate_ack","in_current_span","","","","","","","","","","","","","","","","","","incoming_buffer_size","incoming_buffer_size_total","index","init","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","initial_keys","initial_mtu","initial_rtt","initial_window","initiator","insecure_skip_relay_cert_verify","interval","into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","into_0rtt","into_any","into_future","","","","","","","","","","into_incoming","into_inner","ios","is_0rtt","is_alive","is_closed","keep_alive_interval","keylog","known_nodes","last_alive","last_control","last_payload","last_received","last_used","latency","","local_ip","lost_bytes","lost_packets","lost_plpmtud_probes","max_ack_delay","max_concurrent_bidi_streams","max_concurrent_uni_streams","max_data","max_datagram_size","max_idle_timeout","max_incoming","max_stream_data","max_streams_bidi","max_streams_uni","metrics","migration","min_mtu","minimum_change","mtu_discovery_config","network_change","network_path_changed","new","","","new_connection_id","new_token","node_addr","node_id","","observed_addr","offset","on_ack","on_congestion_event","on_end_acks","on_mtu_update","on_sent","open","open_bi","open_uni","packet_threshold","partial_cmp","","","","path","path_challenge","path_response","path_selection","peer_identity","persistent_congestion_threshold","ping","poll","","","","","","","","","poll_flush","poll_read","","poll_shutdown","poll_write","","preferred_address_v4","preferred_address_v6","priority","proxy_from_env","proxy_url","read","read_chunk","read_chunks","read_datagram","read_exact","read_to_end","reason","","","receive_observed_address_reports","receive_window","received_reset","refuse","relay_map","relay_mode","relay_url","remote_address","remote_address_validated","remote_info","remote_info_iter","remote_node_id","reordering_threshold","reset","reset_stream","retire_connection_id","retry","retry_tag","retry_token_lifetime","rtt","","saturating_add","seal","secret_key","","send_datagram","send_fairness","send_observed_address_reports","send_window","sent_packets","sent_plpmtud_probes","serialize","","","","","set_alpns","set_max_concurrent_bi_streams","set_max_concurrent_uni_streams","set_priority","set_receive_window","set_user_data_for_discovery","source","","","","","","","","","","","","","","","sources","","stable_id","start_session","stats","stop","stop_sending","stopped","stream","stream_data_blocked","stream_receive_window","streams_blocked_bidi","streams_blocked_uni","time_source","time_threshold","to_owned","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","to_string","","","","","","","","","","","","","","","","","","","","","","","","","","","token_key","transport","transport_config","","try_from","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","try_poll","","","","","","","typ","type_id","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","udp_rx","udp_tx","upper_bound","user_data_for_discovery","validation_token","validation_token_config","vzip","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","window","with_additional_alpns","with_crypto","with_single_cert","with_transport_config","write","write_all","write_all_chunks","write_chunk","write_chunks","backtrace","","","pruned","span_trace","","","backtrace","","","source","span_trace","","","backtrace","","source","","span_trace","","backtrace","","source","","span_trace","","backtrace","","","","source","","","span_trace","","","","backtrace","","","source","","span_trace","","","name","","EndpointMetrics","MagicsockMetrics","NetReportMetrics","PortmapMetrics","RelayMetrics","__clone_box","accepts","actor_link_change","actor_tick_direct_addr_heartbeat","actor_tick_main","actor_tick_msg","actor_tick_other","actor_tick_portmap_changed","actor_tick_re_stun","as_iterable","","","borrow","","","","borrow_mut","","","","bytes_recv","bytes_rx_ratelimited_total","bytes_sent","clone","clone_into","clone_to_uninit","compat","","","","compat_mut","","","","compat_ref","","","","connection_became_direct","connection_handshake_success","conns_rx_ratelimited_total","default","","","","deref","","","","deref_mut","","","","deserialize","","","disco_packets_dropped","disco_packets_recv","disco_packets_sent","disconnects","drop","","","","external_address_updated","field_count","","","field_ref","","","fmt","","","","from","","","","from_ref","got_ping","groups","groups_cloned","init","","","","into","","","","local_port_updates","magicsock","mapping_attempts","mapping_failures","name","","","","net_report","nodes_contacted","nodes_contacted_directly","num_direct_conns_added","num_direct_conns_removed","num_relay_conns_added","num_relay_conns_removed","other_packets_dropped","other_packets_recv","other_packets_sent","pcp_available","pcp_probes","portmapper","probes_started","recv_data_ipv4","recv_data_ipv6","recv_data_relay","recv_datagrams","recv_disco_bad_key","recv_disco_bad_parse","recv_disco_call_me_maybe","recv_disco_call_me_maybe_bad_disco","recv_disco_ping","recv_disco_pong","recv_disco_relay","recv_disco_udp","recv_gro_datagrams","relay_home_change","send_data","send_data_network_down","send_disco_relay","send_disco_udp","send_ipv4","send_ipv6","send_packets_dropped","send_packets_recv","send_packets_sent","send_relay","send_relay_error","sent_disco_call_me_maybe","sent_disco_ping","sent_disco_pong","sent_disco_relay","sent_disco_udp","sent_pong","serialize","","","to_owned","try_from","","","","try_into","","","","type_id","","","","unique_client_keys","unknown_frames","update_direct_addrs","upnp_available","upnp_gateway_updated","upnp_probes","upnp_probes_failed","vzip","","","","Https","Metrics","Options","Probe","QadIpv4","QadIpv6","QuicConfig","RelayLatencies","Report","__clone_box","","","","","as_iterable","as_protocols","borrow","","","","","","borrow_mut","","","","","","captive_portal","client_config","clone","","","","","clone_into","","","","","clone_to_uninit","","","","","cmp","compare","compat","","","","","","compat_mut","","","","","","compat_ref","","","","","","default","","","","deref","","","","","","deref_mut","","","","","","deserialize","disabled","drop","","","","","","ep","eq","","","equivalent","","","","","","","","","field_count","field_ref","fmt","","","","","","","","from","","","","","","from_ref","","","","","global_v4","global_v6","has_udp","https","init","","","","","","insecure_skip_relay_cert_verify","into","","","","","","ipv4","ipv6","iter","mapping_varies_by_dest","mapping_varies_by_dest_ipv4","mapping_varies_by_dest_ipv6","name","partial_cmp","preferred_relay","quic_config","relay_latency","reports","reports_full","serialize","to_owned","","","","","to_string","","try_from","","","","","","try_into","","","","","","type_id","","","","","","udp_v4","udp_v6","vzip","","","","","","AttrFromString","DecodingError","","EncodingError","FailedBuildingPacket","IROH_TXT_NAME","InvalidEncodingZ32","InvalidLabel","InvalidLength","InvalidSignature","InvalidTxtEntry","LookupError","LookupFailed","MaxLengthExceededError","NodeData","NodeIdExt","NodeInfo","NotAnIrohRecord","NumLabels","ParseError","","UnexpectedFormat","UserData","Utf8","as_error_source","","","","backtrace","","","","borrow","","","","borrow_mut","","","","cause","","","","compat","","","","compat_mut","","","","compat_ref","","","","data","deref","","","","deref_mut","","","","description","","","","drop","","","","fmt","","","","","","","","from","","","","","from_z32","in_current_span","","","","init","","","","into","","","","node_id","source","","","","to_string","","","","to_z32","try_from","","","","try_into","","","","type_id","","","","vzip","","","","backtrace","","","len","source","","span_trace","","","backtrace","","source","","span_trace","","backtrace","","","source","","","span_trace","","","backtrace","","","","","","key","label","num_labels","s","source","","span_trace","","","","","","AcceptError","AccessLimit","Connection","DynProtocolHandler","MissingRemoteNodeId","NotAllowed","ProtocolHandler","Router","RouterBuilder","User","__clone_box","","accept","","","","","as_error_source","backtrace","borrow","","","","borrow_mut","","","","builder","cause","clone","","clone_into","","clone_to_uninit","","compat","","","","compat_mut","","","","compat_ref","","","","deref","","","","deref_mut","","","","description","drop","","","","endpoint","","fmt","","","","","from","","","","","","","","","from_err","from_ref","","in_current_span","init","","","","into","","","","is_shutdown","new","","on_connecting","","","","shutdown","","","","","source","spawn","to_owned","","to_string","try_from","","","","try_into","","","","type_id","","","","vzip","","","","backtrace","source","","","span_trace","CleanupDropGuard","DnsPkarrServer","borrow","","borrow_mut","","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","discovery","dns_resolver","drop","","fmt","","from","","init","","into","","nameserver","node_origin","on_node","pkarr_url","run","run_relay_server","run_relay_server_with","run_with_origin","try_from","","try_into","","type_id","","vzip",""],"q":[[0,"iroh"],[323,"iroh::KeyParsingError"],[331,"iroh::defaults"],[337,"iroh::defaults::prod"],[344,"iroh::defaults::staging"],[349,"iroh::discovery"],[677,"iroh::discovery::DiscoveryError"],[686,"iroh::discovery::IntoDiscoveryError"],[690,"iroh::discovery::ParseError"],[708,"iroh::discovery::dns"],[751,"iroh::discovery::mdns"],[793,"iroh::discovery::pkarr"],[954,"iroh::discovery::pkarr::PkarrError"],[961,"iroh::discovery::pkarr::dht"],[1019,"iroh::discovery::static_provider"],[1053,"iroh::dns"],[1097,"iroh::endpoint"],[3052,"iroh::endpoint::AddNodeAddrError"],[3059,"iroh::endpoint::AlpnError"],[3066,"iroh::endpoint::BindError"],[3072,"iroh::endpoint::ConnectError"],[3078,"iroh::endpoint::ConnectWithOptsError"],[3089,"iroh::endpoint::GetMappingAddressError"],[3097,"iroh::endpoint::Source"],[3099,"iroh::metrics"],[3275,"iroh::net_report"],[3462,"iroh::discovery"],[3463,"iroh::node_info"],[3464,"iroh::discovery"],[3465,"iroh::node_info"],[3479,"iroh::discovery"],[3481,"iroh::node_info"],[3483,"iroh::discovery"],[3484,"iroh::node_info"],[3485,"iroh::discovery"],[3486,"iroh::node_info"],[3518,"iroh::discovery"],[3519,"iroh::node_info"],[3561,"iroh::discovery"],[3562,"iroh::node_info"],[3587,"iroh::node_info::DecodingError"],[3596,"iroh::node_info::EncodingError"],[3602,"iroh::node_info::LookupError"],[3611,"iroh::discovery::ParseError"],[3629,"iroh::protocol"],[3750,"iroh::protocol::AcceptError"],[3755,"iroh::test_utils"],[3799,"dyn_clone::sealed"],[3800,"iroh_base::key"],[3801,"core::error"],[3802,"backtrace::capture"],[3803,"core::option"],[3804,"iroh_base::relay_url"],[3805,"iroh_base::node_addr"],[3806,"iroh_relay::relay_map"],[3807,"core::cmp"],[3808,"async_compat"],[3809,"core::result"],[3810,"serde::de"],[3811,"core::net::socket_addr"],[3812,"core::iter::traits::iterator"],[3813,"alloc::collections::btree::set"],[3814,"core::fmt"],[3815,"alloc::string"],[3816,"ed25519_dalek::verifying"],[3817,"data_encoding"],[3818,"signature::error"],[3819,"ed25519_dalek::signing"],[3820,"iroh_relay::node_info"],[3821,"iroh::magicsock::node_map::node_state"],[3822,"iroh_base::ticket::node"],[3823,"url"],[3824,"core::iter::traits::collect"],[3825,"rand_core"],[3826,"n0_watcher"],[3827,"core::clone"],[3828,"alloc::sync"],[3829,"core::hash"],[3830,"core::ops::function"],[3831,"core::marker"],[3832,"core::task::wake"],[3833,"core::task::poll"],[3834,"serde::ser"],[3835,"ed25519"],[3836,"core::any"],[3837,"n0_snafu::spantrace"],[3838,"iroh_relay::dns"],[3839,"alloc::boxed"],[3840,"pkarr::signed_packet"],[3841,"alloc::vec"],[3842,"futures_lite::stream"],[3843,"core::str::error"],[3844,"core::time"],[3845,"pkarr::keys"],[3846,"reqwest::error"],[3847,"http::status"],[3848,"pkarr::client"],[3849,"core::convert"],[3850,"hickory_proto::runtime::tokio_runtime"],[3851,"hickory_resolver::name_server::connection_provider"],[3852,"hickory_resolver::resolver"],[3853,"core::net::ip_addr"],[3854,"reqwest::dns::resolve"],[3855,"core::future::future"],[3856,"core::pin"],[3857,"iroh_quinn_proto::connection"],[3858,"iroh_quinn::connection"],[3859,"iroh_quinn_proto::config"],[3860,"iroh_quinn_proto::config::transport"],[3861,"iroh_quinn_proto::varint"],[3862,"iroh_quinn_proto::connection::stats"],[3863,"iroh::magicsock"],[3864,"iroh_quinn_proto::crypto"],[3865,"iroh_quinn_proto::congestion"],[3866,"std::time"],[3867,"iroh_quinn_proto::connection::assembler"],[3868,"bytes::bytes"],[3869,"iroh_quinn_proto::connection::streams::send"],[3870,"iroh_quinn::recv_stream"],[3871,"iroh_quinn::send_stream"],[3872,"iroh_quinn_proto::connection::streams"],[3873,"iroh::magicsock::node_map"],[3874,"iroh_quinn_proto::frame"],[3875,"iroh_quinn_proto"],[3876,"iroh_quinn_proto::coding"],[3877,"bytes::buf::buf_impl"],[3878,"futures_core::stream"],[3879,"bytes::buf::buf_mut"],[3880,"iroh_quinn::incoming"],[3881,"iroh_quinn_proto::connection::streams::recv"],[3882,"iroh_relay::protos::common"],[3883,"ring::error::unspecified"],[3884,"iroh_quinn_proto::transport_parameters"],[3885,"iroh_quinn_proto::shared"],[3886,"iroh_quinn_proto::connection::paths"],[3887,"std::io::error"],[3888,"tokio::io::read_buf"],[3889,"std::collections::hash::map"],[3890,"rustls_pki_types"],[3891,"rustls::error"],[3892,"iroh_quinn_proto::endpoint"],[3893,"iroh_metrics::metrics"],[3894,"iroh_metrics::iterable"],[3895,"iroh_metrics::base"],[3896,"iroh::net_report::options::imp"],[3897,"iroh::net_report::probes"],[3898,"iroh::net_report::report"],[3899,"iroh::net_report::reportgen"],[3900,"rustls::client::client_conn"],[3901,"iroh::net_report::metrics"],[3902,"iroh_quinn::endpoint"],[3903,"z32"],[3904,"simple_dns::simple_dns_error"],[3905,"hickory_proto::error"],[3906,"tokio::runtime::task::error"],[3907,"iroh::test_utils::dns_and_pkarr_servers"],[3908,"iroh_relay::server"],[3909,"iroh_relay"],[3910,"iroh_relay::defaults"]],"i":"Ab0`0`h`````````El`1AlAnB`BbBd67Ah7807785430217854302180754321754321754321743174317854302178543021785430212`78543302178543021807543144``785430212`7432177744433322211177885433002211777888555444444330222117522475432175375627380785430216785430214226``44`2674316`7514457543158066`5754321783021777785543021785430217854302161277854302144HdHfHh21210``````````````````If`0```````IdIj0``22`2Ih1`3Ib3DlInHn3745Il785604738J`67321584906732196715584358435843885849067321584906732158490673214525844906733215844906732196715`05849067321258455588844458849906677321155844444990677322167674458432848967158490673215849067321Kd3544`65414549`4I`4704277;893`04657:656:;89367::6;2895437:6;2895437:6;2895437537:6;289543767676L`LbLd100210Lf000LhLjLlLnM`Mb413520543210````MhMf1001101010101001010101010101110101010```MlMj1011010101010101010101010111110101010``Jj0000````````00NbNfNh333N`3Nd32514032104354324324325140325140325140325140325140325`105140325514032514032432551403251403214034324213254325514032514032151403245140322NjNnObOfOhOjOn``A@b0A@`10010111101010101010010101010100101000010101101001010A@f`00000000000000000000000000000000```Jb0000000000000000000000000000000000000000AHf0````ADh``AHl`AGn`ABh``444AGh`1`AFlAGbADj`````0`4`ADfAFh4AFn4AGd```````AI`0AGl```41ADn40;AFdACfAEhAGfAFf=ACnAGjDnAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`3ABd220?ACfACh1ACj77ACn;DnADb4ABf94AFhAJfAFjAFlAFnAG`AGbAGdAGjABhAClAHdADhADjADlADnADfAE`7543210ACj00AEfAEhAMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`>AEj?AF`AFdAFfAClADhADjADlADn=:5ACjAFhAFjAFlAFnAG`AGbAGdACd?ACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`AEnAFhAFjAFlAFnAG`AGbAGdACdAFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`AFhAFjAFlAFnAG`AGbAGdACdAFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`3111ACd876:0876AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AChAEh4AB`Dn11ACfAHf1AC`65522669AFdACd3AHh91258AGfAFfAGjAGlACbAEfAHlACjAHn`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`ACl>=<;52AGhACnDnAGlAGnAHhAB`ACj1000101AMbAM`ABnABlAMdAJdAFhAJfAIl0AFjAFlAFnAG`AIn0AGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AChACdAHfAHhAFhAFjAFlAFnAG`AGbAGd9AF`AFfAGhACnAGjDnAGlAGnABhAJbAH`AHbAHdAHfAHhAD`AHjAHlAI`AFh00AFj00AFl00AFn00AG`00AGb00AGd00ACd00AF`00AFf00AGh00ACn00AGj00Dn00AGl00AGn00ABh00AJb00AH`00AHb00AHd00AHf00AHh00AD`00AHj00AHl00AI`0087ABjAInAJdAFh0AJf0AIlAFj0AFl0AFn0AG`08AGb0AGd0AChACd0AF`AFdACfAEhAGfAFfAGh0ACnAGj0DnAGl0AGn0ABh0ACbAEfAC`AJbAJhAJjAH`0AHb0ACl0AHd0AHf0AHh0AD`AHj0AHlACjAB`ADh0ADj0ADl0ADn0AHnABbABdAJlABfADf0AJnABjAE`0AI``AHdAGf0AH`AMbAM`ABnABlAMdAJdAFh0AJfAIlAFj0AFl000AFn0AG`0AInAGb000AGd0AChACd00000AF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABh00ACbAEfAC`AJbAJh0AJjAH`0AHbAClAHd000AHfAHh0AD`AHjAHlACjAB`ADh0ADj00ADl0ADnAHnABbABdAJlABfADf0AJnABjAE`AI`AFhAFjAFlAFnAG`AGbAGdACdAFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AH`AHbAHdAHfAHhAD`AHjAHlAB`AHnABjAI`ACd00ABf3ACfDn3AGn<;:8AIlAInABd5AFhAJfAFjAFlAFnAG`AGbAGdAGjABhAClAHdADhADjADlADnADfAE`AC`0AHhAMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`AL`ACh0AEnAHhACjAEfAMbAM`ABnABlAMdAJdAFhAJfAIlAFjAFlAFnAG`AInAGbAGdAChACdAF`AFdACfAEhAGfAFfAGhACnAGjDnAGlAGnABhACbAEfAC`AJbAJhAJjAH`AHbAClAHdAHfAHhAD`AHjAHlACjAB`ADhADjADlADnAHnABbABdAJlABfADfAJnABjAE`AI`5AEnAMbAM`ABnABlAMd>=<;9AJfACdAFdAIlAJdAB`AChACj0ACn00Dn010ABdAEh00ACb66ACfABj8AC`222:09AEf:;<1AHhAHn55==95AF`AEn0000ADd77?ACd5AD`AHjAGf<AMbAM`ABnABlAMdABbAJlABfAJnAInAIl0111AC`02==111ABj22AH`AHbAHdACh06ABdAI`ACjDn33AB`09ACb=ACf06AL`={KlACd}{jACd}{cc{}}00000000000{AHdABh}{AKdABh}222222{AKfAJh}3{AHdAH`}444{AHfAHd}{AKhAHd}{AKjAHd}77{ACdAHh}8888888{AClADh}{ABhADj}{ADhADj};{IhADl}<<<<<<<<{ABhADf}===={{{b{c}}}c{}}0000000000000000000000000000000000{KlACd}{Kf{{C`{ACdAKl}}}}{KfACd}{{{b{AjABf}}}{{C`{{Jl{AKn}}ABh}}}}{{{b{ABj}}}{{Af{{Jl{AKn}}}}}}{ACfj}{{{b{Dn}}}Bj}{{{b{ACd}}{b{Ajc}}}fFf}{{{b{AGn}}{b{Ajc}}}fFf}{{{b{AHh}}{b{Ajc}}}fFf}{{{b{AD`}}{b{Ajc}}}fFf}{{{b{AHj}}{b{Ajc}}}fFf}{{{b{AB`}}}{{`{{El{}{{Ej{{K`{B`}}}}}}}}}}{{{b{AIl}}}AHh}{{{b{AIn}}}AHh}{ABdf}{ACfKf}{{}}00000000000000000{{{b{AjAC`}}Kf}{{b{AjAC`}}}}0{AHhKf}{{}Bl}0000000000000000000000000000000000000000000000000000000000000{{{b{AL`}}Kl{b{ALb}}}{{C`{ALdAJj}}}}{{{b{AjACh}}Hl}{{b{AjACh}}}}{{{b{AjACh}}Mn}{{b{AjACh}}}}{{{b{AEn}}}Kf}{AHhALf}{{ACjBj}ACj}{{{b{AjAEf}}Mn}{{b{AjAEf}}}}{{}c{}}0000000000000000000000000000000000000000000000000000000000000{ABf{{C`{{Dj{ABjAJn}}ABf}}}}{{{Jl{AEn}}}{{Jl{AKn}}}}======{ABdc{}}>>>{AJfALh}{ACdKf}{AFdKf}{{{b{AIl}}}Bj}{{{b{AJd}}}Bj}{{{b{AB`}}}Bj}{{{b{AjACh}}{Af{Mn}}}{{b{AjACh}}}}<{{ACj{K`{An}}}ACj}{ACnAf}00{{{b{Dn}}}{{Af{Mn}}}}{DnAf}20{{{b{ABd}}}{{Af{AA`}}}}{AEhKf}00{{{b{AjACb}}{Af{Mn}}}{{b{AjACb}}}}{{{b{AjACh}}ACd}{{b{AjACh}}}}0{ACfKf}{{{b{ABj}}}{{Af{Bl}}}}{{{b{AjACh}}{Af{ALj}}}{{b{AjACh}}}}{{{b{AjAC`}}Bl}{{b{AjAC`}}}}333{{{b{AB`}}}{{b{ALl}}}}{{{b{AjAC`}}Bj}{{b{AjAC`}}}}{{{b{AjACh}}Hl}{{b{AjACh}}}}{{{b{AjAEf}}Hl}{{b{AjAEf}}}}{{{b{AjACh}}{Af{AEf}}}{{b{AjACh}}}}{{{b{AB`}}}f}{{{b{AJd}}}Bj}{{{Fd{AL`}}{Fd{ADb}}}AC`}{{ALfAIhKf}AHh}{{}AHn}=={{{b{AB`}}}{{`{{El{}{{Ej{{Af{An}}}}}}}}}}{{{b{AB`}}}Kh}{DnKh}{ACfKf}{AF`Kf}{{{b{AjAEn}}AElAElKfBj{b{ALn}}}f}{{{b{AjAEn}}AElAElBjKf}f}{{{b{AjAEn}}AElKfBj{Af{Kf}}}f}{{{b{AjAEn}}Hl}f}{{{b{AjAEn}}AElKfKf}f}{{{b{ADd}}{b{Aj{A`{j}}}}{b{{A`{j}}}}}{{C`{{b{Aj{A`{j}}}}AJh}}}}{{{b{ABj}}}AM`}{{{b{ABj}}}AMb}{{{b{AjACh}}Kl}{{b{AjACh}}}}{{{b{ACd}}{b{ACd}}}{{Af{Bf}}}}{{{b{AHh}}{b{AHh}}}{{Af{Bf}}}}{{{b{AD`}}{b{AD`}}}{{Af{Bf}}}}{{{b{AHj}}{b{AHj}}}{{Af{Bf}}}}{AGfAEh}??{{ACjAHl}ACj}{{{b{ABj}}}{{Af{{Jl{AKn}}}}}}7{ACfKf}{{{AAn{{b{AjAMb}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjAM`}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjABn}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjABl}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjAMd}}}}{b{AjGf}}}Gh}{{{AAn{{b{AjABb}}}}{b{AjGf}}}{{Gh{c}}}{}}{{{AAn{{b{AjAJl}}}}{b{AjGf}}}{{Gh{c}}}{}}{{{AAn{{b{AjABf}}}}{b{AjGf}}}{{Gh{c}}}{}}{{{AAn{{b{AjAJn}}}}{b{AjGf}}}{{Gh{c}}}{}}{{{AAn{{b{AjAIn}}}}{b{AjGf}}}{{Gh{{C`{fAMf}}}}}}{{{b{AjAIl}}{b{AjGf}}{b{Aj{A`{j}}}}}{{Gh{{C`{BlAFl}}}}}}{{{AAn{{b{AjAIl}}}}{b{AjGf}}{b{AjAMh}}}{{Gh{{C`{fAMf}}}}}}2{{{AAn{{b{AjAIn}}}}{b{AjGf}}{b{{A`{j}}}}}{{Gh{{C`{BlAGb}}}}}}{{{AAn{{b{AjAIn}}}}{b{AjGf}}{b{{A`{j}}}}}{{Gh{{C`{BlAMf}}}}}}{{{b{AjAC`}}{Af{AEb}}}{{b{AjAC`}}}}{{{b{AjAC`}}{Af{AEd}}}{{b{AjAC`}}}}{{{b{AIn}}}{{C`{AMjAGj}}}}{ACjACj}{{ACjEb}ACj}{{{b{AjAIl}}{b{Aj{A`{j}}}}}{{C`{{Af{Bl}}AFl}}}}{{{b{AjAIl}}BlBj}{{C`{{Af{AF`}}AFl}}}}{{{b{AjAIl}}{b{Aj{A`{AFb}}}}}{{C`{{Af{Bl}}AFl}}}}{{{b{ABj}}}AMd}{{{b{AjAIl}}{b{Aj{A`{j}}}}}{{C`{fAG`}}}}{{{b{AjAIl}}Bl}{{C`{{K`{j}}AFj}}}}{AH`AFb}{AHbAFb}{AHdD`}{{{b{AjACh}}Bj}{{b{AjACh}}}}{{{b{AjACh}}ACd}{{b{AjACh}}}}{{{b{AjAIl}}}{{C`{{Af{ACd}}AFn}}}}{ABdf}{{{b{AI`}}}Bb}{{ACjAI`}ACj}{DnAf}{{{b{ABd}}}Cf}{{{b{ABd}}}Bj}{{{b{AB`}}Kh}{{Af{Dn}}}}{{{b{AB`}}}{{`{{Ch{}{{Cd{Dn}}}}}}}}{{{b{ABj}}}{{C`{KhAE`}}}}{{{b{AjACb}}ACd}{{b{AjACb}}}}{{{b{AjAIn}}ACd}{{C`{fAGj}}}}{ACfKf}0{ABd{{C`{fAJf}}}}{{{b{AL`}}Kl{b{ALb}}{b{{A`{j}}}}}{{l{j}}}}{{{b{AjAC`}}Mn}{{b{AjAC`}}}}{{{b{ABj}}}Mn}{AEhMn}{{ACdc}ACd{{A@h{ACd}}}}{{{b{ADd}}{b{Aj{K`{j}}}}{b{{A`{j}}}}}{{C`{fAJh}}}}{{ACjAl}ACj}{{{b{AB`}}}{{b{Al}}}}{{{b{ABj}}AFb}{{C`{fAFh}}}}{{{b{AjACh}}Bj}{{b{AjACh}}}}0{{{b{AjACh}}Kf}{{b{AjACh}}}}{AEhKf}0{{{b{AGh}}c}C`Gj}{{{b{ACn}}c}C`Gj}{{{b{Dn}}c}C`Gj}{{{b{AGl}}c}C`Gj}{{{b{AGn}}c}C`Gj}{{{b{AB`}}{K`{{K`{j}}}}}f}{{{b{ABj}}ACd}f}0{{{b{AIn}}AMj}{{C`{fAGj}}}}1{{{b{AB`}}{Af{Id}}}f}{{{b{AFh}}}{{Af{{b{n}}}}}}{{{b{AFj}}}{{Af{{b{n}}}}}}{{{b{AFl}}}{{Af{{b{n}}}}}}{{{b{AFn}}}{{Af{{b{n}}}}}}{{{b{AG`}}}{{Af{{b{n}}}}}}{{{b{AGb}}}{{Af{{b{n}}}}}}{{{b{AGd}}}{{Af{{b{n}}}}}}{{{b{ABh}}}{{Af{{b{n}}}}}}{{{b{ACl}}}{{Af{{b{n}}}}}}{{{b{ADh}}}{{Af{{b{n}}}}}}{{{b{ADj}}}{{Af{{b{n}}}}}}{{{b{ADl}}}{{Af{{b{n}}}}}}{{{b{ADn}}}{{Af{{b{n}}}}}}{{{b{ADf}}}{{Af{{b{n}}}}}}{{{b{AE`}}}{{Af{{b{n}}}}}}{{{b{Dn}}}{{K`{{Dj{AGnMn}}}}}}{ACnAMl}{{{b{ABj}}}Bl}{{{Fd{AL`}}Kl{b{AMn}}}{{Jl{AN`}}}}{{{b{ABj}}}AGf}{{{b{AjAIl}}ACd}{{C`{fAGj}}}}{ACfKf}{{{b{AjAIn}}}{{C`{{Af{ACd}}AGd}}}}11{{{b{AjACh}}ACd}{{b{AjACh}}}}22{{{b{AjAC`}}{Fd{ANb}}}{{b{AjAC`}}}}{{{b{AjACh}}ANd}{{b{AjACh}}}}{bc{}}0000000000000000000000000000000000{bD`}00000000000000000000000000{{{b{AjAC`}}{Fd{ADb}}}{{b{AjAC`}}}}{AC`Fd}{{{b{AjAC`}}{Fd{ACh}}}{{b{AjAC`}}}}{{ACjACh}ACj}{c{{C`{e}}}{}{}}0000000000000000{Bl{{C`{ACdAKl}}}}{ANf{{C`{ACdAKl}}}}{Kf{{C`{ACdAKl}}}}333333333333333333333333333333333333333333333{{}{{C`{c}}}{}}0000000000000000000000000000000000000000000000000000000000000{{{AAn{{b{Ajc}}}}{b{AjGf}}}Gh{}}000000{AD`AHj}{bH`}0000000000000000000000000000000000000000000000000000000000000{AGfAFd}0{{{b{AjAEf}}Hl}{{b{AjAEf}}}}{{ACjId}ACj}{AC`ANh}{{{b{AjAC`}}ANh}{{b{AjAC`}}}}{{}c{}}0000000000000000000000000000000000000000000000000000000000000{{{b{AEn}}}Kf}{{AHn{K`{{K`{j}}}}}AHn}{{{Fd{AL`}}}AC`}{{{K`{ANj}}ANl}{{C`{AC`ANn}}}}{{AHn{Fd{ACh}}}AHn}{{{b{AjAIn}}{b{{A`{j}}}}}{{C`{BlAGb}}}}{{{b{AjAIn}}{b{{A`{j}}}}}{{C`{fAGb}}}}{{{b{AjAIn}}{b{Aj{A`{AFb}}}}}{{C`{fAGb}}}}{{{b{AjAIn}}AFb}{{C`{fAGb}}}}{{{b{AjAIn}}{b{Aj{A`{AFb}}}}}{{C`{AFfAGb}}}}{AO`Af}{AObAf}{AOdAf}{AObBl}{AO`Hj}{AObHj}{AOdHj}{AOfAf}{AOhAf}{AOjAf}{AOfABh}{AOfHj}{AOhHj}{AOjHj}{AOlAf}{AOnAf}`{AOnIh}{AOlHj}{AOnHj}{B@`Af}{B@bAf}{B@`Jl}{B@bJl}{B@`Hj}{B@bHj}{B@dAf}{B@fAf}{B@hAf}{B@jAf}{B@dACl}{B@hADn}{B@jB@l}{B@dHj}{B@fHj}{B@hHj}{B@jHj}{B@nAf}{BA`Af}{BAbAf}{B@nIj}{BA`Ij}{B@nHj}{BA`Hj}{BAbHj}{BAdD`}{BAfD`}`````{{bd}f}{BAhBAj}{BAlBAj}000000{b{{b{BAn}}}}00{b{{b{c}}}{}}000{{{b{Aj}}}{{b{Ajc}}}{}}000444{{{b{ALl}}}ALl}{{b{b{Ajc}}}f{}}{{bj}f}{{}{{Bh{c}}}{}}000{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}000{b{{Bh{{b{c}}}}}{}}00099:{{}BB`}{{}BAl}{{}BAh}{{}ALl}{Bl{{b{c}}}{}}000{Bl{{b{Ajc}}}{}}000{c{{C`{BB`}}}Cb}{c{{C`{BAl}}}Cb}{c{{C`{ALl}}}Cb}{BAhBAj}000{Blf}000{BB`BAj}{{{b{BB`}}}Bl}{{{b{BAl}}}Bl}{{{b{BAh}}}Bl}{{{b{BB`}}Bl}{{Af{BBb}}}}{{{b{BAl}}Bl}{{Af{BBb}}}}{{{b{BAh}}Bl}{{Af{BBb}}}}{{{b{BB`}}{b{AjCl}}}{{C`{fCn}}}}{{{b{BAl}}{b{AjCl}}}Jd}{{{b{BAh}}{b{AjCl}}}{{C`{fCn}}}}{{{b{ALl}}{b{AjCl}}}Jd}{cc{}}000{{{b{c}}}c{}}>{{{b{ALl}}}{{`{{Ch{}{{Cd{{b{BBd}}}}}}}}}}{{{b{ALl}}}{{`{{Ch{}{{Cd{{Fd{BBd}}}}}}}}}}{{}Bl}000{{}c{}}000{BB`BAj}{ALlFd}11{{{b{BB`}}}{{b{Bn}}}}{{{b{BAl}}}{{b{Bn}}}}{{{b{BAh}}}{{b{Bn}}}}{{{b{ALl}}}{{b{Bn}}}}4{BAlBAj}00000{BAhBAj}0077671111111111111111111100011111110{{{b{BB`}}c}C`Gj}{{{b{BAl}}c}C`Gj}{{{b{ALl}}c}C`Gj}{bc{}}{c{{C`{e}}}{}{}}000{{}{{C`{c}}}{}}000{bH`}000778>>>>{{}c{}}000`````````{{bd}f}0000{b{{b{BAn}}}}{{{b{BBf}}}{{Cj{BBh}}}}{b{{b{c}}}{}}00000{{{b{Aj}}}{{b{Ajc}}}{}}00000{BBjAf}{BBlBBn}{{{b{BBh}}}BBh}{{{b{BBj}}}BBj}{{{b{BC`}}}BC`}{{{b{BBl}}}BBl}{{{b{BBf}}}BBf}{{b{b{Ajc}}}f{}}0000{{bj}f}0000{{{b{BBh}}{b{BBh}}}Bf}{{b{b{c}}}Bf{}}{{}{{Bh{c}}}{}}00000{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}00000{b{{Bh{{b{c}}}}}{}}00000{{}BCb}{{}BBj}{{}BC`}{{}BBf}{Bl{{b{c}}}{}}00000{Bl{{b{Ajc}}}{}}00000{c{{C`{BCb}}}Cb}3{Blf}00000{BBlBCd}{{{b{BBh}}{b{BBh}}}Bj}{{{b{BBj}}{b{BBj}}}Bj}{{{b{BC`}}{b{BC`}}}Bj}{{b{b{c}}}Bj{}}00000000{{{b{BCb}}}Bl}{{{b{BCb}}Bl}{{Af{BBb}}}}{{{b{BCb}}{b{AjCl}}}Jd}{{{b{BBh}}{b{AjCl}}}Jd}0{{{b{BBj}}{b{AjCl}}}Jd}0{{{b{BC`}}{b{AjCl}}}Jd}{{{b{BBl}}{b{AjCl}}}Jd}{{{b{BBf}}{b{AjCl}}}Jd}{cc{}}00000{{{b{c}}}c{}}0000{BBjAf}0{{{b{BBj}}}Bj}{{BBfBj}BBf}{{}Bl}000001{{}c{}}00000{BBlBj}0{{{b{BC`}}}{{`{{Ch{}{{Cd{{Dj{{b{B`}}Mn}}}}}}}}}}{{{b{BBj}}}{{Af{Bj}}}}77{{{b{BCb}}}{{b{Bn}}}}{{{b{BBh}}{b{BBh}}}{{Af{Bf}}}}9{{BBf{Af{BBl}}}BBf}{BBjBC`}{BCbBAj}0{{{b{BCb}}c}C`Gj}{bc{}}0000{bD`}0{c{{C`{e}}}{}{}}00000{{}{{C`{c}}}{}}00000{bH`}00000{BBjBj}0{{}c{}}00000`````{{}b}``````````````````{b{{b{n}}}}000{{{b{Kn}}}{{Af{{b{Ad}}}}}}{{{b{Ef}}}{{Af{{b{Ad}}}}}}{{{b{BCf}}}{{Af{{b{Ad}}}}}}{{{b{AAh}}}{{Af{{b{Ad}}}}}}{b{{b{c}}}{}}000{{{b{Aj}}}{{b{Ajc}}}{}}000{{{b{Kn}}}{{Af{{b{n}}}}}}{{{b{Ef}}}{{Af{{b{n}}}}}}{{{b{BCf}}}{{Af{{b{n}}}}}}{{{b{AAh}}}{{Af{{b{n}}}}}}{{}{{Bh{c}}}{}}000{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}000{b{{Bh{{b{c}}}}}{}}000{DlIb}{Bl{{b{c}}}{}}000{Bl{{b{Ajc}}}{}}000{{{b{Kn}}}{{b{Bn}}}}{{{b{Ef}}}{{b{Bn}}}}{{{b{BCf}}}{{b{Bn}}}}{{{b{AAh}}}{{b{Bn}}}}{Blf}000{{{b{Kn}}{b{AjCl}}}{{C`{fCn}}}}0{{{b{Ef}}{b{AjCl}}}{{C`{fCn}}}}0{{{b{BCf}}{b{AjCl}}}{{C`{fCn}}}}0{{{b{AAh}}{b{AjCl}}}{{C`{fCn}}}}0{BChKn}{cc{}}000{{{b{Bn}}}{{C`{hEf}}}}{{}}000{{}Bl}000{{}c{}}000{Dlh}{{{b{Kn}}}{{Af{{b{n}}}}}}{{{b{Ef}}}{{Af{{b{n}}}}}}{{{b{BCf}}}{{Af{{b{n}}}}}}{{{b{AAh}}}{{Af{{b{n}}}}}}{bD`}000{{{b{BCj}}}D`}{c{{C`{e}}}{}{}}000{{}{{C`{c}}}{}}000{bH`}000{{}c{}}000{BClAf}{BCnAf}{BD`Af}{BCnBl}{BClBDb}{BD`Df}{BClHj}{BCnHj}{BD`Hj}{BDdAf}{BDfAf}{BDdBCh}{BDfBDh}{BDdHj}{BDfHj}{BDjAf}{BDlAf}{BDnAf}{BDjJl}{BDlJl}{BDnBE`}{BDjHj}{BDlHj}{BDnHj}{LhAf}{LjAf}{LlAf}{LnAf}{M`Af}{MbAf}{LjD`}{M`D`}{LlBl}{LhD`}{LnMd}{MbJl}{LhHj}{LjHj}{LlHj}{LnHj}{M`Hj}{MbHj}``````````{{bd}f}0{{{b{BEb}}ABj}{{`{{AAl{}{{Fn{{C`{fBEd}}}}}}Gb}}}}{{{b{BEf}}ABj}{{AAn{{Jl{AAl}}}}}}{{BEhce}BEh{{BEj{{A`{j}}}}}{{A@h{{Jl{BEf}}}}}}{{bABj}{{AAn{{Jl{AAl}}}}}}{{{b{{BEl{c}}}}ABj}{{C`{fBEd}}}{BEbF`}}{b{{b{n}}}}{{{b{BEd}}}{{Af{{b{Ad}}}}}}{b{{b{c}}}{}}000{{{b{Aj}}}{{b{Ajc}}}{}}000{AB`BEh}{{{b{BEd}}}{{Af{{b{n}}}}}}{{{b{BEn}}}BEn}{{{b{{BEl{c}}}}}{{BEl{c}}}{F`BEbF`}}{{b{b{Ajc}}}f{}}0{{bj}f}0{{}{{Bh{c}}}{}}000{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}000{b{{Bh{{b{c}}}}}{}}000{Bl{{b{c}}}{}}000{Bl{{b{Ajc}}}{}}000{{{b{BEd}}}{{b{Bn}}}}{Blf}000{{{b{BEn}}}{{b{AB`}}}}{{{b{BEh}}}{{b{AB`}}}}{{{b{BEn}}{b{AjCl}}}Jd}{{{b{BEh}}{b{AjCl}}}Jd}{{{b{BEd}}{b{AjCl}}}Jd}0{{{b{{BEl{c}}}}{b{AjCl}}}Jd{BF`BEbF`}}{cc{}}0{ABhBEd}{AE`BEd}{{{Jl{n}}}BEd}{AMfBEd}{AGjBEd}55{cBEd{nGbGd}}{{{b{c}}}c{}}0{{}}{{}Bl}000{{}c{}}000{{{b{BEn}}}Bj}{AB`BEh}{{ce}{{BEl{c}}}{BEbF`}{{G`{Kh}{{Fn{Bj}}}}GbGd}}{{{b{BEb}}ABf}{{`{{AAl{}{{Fn{{C`{ABjBEd}}}}}}Gb}}}}{{{b{BEf}}ABf}{{AAn{{Jl{AAl}}}}}}{{bABf}{{AAn{{Jl{AAl}}}}}}{{{b{{BEl{c}}}}ABf}{{`{{AAl{}{{Fn{{C`{ABjBEd}}}}}}Gb}}}{BEbF`}}{{{b{BEb}}}{{`{{AAl{}{{Fn{f}}}}Gb}}}}{{{b{BEf}}}{{AAn{{Jl{AAl}}}}}}{{{b{BEn}}}{{C`{fBFb}}}}{{{b{{BEl{c}}}}}{{`{{AAl{}{{Fn{f}}}}Gb}}}{BEbF`}}{b{{AAn{{Jl{AAl}}}}}}{{{b{BEd}}}{{Af{{b{n}}}}}}{BEhBEn}{bc{}}0{bD`}{c{{C`{e}}}{}{}}000{{}{{C`{c}}}{}}000{bH`}000{{}c{}}000{BFdAf}{BFdABh}{BFfAE`}{BFhJl}{BFdHj}``{b{{b{c}}}{}}0{{{b{Aj}}}{{b{Ajc}}}{}}0{{}{{Bh{c}}}{}}0{{{b{Aj}}}{{Bh{{b{Ajc}}}}}{}}0{b{{Bh{{b{c}}}}}{}}0{Bl{{b{c}}}{}}0{Bl{{b{Ajc}}}{}}0{{{b{BFj}}Al}Hn}{{{b{BFj}}}Jb}{Blf}0{{{b{BFl}}{b{AjCl}}}Jd}{{{b{BFj}}{b{AjCl}}}Jd}{cc{}}0{{}Bl}0{{}c{}}0{BFjCf}{BFjD`}{{{b{BFj}}{b{Kh}}Mn}{{BFn{f}}}}{BFjEb}{{}{{BFn{BFj}}}}{{}{{C`{{Dj{BbB`BG`}}BGb}}}}{Bj{{C`{{Dj{BbB`BG`}}BGb}}}}{D`{{BFn{BFj}}}}{c{{C`{e}}}{}{}}0{{}{{C`{c}}}{}}0{bH`}0{{}c{}}0","D":"GFb","p":[[1,"reference",null,null,1],[5,"Private",3799],[1,"unit"],[5,"PublicKey",0,3800],[1,"u8"],[1,"array"],[10,"Error",3801],[1,"slice"],[6,"KeyParsingError",0,3800],[5,"Backtrace",3802],[6,"Option",3803,null,1],[5,"RelayUrlParseError",0,3804],[0,"mut"],[5,"SecretKey",0,3800],[5,"NodeAddr",0,3805],[5,"RelayUrl",0,3804],[5,"RelayMap",0,3806],[5,"RelayNode",0,3806],[6,"Ordering",3807],[5,"Compat",3808],[1,"bool"],[1,"usize"],[1,"str"],[6,"Result",3809,null,1],[10,"Deserializer",3810],[17,"Item"],[6,"SocketAddr",3811],[10,"Iterator",3812],[5,"BTreeSet",3813],[5,"Formatter",3814],[5,"Error",3814],[5,"String",3815],[5,"VerifyingKey",3816],[5,"DecodeError",3817],[5,"Error",3818],[5,"SigningKey",3819],[1,"tuple",null,null,1],[5,"NodeInfo",3561,3820],[5,"RemoteInfo",1097,3821],[5,"NodeTicket",3822],[5,"Url",3823],[10,"IntoIterator",3824],[6,"DecodingError",3562,3820],[10,"CryptoRngCore",3825],[17,"Value"],[10,"Watcher",0,3826],[5,"Disconnected",3826],[10,"Clone",3827],[10,"Eq",3807],[5,"Arc",3828,null,1],[10,"Hasher",3829],[5,"InitializedFut",3826],[10,"Nullable",3826],[5,"Map",3826],[17,"Output"],[10,"Fn",3830],[10,"Send",3831],[10,"Sync",3831],[5,"Context",3832],[6,"Poll",3833],[10,"Serializer",3834],[5,"Signature",3835],[5,"Stream",3826],[5,"TypeId",3836],[5,"NextFut",3826],[15,"Decode",323],[15,"Key",323],[15,"DecodeInvalidLength",323],[5,"SpanTrace",3837],[1,"u16"],[5,"ConcurrentDiscovery",3561],[10,"Discovery",3561],[5,"NodeData",3561,3820],[5,"UserData",3561,3820],[6,"ParseError",3561,3820],[6,"IntoDiscoveryError",3561],[6,"DiscoveryError",3561],[5,"Lagged",3561],[5,"DiscoveryItem",3561],[5,"DiscoveryContext",3561],[5,"DnsResolver",1053,3838],[8,"Result",3814],[6,"IrohAttr",3820],[5,"TxtAttrs",3820],[6,"PkarrError",793],[5,"Box",3839,null,1],[5,"SignedPacket",3840],[5,"Vec",3841],[5,"TxtLookup",3838],[10,"IntoDiscovery",3561],[1,"u64"],[8,"NodeId",0,3800],[8,"Boxed",3842],[1,"u32"],[6,"EncodingError",3562,3820],[15,"NoServiceConfigured",677],[15,"NoResults",677],[15,"User",677],[15,"User",686],[15,"UnexpectedFormat",3611],[15,"AttrFromString",3611],[15,"NumLabels",3611],[15,"Utf8",3611],[15,"NotAnIrohRecord",3611],[15,"DecodingError",3611],[5,"Utf8Error",3843],[5,"DnsDiscoveryBuilder",708],[5,"DnsDiscovery",708],[5,"MdnsDiscoveryBuilder",751],[5,"MdnsDiscovery",751],[5,"Duration",3844],[5,"PkarrPublisherBuilder",793],[5,"PkarrPublisher",793],[5,"PkarrResolverBuilder",793],[5,"PkarrResolver",793],[5,"PkarrRelayClient",793],[15,"PublicKey",954],[6,"PublicKeyError",3845],[15,"Verify",954],[6,"SignedPacketVerifyError",3840],[15,"HttpSend",954],[5,"Error",3846],[15,"HttpPayload",954],[15,"Encoding",954],[15,"HttpRequest",954],[5,"StatusCode",3847],[15,"InvalidRelayUrl",954],[5,"Builder",961],[5,"DhtDiscovery",961],[5,"Client",3848],[5,"StaticProvider",1019],[10,"Into",3849,null,1],[5,"TokioRuntimeProvider",3850],[5,"GenericConnector",3851],[5,"Resolver",3852],[6,"IpAddr",3853],[6,"DnsError",3838],[10,"ToString",3815],[5,"StaggeredError",3838],[6,"LookupError",3562,3820],[5,"Name",3854],[10,"Future",3855,null,1],[5,"Pin",3856],[5,"Endpoint",1097],[5,"Accept",1097],[5,"Incoming",1097],[5,"Connecting",1097],[6,"ConnectionError",1097,3857],[5,"Connection",1097],[5,"AcceptBi",1097,3858],[5,"AcceptUni",1097,3858],[5,"ServerConfig",1097,3859],[5,"AckFrequencyConfig",1097,3860],[5,"VarInt",1097,3861],[5,"FrameStats",1097,3862],[5,"TransportConfig",1097,3860],[5,"Builder",1097],[6,"AddNodeAddrError",1097,3863],[5,"DirectAddrInfo",1097,3821],[5,"DirectAddr",1097,3863],[10,"HandshakeTokenKey",1097,3864],[10,"AeadKey",1097,3864],[6,"AlpnError",1097],[6,"ConnectWithOptsError",1097],[6,"ConnectError",1097],[6,"BindError",1097],[6,"GetMappingAddressError",1097],[5,"RemoteNodeIdError",1097],[5,"SocketAddrV4",3811],[5,"SocketAddrV6",3811],[5,"MtuDiscoveryConfig",1097,3860],[5,"PathStats",1097,3862],[10,"ControllerFactory",1097,3865],[5,"Instant",3866],[10,"Controller",1097,3865],[5,"Chunk",1097,3867],[5,"Bytes",3868],[5,"UdpStats",1097,3862],[5,"Written",1097,3869],[6,"SendDatagramError",1097,3858],[6,"ReadToEndError",1097,3870],[6,"ReadError",1097,3870],[6,"ResetError",1097,3870],[6,"ReadExactError",1097,3870],[6,"WriteError",1097,3871],[6,"StoppedError",1097,3871],[5,"ConnectionStats",1097,3862],[6,"ControlMsg",1097,3821],[5,"ClosedStream",1097,3872],[6,"ConnectionType",1097,3821],[6,"Source",1097,3873],[5,"ConnectionClose",1097,3874],[5,"ApplicationClose",1097,3874],[5,"TransportError",1097],[5,"TransportErrorCode",1097],[5,"StreamId",1097,3875],[6,"DirectAddrType",1097,3863],[6,"PathSelection",1097],[5,"ConnectOptions",1097],[6,"RelayMode",1097],[5,"Direct",3826],[5,"UnexpectedEnd",3876],[10,"Buf",3877],[6,"Dir",3875],[10,"Stream",3878],[5,"RecvStream",1097,3870],[5,"SendStream",1097,3871],[10,"BufMut",3879],[5,"ExportKeyingMaterialError",1097,3864],[5,"WeakConnectionHandle",1097,3858],[5,"RetryError",1097,3880],[5,"CryptoError",1097,3864],[5,"UnsupportedVersion",1097,3864],[5,"IncomingFuture",1097],[5,"ZeroRttAccepted",1097],[6,"ReadableError",3881],[6,"FrameType",3882],[6,"Close",3874],[5,"Unspecified",3883],[6,"Error",3884],[5,"InvalidFrame",3874],[5,"VarIntBoundsExceeded",3861],[10,"Any",3836],[10,"CryptoServerConfig",1097],[5,"ConnectionId",3885],[5,"Keys",3864],[6,"Side",3875],[5,"Incoming",3880],[5,"IdleTimeout",3860],[5,"EndpointMetrics",3099],[5,"RttEstimator",3886],[5,"OpenBi",1097,3858],[5,"OpenUni",1097,3858],[5,"ReadDatagram",1097,3858],[5,"Error",3887],[5,"ReadBuf",3888],[1,"i32"],[5,"HashMap",3889],[5,"TransportParameters",3884],[10,"Session",3864],[10,"TimeSource",3859],[1,"f32"],[1,"u128"],[5,"ValidationTokenConfig",3859],[5,"CertificateDer",3890],[6,"PrivateKeyDer",3890],[6,"Error",3891],[15,"Empty",3052],[15,"EmptyPruned",3052],[15,"OwnAddress",3052],[15,"ConnectionError",3059],[15,"Unavailable",3059],[15,"UnknownHandshake",3059],[15,"MagicSpawn",3066],[15,"Discovery",3066],[15,"Connect",3072],[15,"Connection",3072],[15,"AddNodeAddr",3078],[15,"SelfConnect",3078],[15,"NoAddress",3078],[15,"Quinn",3078],[6,"ConnectError",3892],[15,"DiscoveryStart",3089],[15,"Discover",3089],[15,"NoAddress",3089],[15,"Discovery",3097],[15,"NamedApp",3097],[5,"RelayMetrics",3099],[5,"Counter",3893],[5,"MagicsockMetrics",3099],[10,"Iterable",3894],[5,"PortmapMetrics",3099],[5,"MetricItem",3895],[10,"MetricsGroup",3895],[5,"Options",3275,3896],[6,"Probe",3275,3897],[5,"Report",3275,3898],[5,"QuicConfig",3275,3899],[5,"ClientConfig",3900],[5,"RelayLatencies",3275,3898],[5,"Metrics",3275,3901],[5,"Endpoint",3902],[5,"MaxLengthExceededError",3562,3820],[6,"SignedPacketBuildError",3840],[10,"NodeIdExt",3562,3820],[15,"InvalidEncodingZ32",3587],[15,"InvalidLength",3587],[15,"InvalidSignature",3587],[6,"Z32Error",3903],[15,"FailedBuildingPacket",3596],[15,"InvalidTxtEntry",3596],[6,"SimpleDnsError",3904],[15,"ParseError",3602],[15,"LookupFailed",3602],[15,"InvalidLabel",3602],[5,"ProtoError",3905],[10,"ProtocolHandler",3629],[6,"AcceptError",3629],[10,"DynProtocolHandler",3629],[5,"RouterBuilder",3629],[10,"AsRef",3849],[5,"AccessLimit",3629],[5,"Router",3629],[10,"Debug",3814],[5,"JoinError",3906],[15,"Connection",3750],[15,"MissingRemoteNodeId",3750],[15,"User",3750],[5,"DnsPkarrServer",3755,3907],[5,"CleanupDropGuard",3755],[8,"Result",3887],[5,"Server",3908],[6,"SpawnError",3908]],"r":[[0,3800],[1,3800],[2,1097],[3,3800],[4,3800],[5,3800],[6,3805],[7,3800],[8,3800],[9,3806],[10,1097],[11,3806],[12,3804],[13,3804],[14,3800],[15,3826],[16,3826],[17,3800],[18,3800],[19,3805],[20,3804],[21,3806],[22,3806],[23,3800],[24,3800],[25,3804],[26,3800],[27,3800],[28,3804],[29,3800],[30,3800],[31,3800],[32,3800],[33,3805],[34,3804],[35,3804],[36,3806],[37,3806],[38,3800],[39,3800],[40,3800],[41,3805],[42,3804],[43,3804],[44,3806],[45,3806],[46,3800],[47,3804],[48,3800],[49,3800],[50,3805],[51,3804],[52,3806],[53,3806],[54,3800],[55,3800],[56,3805],[57,3804],[58,3806],[59,3806],[60,3800],[61,3800],[62,3805],[63,3804],[64,3806],[65,3806],[66,3800],[67,3805],[68,3804],[69,3806],[70,3800],[71,3805],[72,3804],[73,3806],[74,3800],[75,3800],[76,3800],[77,3805],[78,3804],[79,3804],[80,3806],[81,3806],[82,3800],[83,3800],[84,3800],[85,3805],[86,3804],[87,3804],[88,3806],[89,3806],[90,3800],[91,3800],[92,3800],[93,3805],[94,3804],[95,3804],[96,3806],[97,3806],[98,3806],[100,3800],[101,3800],[102,3800],[103,3805],[104,3804],[105,3804],[106,3804],[107,3806],[108,3806],[109,3800],[110,3800],[111,3800],[112,3805],[113,3804],[114,3804],[115,3806],[116,3806],[117,3800],[118,3804],[119,3800],[120,3800],[121,3805],[122,3804],[123,3806],[124,3805],[125,3805],[128,3800],[129,3800],[130,3800],[131,3805],[132,3804],[133,3804],[134,3806],[135,3806],[136,3806],[138,3800],[139,3805],[140,3804],[141,3806],[142,3806],[143,3800],[144,3800],[145,3800],[146,3805],[147,3805],[148,3805],[149,3804],[150,3804],[151,3804],[152,3806],[153,3806],[154,3806],[155,3806],[156,3806],[157,3806],[158,3800],[159,3800],[160,3800],[161,3800],[162,3800],[163,3805],[164,3804],[165,3804],[166,3804],[167,3804],[168,3806],[169,3806],[170,3806],[171,3806],[172,3800],[173,3800],[174,3800],[175,3800],[176,3800],[177,3800],[178,3800],[179,3800],[180,3800],[181,3805],[182,3805],[183,3805],[184,3805],[185,3805],[186,3805],[187,3804],[188,3804],[189,3804],[190,3806],[191,3806],[192,3806],[193,3806],[194,3806],[195,3800],[196,3800],[197,3806],[198,3806],[199,3805],[200,3800],[201,3800],[202,3805],[203,3804],[204,3806],[205,3806],[206,3800],[207,3800],[208,3804],[209,3800],[210,3800],[211,3826],[212,3806],[213,3800],[214,3804],[215,3800],[216,3804],[217,3800],[218,3800],[219,3800],[220,3805],[221,3804],[222,3804],[223,3806],[224,3806],[225,3826],[226,3800],[227,3800],[228,3800],[229,3805],[230,3804],[231,3804],[232,3806],[233,3806],[234,3805],[235,3806],[236,3806],[237,3826],[240,3805],[241,3805],[242,3909],[243,3806],[244,3826],[245,3800],[246,3805],[247,3804],[248,3806],[249,3826],[251,3800],[252,3800],[253,3806],[254,3805],[255,3805],[256,3800],[257,3800],[258,3800],[259,3805],[260,3804],[261,3806],[262,3800],[263,3800],[264,3804],[265,3826],[266,3826],[268,3800],[269,3800],[270,3800],[271,3805],[272,3804],[273,3806],[274,3806],[275,3800],[276,3800],[277,3804],[278,3804],[279,3806],[280,3806],[281,3800],[282,3800],[283,3800],[284,3800],[285,3800],[286,3800],[287,3800],[288,3805],[289,3804],[290,3804],[291,3806],[292,3806],[293,3800],[294,3800],[295,3800],[296,3805],[297,3804],[298,3804],[299,3806],[300,3806],[301,3800],[302,3800],[303,3800],[304,3805],[305,3804],[306,3804],[307,3806],[308,3806],[309,3826],[310,3806],[311,3806],[312,3800],[313,3800],[314,3800],[315,3800],[316,3805],[317,3804],[318,3804],[319,3806],[320,3806],[321,3805],[322,3805],[334,3910],[349,3820],[351,3820],[359,3820],[362,3820],[363,3820],[364,3820],[365,3820],[366,3820],[367,3820],[370,3820],[371,3820],[372,3820],[373,3820],[374,3820],[377,3820],[378,3820],[382,3820],[383,3820],[387,3820],[388,3820],[389,3820],[390,3820],[397,3820],[398,3820],[399,3820],[400,3820],[407,3820],[411,3820],[412,3820],[413,3820],[414,3820],[416,3820],[417,3820],[418,3820],[420,3820],[421,3820],[422,3820],[424,3820],[425,3820],[426,3820],[427,3820],[428,3820],[429,3820],[436,3820],[437,3820],[438,3820],[439,3820],[446,3820],[447,3820],[448,3820],[449,3820],[456,3820],[457,3820],[459,3820],[460,3820],[461,3820],[462,3820],[463,3820],[471,3820],[472,3820],[473,3820],[474,3820],[475,3820],[482,3820],[486,3820],[489,3820],[490,3820],[491,3820],[492,3820],[500,3820],[501,3820],[502,3820],[503,3820],[504,3820],[505,3820],[506,3820],[507,3820],[508,3820],[509,3820],[510,3820],[511,3820],[512,3820],[513,3820],[514,3820],[515,3820],[516,3820],[517,3820],[527,3820],[528,3820],[529,3820],[530,3820],[531,3820],[532,3820],[533,3820],[534,3820],[535,3820],[536,3820],[549,3820],[550,3820],[551,3820],[552,3820],[553,3820],[556,3820],[557,3820],[558,3820],[559,3820],[563,3820],[564,3820],[565,3820],[566,3820],[573,3820],[574,3820],[575,3820],[576,3820],[585,3820],[589,3820],[590,3820],[594,3820],[596,3820],[601,3820],[605,3820],[606,3820],[607,3820],[614,3820],[616,3820],[617,3820],[618,3820],[620,3820],[621,3820],[622,3820],[626,3820],[627,3820],[628,3820],[629,3820],[630,3820],[631,3820],[638,3820],[639,3820],[640,3820],[641,3820],[648,3820],[649,3820],[650,3820],[651,3820],[658,3820],[661,3820],[662,3820],[663,3820],[664,3820],[671,3820],[672,3820],[673,3820],[674,3820],[675,3820],[676,3820],[710,3838],[711,3838],[1053,3838],[1054,3838],[1055,3838],[1056,3838],[1057,3838],[1058,3838],[1059,3838],[1060,3838],[1061,3838],[1062,3838],[1063,3838],[1064,3838],[1065,3838],[1066,3838],[1067,3838],[1068,3838],[1069,3838],[1070,3838],[1071,3838],[1072,3838],[1073,3838],[1074,3838],[1075,3838],[1076,3838],[1077,3838],[1078,3838],[1079,3838],[1080,3838],[1081,3838],[1082,3838],[1083,3838],[1084,3838],[1085,3838],[1086,3838],[1087,3838],[1088,3838],[1089,3838],[1090,3838],[1091,3838],[1092,3838],[1093,3838],[1094,3838],[1095,3838],[1096,3838],[1100,3858],[1101,3858],[1102,3860],[1104,3863],[1105,3864],[1108,3873],[1109,3874],[1110,3857],[1116,3821],[1117,3867],[1118,3857],[1119,3872],[1120,3870],[1121,3871],[1129,3874],[1130,3857],[1131,3857],[1133,3858],[1134,3870],[1135,3870],[1136,3871],[1137,3871],[1138,3862],[1139,3821],[1140,3821],[1141,3865],[1142,3865],[1143,3864],[1147,3821],[1148,3863],[1149,3821],[1150,3863],[1151,3858],[1154,3873],[1158,3863],[1159,3863],[1161,3864],[1165,3870],[1166,3862],[1168,3864],[1171,3870],[1175,3863],[1176,3857],[1177,3861],[1178,3861],[1180,3821],[1181,3860],[1184,3873],[1187,3821],[1188,3858],[1189,3858],[1190,3863],[1193,3862],[1194,3821],[1195,3821],[1196,3863],[1197,3863],[1198,3863],[1200,3870],[1201,3858],[1202,3870],[1203,3870],[1204,3870],[1205,3870],[1206,3870],[1207,3821],[1208,3873],[1211,3821],[1213,3870],[1214,3857],[1215,3870],[1216,3880],[1219,3873],[1221,3858],[1222,3871],[1223,3859],[1224,3873],[1226,3871],[1227,3871],[1228,3875],[1230,3857],[1231,3858],[1232,3870],[1233,3860],[1235,3857],[1237,3873],[1238,3862],[1240,3863],[1242,3858],[1243,3864],[1244,3861],[1245,3857],[1246,3858],[1247,3871],[1248,3869],[1250,3870],[1251,3870],[1252,3871],[1253,3871],[1254,3858],[1255,3870],[1256,3870],[1257,3870],[1258,3870],[1259,3871],[1260,3871],[1261,3861],[1262,3862],[1263,3862],[1264,3862],[1265,3862],[1266,3869],[1267,3821],[1268,3821],[1269,3872],[1270,3821],[1271,3821],[1272,3873],[1273,3857],[1274,3860],[1275,3860],[1276,3859],[1277,3874],[1278,3874],[1281,3875],[1282,3863],[1283,3863],[1294,3860],[1295,3862],[1296,3860],[1297,3862],[1301,3821],[1302,3863],[1303,3821],[1304,3864],[1305,3860],[1309,3858],[1310,3880],[1311,3870],[1312,3870],[1313,3870],[1314,3870],[1315,3871],[1316,3871],[1317,3872],[1318,3857],[1319,3863],[1327,3863],[1337,3860],[1338,3862],[1339,3858],[1340,3858],[1341,3858],[1342,3858],[1343,3858],[1344,3858],[1345,3858],[1346,3880],[1347,3870],[1348,3870],[1349,3870],[1350,3870],[1351,3870],[1352,3871],[1353,3871],[1354,3871],[1355,3860],[1356,3861],[1357,3867],[1358,3862],[1359,3862],[1360,3862],[1361,3862],[1362,3869],[1363,3821],[1364,3821],[1365,3872],[1366,3821],[1367,3821],[1368,3873],[1369,3857],[1370,3860],[1371,3860],[1372,3859],[1373,3864],[1374,3864],[1375,3864],[1376,3874],[1377,3874],[1378,3863],[1381,3875],[1382,3863],[1383,3863],[1401,3858],[1402,3858],[1403,3858],[1404,3858],[1405,3858],[1406,3858],[1407,3858],[1408,3880],[1409,3870],[1410,3870],[1411,3870],[1412,3870],[1413,3870],[1414,3871],[1415,3871],[1416,3871],[1417,3860],[1418,3861],[1419,3867],[1420,3862],[1421,3862],[1422,3862],[1423,3862],[1424,3869],[1425,3821],[1426,3821],[1427,3872],[1428,3821],[1429,3821],[1430,3873],[1431,3857],[1432,3860],[1433,3860],[1434,3859],[1435,3864],[1436,3864],[1437,3864],[1438,3874],[1439,3874],[1440,3863],[1443,3875],[1444,3863],[1445,3863],[1464,3865],[1466,3867],[1467,3862],[1468,3869],[1469,3863],[1476,3869],[1478,3858],[1479,3870],[1480,3870],[1481,3870],[1482,3870],[1483,3871],[1484,3871],[1485,3861],[1486,3862],[1487,3862],[1488,3862],[1489,3862],[1490,3869],[1491,3821],[1492,3821],[1493,3872],[1494,3821],[1495,3821],[1496,3873],[1497,3857],[1498,3860],[1499,3860],[1500,3859],[1501,3874],[1502,3874],[1505,3875],[1506,3863],[1507,3863],[1513,3865],[1514,3858],[1515,3870],[1516,3870],[1517,3870],[1518,3870],[1519,3871],[1520,3871],[1521,3861],[1522,3862],[1523,3862],[1524,3862],[1525,3862],[1526,3869],[1527,3821],[1528,3821],[1529,3872],[1530,3821],[1531,3821],[1532,3873],[1533,3857],[1534,3860],[1535,3860],[1536,3859],[1537,3874],[1538,3874],[1541,3875],[1542,3863],[1543,3863],[1549,3858],[1550,3870],[1551,3870],[1552,3870],[1553,3870],[1554,3871],[1555,3871],[1556,3861],[1557,3862],[1558,3862],[1559,3862],[1560,3862],[1561,3869],[1562,3821],[1563,3821],[1564,3872],[1565,3821],[1566,3821],[1567,3873],[1568,3857],[1569,3860],[1570,3860],[1571,3859],[1572,3874],[1573,3874],[1576,3875],[1577,3863],[1578,3863],[1588,3861],[1589,3875],[1590,3863],[1591,3863],[1593,3861],[1594,3875],[1595,3863],[1596,3863],[1597,3858],[1598,3858],[1599,3858],[1600,3858],[1601,3858],[1602,3858],[1603,3858],[1604,3880],[1605,3870],[1606,3870],[1607,3870],[1608,3870],[1609,3870],[1610,3871],[1611,3871],[1612,3871],[1613,3860],[1614,3861],[1615,3867],[1616,3862],[1617,3862],[1618,3862],[1619,3862],[1620,3869],[1621,3821],[1622,3821],[1623,3872],[1624,3821],[1625,3821],[1626,3873],[1627,3857],[1628,3860],[1629,3860],[1630,3859],[1631,3864],[1632,3864],[1633,3864],[1634,3874],[1635,3874],[1636,3863],[1639,3875],[1640,3863],[1641,3863],[1659,3858],[1660,3858],[1661,3858],[1662,3858],[1663,3858],[1664,3858],[1665,3858],[1666,3880],[1667,3870],[1668,3870],[1669,3870],[1670,3870],[1671,3870],[1672,3871],[1673,3871],[1674,3871],[1675,3860],[1676,3861],[1677,3867],[1678,3862],[1679,3862],[1680,3862],[1681,3862],[1682,3869],[1683,3821],[1684,3821],[1685,3872],[1686,3821],[1687,3821],[1688,3873],[1689,3857],[1690,3860],[1691,3860],[1692,3859],[1693,3864],[1694,3864],[1695,3864],[1696,3874],[1697,3874],[1698,3863],[1701,3875],[1702,3863],[1703,3863],[1721,3858],[1722,3858],[1723,3858],[1724,3858],[1725,3858],[1726,3858],[1727,3858],[1728,3880],[1729,3870],[1730,3870],[1731,3870],[1732,3870],[1733,3870],[1734,3871],[1735,3871],[1736,3871],[1737,3860],[1738,3861],[1739,3867],[1740,3862],[1741,3862],[1742,3862],[1743,3862],[1744,3869],[1745,3821],[1746,3821],[1747,3872],[1748,3821],[1749,3821],[1750,3873],[1751,3857],[1752,3860],[1753,3860],[1754,3859],[1755,3864],[1756,3864],[1757,3864],[1758,3874],[1759,3874],[1760,3863],[1763,3875],[1764,3863],[1765,3863],[1783,3860],[1784,3862],[1787,3821],[1790,3862],[1792,3862],[1793,3859],[1794,3860],[1795,3862],[1796,3862],[1797,3862],[1798,3862],[1799,3860],[1800,3860],[1802,3862],[1803,3861],[1805,3875],[1806,3860],[1807,3861],[1808,3862],[1809,3862],[1810,3862],[1811,3862],[1812,3869],[1813,3872],[1814,3821],[1815,3860],[1816,3860],[1821,3858],[1822,3858],[1823,3858],[1824,3858],[1825,3858],[1826,3858],[1827,3858],[1828,3880],[1829,3870],[1830,3870],[1831,3870],[1832,3870],[1833,3870],[1834,3871],[1835,3871],[1836,3871],[1837,3860],[1838,3861],[1839,3867],[1840,3862],[1841,3862],[1842,3862],[1843,3862],[1844,3869],[1845,3821],[1846,3821],[1847,3872],[1848,3821],[1849,3821],[1850,3873],[1851,3857],[1852,3860],[1853,3860],[1854,3859],[1855,3864],[1856,3864],[1857,3864],[1858,3874],[1859,3874],[1860,3863],[1863,3875],[1864,3863],[1865,3863],[1883,3858],[1884,3858],[1885,3858],[1886,3858],[1887,3858],[1888,3858],[1889,3858],[1890,3880],[1891,3870],[1892,3870],[1893,3870],[1894,3870],[1895,3870],[1896,3871],[1897,3871],[1898,3871],[1899,3860],[1900,3861],[1901,3867],[1902,3862],[1903,3862],[1904,3862],[1905,3862],[1906,3869],[1907,3821],[1908,3821],[1909,3872],[1910,3821],[1911,3821],[1912,3873],[1913,3857],[1914,3860],[1915,3860],[1916,3859],[1917,3864],[1918,3864],[1919,3864],[1920,3874],[1921,3874],[1922,3863],[1925,3875],[1926,3863],[1927,3863],[1945,3863],[1952,3821],[1953,3821],[1954,3821],[1955,3821],[1956,3873],[1957,3875],[1967,3858],[1968,3858],[1969,3858],[1970,3858],[1971,3858],[1972,3858],[1973,3858],[1974,3880],[1975,3870],[1976,3870],[1977,3870],[1978,3870],[1979,3870],[1980,3870],[1981,3871],[1982,3871],[1983,3871],[1984,3871],[1985,3860],[1986,3861],[1987,3867],[1988,3862],[1989,3862],[1990,3862],[1991,3862],[1992,3869],[1993,3821],[1994,3821],[1995,3872],[1996,3821],[1997,3821],[1998,3873],[1999,3857],[2000,3860],[2001,3860],[2002,3859],[2003,3864],[2004,3864],[2005,3864],[2006,3874],[2007,3874],[2008,3863],[2011,3875],[2012,3863],[2013,3863],[2031,3860],[2032,3861],[2034,3875],[2035,3858],[2036,3870],[2037,3870],[2038,3870],[2039,3870],[2040,3871],[2041,3871],[2042,3861],[2043,3867],[2044,3869],[2045,3821],[2046,3821],[2047,3872],[2048,3821],[2049,3821],[2050,3873],[2051,3857],[2052,3864],[2053,3874],[2054,3874],[2057,3875],[2058,3863],[2059,3863],[2062,3858],[2063,3858],[2064,3858],[2065,3870],[2066,3870],[2067,3870],[2068,3870],[2069,3870],[2070,3870],[2071,3870],[2072,3870],[2073,3870],[2074,3870],[2075,3870],[2076,3870],[2077,3871],[2078,3871],[2079,3871],[2080,3871],[2081,3871],[2082,3871],[2083,3861],[2084,3861],[2085,3861],[2086,3867],[2087,3867],[2088,3867],[2089,3869],[2090,3869],[2091,3869],[2092,3821],[2093,3821],[2094,3821],[2095,3821],[2096,3821],[2097,3821],[2098,3872],[2099,3872],[2100,3872],[2101,3821],[2102,3821],[2103,3821],[2104,3821],[2105,3821],[2106,3821],[2107,3873],[2108,3873],[2109,3873],[2110,3857],[2111,3857],[2112,3857],[2113,3864],[2114,3864],[2115,3864],[2116,3874],[2117,3874],[2118,3874],[2119,3874],[2120,3874],[2121,3874],[2128,3875],[2129,3875],[2130,3875],[2131,3863],[2132,3863],[2133,3863],[2134,3863],[2135,3863],[2136,3863],[2143,3874],[2144,3874],[2146,3871],[2147,3858],[2148,3858],[2149,3858],[2150,3880],[2151,3880],[2152,3870],[2153,3870],[2154,3870],[2155,3870],[2156,3870],[2157,3870],[2158,3870],[2159,3870],[2160,3870],[2161,3871],[2162,3871],[2163,3871],[2164,3871],[2165,3871],[2166,3860],[2167,3861],[2168,3861],[2169,3867],[2170,3862],[2171,3862],[2172,3862],[2173,3862],[2174,3869],[2175,3821],[2176,3821],[2177,3821],[2178,3872],[2179,3872],[2180,3821],[2181,3821],[2182,3821],[2183,3873],[2184,3873],[2185,3857],[2186,3857],[2187,3860],[2188,3860],[2189,3859],[2190,3864],[2191,3864],[2192,3864],[2193,3874],[2194,3874],[2195,3874],[2196,3874],[2197,3863],[2198,3863],[2203,3875],[2204,3875],[2205,3863],[2206,3863],[2207,3863],[2233,3862],[2234,3862],[2235,3874],[2236,3858],[2237,3858],[2238,3858],[2239,3858],[2240,3858],[2241,3858],[2242,3858],[2243,3858],[2244,3880],[2245,3870],[2246,3870],[2247,3870],[2248,3870],[2249,3870],[2250,3870],[2251,3870],[2252,3870],[2253,3870],[2254,3870],[2255,3870],[2256,3871],[2257,3871],[2258,3871],[2259,3871],[2260,3871],[2261,3871],[2262,3871],[2263,3860],[2264,3861],[2265,3861],[2266,3861],[2267,3861],[2268,3861],[2269,3861],[2270,3867],[2271,3862],[2272,3862],[2273,3862],[2274,3862],[2275,3869],[2276,3821],[2277,3821],[2278,3872],[2279,3821],[2280,3821],[2281,3873],[2282,3857],[2283,3857],[2284,3857],[2285,3860],[2286,3860],[2287,3859],[2288,3864],[2289,3864],[2290,3864],[2291,3864],[2292,3874],[2293,3874],[2294,3874],[2295,3863],[2301,3875],[2302,3875],[2303,3863],[2304,3863],[2327,3858],[2328,3870],[2329,3870],[2330,3870],[2331,3870],[2332,3871],[2333,3871],[2334,3861],[2335,3862],[2336,3862],[2337,3862],[2338,3862],[2339,3869],[2340,3821],[2341,3821],[2342,3872],[2343,3821],[2344,3821],[2345,3873],[2346,3857],[2347,3860],[2348,3860],[2349,3859],[2350,3874],[2351,3874],[2354,3875],[2355,3863],[2356,3863],[2362,3861],[2363,3861],[2364,3861],[2367,3862],[2368,3821],[2369,3861],[2370,3873],[2371,3875],[2372,3863],[2373,3863],[2375,3870],[2376,3871],[2378,3862],[2379,3858],[2380,3880],[2381,3870],[2382,3870],[2383,3870],[2384,3870],[2385,3871],[2386,3871],[2387,3872],[2388,3857],[2389,3863],[2397,3859],[2398,3859],[2399,3875],[2400,3858],[2401,3858],[2402,3858],[2403,3858],[2404,3858],[2405,3858],[2406,3858],[2407,3880],[2408,3870],[2409,3870],[2410,3870],[2411,3870],[2412,3870],[2413,3871],[2414,3871],[2415,3871],[2416,3860],[2417,3861],[2418,3867],[2419,3862],[2420,3862],[2421,3862],[2422,3862],[2423,3869],[2424,3821],[2425,3821],[2426,3872],[2427,3821],[2428,3821],[2429,3873],[2430,3857],[2431,3860],[2432,3860],[2433,3859],[2434,3864],[2435,3864],[2436,3864],[2437,3874],[2438,3874],[2439,3863],[2442,3875],[2443,3863],[2444,3863],[2463,3860],[2464,3860],[2465,3865],[2466,3875],[2468,3860],[2469,3858],[2470,3858],[2471,3858],[2472,3858],[2473,3858],[2474,3858],[2475,3858],[2476,3880],[2477,3870],[2478,3870],[2479,3870],[2480,3870],[2481,3870],[2482,3871],[2483,3871],[2484,3871],[2485,3860],[2486,3861],[2487,3867],[2488,3862],[2489,3862],[2490,3862],[2491,3862],[2492,3869],[2493,3821],[2494,3821],[2495,3872],[2496,3821],[2497,3821],[2498,3873],[2499,3857],[2500,3860],[2501,3860],[2502,3859],[2503,3864],[2504,3864],[2505,3864],[2506,3874],[2507,3874],[2508,3863],[2511,3875],[2512,3863],[2513,3863],[2532,3865],[2533,3858],[2534,3858],[2535,3858],[2536,3858],[2537,3858],[2543,3880],[2544,3861],[2545,3862],[2546,3870],[2547,3858],[2549,3860],[2552,3821],[2553,3821],[2554,3821],[2555,3821],[2556,3821],[2557,3821],[2558,3821],[2560,3862],[2561,3862],[2562,3862],[2563,3860],[2564,3860],[2565,3860],[2566,3862],[2568,3860],[2569,3859],[2570,3862],[2571,3862],[2572,3862],[2574,3859],[2575,3860],[2576,3860],[2577,3860],[2579,3858],[2580,3859],[2581,3875],[2583,3862],[2584,3862],[2587,3821],[2588,3862],[2589,3867],[2590,3865],[2591,3865],[2592,3865],[2593,3865],[2594,3865],[2595,3864],[2598,3860],[2599,3861],[2600,3875],[2601,3863],[2602,3863],[2603,3862],[2604,3862],[2605,3862],[2608,3860],[2609,3862],[2610,3858],[2611,3858],[2612,3858],[2613,3858],[2614,3858],[2619,3871],[2620,3870],[2621,3870],[2622,3871],[2623,3871],[2624,3871],[2625,3859],[2626,3859],[2627,3871],[2630,3870],[2631,3870],[2632,3870],[2634,3870],[2635,3870],[2636,3874],[2637,3874],[2639,3860],[2640,3860],[2641,3870],[2645,3821],[2651,3860],[2652,3871],[2653,3862],[2654,3862],[2657,3859],[2659,3862],[2660,3861],[2661,3864],[2665,3860],[2666,3860],[2667,3860],[2668,3862],[2669,3862],[2670,3821],[2671,3821],[2672,3821],[2673,3821],[2674,3873],[2678,3871],[2681,3858],[2682,3870],[2683,3870],[2684,3870],[2685,3870],[2686,3871],[2687,3871],[2688,3857],[2689,3863],[2696,3821],[2697,3821],[2701,3870],[2702,3862],[2703,3871],[2704,3862],[2705,3862],[2706,3860],[2707,3862],[2708,3862],[2709,3859],[2710,3860],[2711,3858],[2712,3870],[2713,3870],[2714,3870],[2715,3870],[2716,3871],[2717,3871],[2718,3861],[2719,3862],[2720,3862],[2721,3862],[2722,3862],[2723,3869],[2724,3821],[2725,3821],[2726,3872],[2727,3821],[2728,3821],[2729,3873],[2730,3857],[2731,3860],[2732,3860],[2733,3859],[2734,3874],[2735,3874],[2738,3875],[2739,3863],[2740,3863],[2746,3858],[2747,3880],[2748,3870],[2749,3870],[2750,3870],[2751,3870],[2752,3871],[2753,3871],[2754,3861],[2755,3821],[2756,3872],[2757,3821],[2758,3873],[2759,3857],[2760,3874],[2761,3874],[2762,3863],[2765,3875],[2766,3863],[2773,3859],[2774,3859],[2775,3859],[2777,3858],[2778,3858],[2779,3858],[2780,3858],[2781,3858],[2782,3858],[2783,3858],[2784,3880],[2785,3870],[2786,3870],[2787,3870],[2788,3870],[2789,3870],[2790,3871],[2791,3871],[2792,3871],[2793,3860],[2794,3861],[2795,3861],[2796,3861],[2797,3861],[2798,3867],[2799,3862],[2800,3862],[2801,3862],[2802,3862],[2803,3869],[2804,3821],[2805,3821],[2806,3872],[2807,3821],[2808,3821],[2809,3873],[2810,3857],[2811,3860],[2812,3860],[2813,3859],[2814,3864],[2815,3864],[2816,3864],[2817,3874],[2818,3874],[2819,3863],[2822,3875],[2823,3863],[2824,3863],[2842,3858],[2843,3858],[2844,3858],[2845,3858],[2846,3858],[2847,3858],[2848,3858],[2849,3880],[2850,3870],[2851,3870],[2852,3870],[2853,3870],[2854,3870],[2855,3871],[2856,3871],[2857,3871],[2858,3860],[2859,3861],[2860,3867],[2861,3862],[2862,3862],[2863,3862],[2864,3862],[2865,3869],[2866,3821],[2867,3821],[2868,3872],[2869,3821],[2870,3821],[2871,3873],[2872,3857],[2873,3860],[2874,3860],[2875,3859],[2876,3864],[2877,3864],[2878,3864],[2879,3874],[2880,3874],[2881,3863],[2884,3875],[2885,3863],[2886,3863],[2904,3858],[2905,3858],[2906,3858],[2907,3858],[2908,3858],[2911,3863],[2912,3858],[2913,3858],[2914,3858],[2915,3858],[2916,3858],[2917,3858],[2918,3858],[2919,3880],[2920,3870],[2921,3870],[2922,3870],[2923,3870],[2924,3870],[2925,3871],[2926,3871],[2927,3871],[2928,3860],[2929,3861],[2930,3867],[2931,3862],[2932,3862],[2933,3862],[2934,3862],[2935,3869],[2936,3821],[2937,3821],[2938,3872],[2939,3821],[2940,3821],[2941,3873],[2942,3857],[2943,3860],[2944,3860],[2945,3859],[2946,3864],[2947,3864],[2948,3864],[2949,3874],[2950,3874],[2951,3863],[2954,3875],[2955,3863],[2956,3863],[2974,3862],[2975,3862],[2976,3860],[2978,3859],[2979,3859],[2980,3858],[2981,3858],[2982,3858],[2983,3858],[2984,3858],[2985,3858],[2986,3858],[2987,3880],[2988,3870],[2989,3870],[2990,3870],[2991,3870],[2992,3870],[2993,3871],[2994,3871],[2995,3871],[2996,3860],[2997,3861],[2998,3867],[2999,3862],[3000,3862],[3001,3862],[3002,3862],[3003,3869],[3004,3821],[3005,3821],[3006,3872],[3007,3821],[3008,3821],[3009,3873],[3010,3857],[3011,3860],[3012,3860],[3013,3859],[3014,3864],[3015,3864],[3016,3864],[3017,3874],[3018,3874],[3019,3863],[3022,3875],[3023,3863],[3024,3863],[3042,3865],[3044,3859],[3045,3859],[3047,3871],[3048,3871],[3049,3871],[3050,3871],[3051,3871],[3275,3897],[3276,3901],[3277,3896],[3278,3897],[3279,3897],[3280,3897],[3281,3899],[3282,3898],[3283,3898],[3284,3897],[3285,3898],[3286,3898],[3287,3899],[3288,3896],[3289,3901],[3290,3896],[3291,3901],[3292,3897],[3293,3898],[3294,3898],[3295,3899],[3296,3896],[3297,3901],[3298,3897],[3299,3898],[3300,3898],[3301,3899],[3302,3896],[3303,3898],[3304,3899],[3305,3897],[3306,3898],[3307,3898],[3308,3899],[3309,3896],[3310,3897],[3311,3898],[3312,3898],[3313,3899],[3314,3896],[3315,3897],[3316,3898],[3317,3898],[3318,3899],[3319,3896],[3320,3897],[3321,3897],[3322,3901],[3323,3897],[3324,3898],[3325,3898],[3326,3899],[3327,3896],[3328,3901],[3329,3897],[3330,3898],[3331,3898],[3332,3899],[3333,3896],[3334,3901],[3335,3897],[3336,3898],[3337,3898],[3338,3899],[3339,3896],[3340,3901],[3341,3898],[3342,3898],[3343,3896],[3344,3901],[3345,3897],[3346,3898],[3347,3898],[3348,3899],[3349,3896],[3350,3901],[3351,3897],[3352,3898],[3353,3898],[3354,3899],[3355,3896],[3356,3901],[3357,3896],[3358,3901],[3359,3897],[3360,3898],[3361,3898],[3362,3899],[3363,3896],[3364,3899],[3365,3897],[3366,3898],[3367,3898],[3368,3897],[3369,3897],[3370,3897],[3371,3898],[3372,3898],[3373,3898],[3374,3898],[3375,3898],[3376,3898],[3377,3901],[3378,3901],[3379,3901],[3380,3897],[3381,3897],[3382,3898],[3383,3898],[3384,3898],[3385,3899],[3386,3896],[3387,3901],[3388,3897],[3389,3898],[3390,3898],[3391,3899],[3392,3896],[3393,3897],[3394,3898],[3395,3898],[3396,3899],[3397,3896],[3398,3898],[3399,3898],[3400,3898],[3401,3896],[3402,3901],[3403,3897],[3404,3898],[3405,3898],[3406,3899],[3407,3896],[3408,3896],[3409,3901],[3410,3897],[3411,3898],[3412,3898],[3413,3899],[3414,3896],[3415,3899],[3416,3899],[3417,3898],[3418,3898],[3419,3898],[3420,3898],[3421,3901],[3422,3897],[3423,3898],[3424,3896],[3425,3898],[3426,3901],[3427,3901],[3428,3901],[3429,3897],[3430,3898],[3431,3898],[3432,3899],[3433,3896],[3434,3897],[3435,3898],[3436,3901],[3437,3897],[3438,3898],[3439,3898],[3440,3899],[3441,3896],[3442,3901],[3443,3897],[3444,3898],[3445,3898],[3446,3899],[3447,3896],[3448,3901],[3449,3897],[3450,3898],[3451,3898],[3452,3899],[3453,3896],[3454,3898],[3455,3898],[3456,3901],[3457,3897],[3458,3898],[3459,3898],[3460,3899],[3461,3896],[3462,3820],[3463,3820],[3464,3820],[3465,3820],[3466,3820],[3467,3820],[3468,3820],[3469,3820],[3470,3820],[3471,3820],[3472,3820],[3473,3820],[3474,3820],[3475,3820],[3476,3820],[3477,3820],[3478,3820],[3479,3820],[3480,3820],[3481,3820],[3482,3820],[3483,3820],[3484,3820],[3485,3820],[3486,3820],[3487,3820],[3488,3820],[3489,3820],[3490,3820],[3491,3820],[3492,3820],[3493,3820],[3494,3820],[3495,3820],[3496,3820],[3497,3820],[3498,3820],[3499,3820],[3500,3820],[3501,3820],[3502,3820],[3503,3820],[3504,3820],[3505,3820],[3506,3820],[3507,3820],[3508,3820],[3509,3820],[3510,3820],[3511,3820],[3512,3820],[3513,3820],[3514,3820],[3515,3820],[3516,3820],[3517,3820],[3518,3820],[3519,3820],[3520,3820],[3521,3820],[3522,3820],[3523,3820],[3524,3820],[3525,3820],[3526,3820],[3527,3820],[3528,3820],[3529,3820],[3530,3820],[3531,3820],[3532,3820],[3533,3820],[3534,3820],[3535,3820],[3536,3820],[3537,3820],[3538,3820],[3539,3820],[3540,3820],[3541,3820],[3542,3820],[3543,3820],[3544,3820],[3545,3820],[3546,3820],[3547,3820],[3548,3820],[3549,3820],[3550,3820],[3551,3820],[3552,3820],[3553,3820],[3554,3820],[3555,3820],[3556,3820],[3557,3820],[3558,3820],[3559,3820],[3560,3820],[3561,3820],[3562,3820],[3563,3820],[3564,3820],[3565,3820],[3566,3820],[3567,3820],[3568,3820],[3569,3820],[3570,3820],[3571,3820],[3572,3820],[3573,3820],[3574,3820],[3575,3820],[3576,3820],[3577,3820],[3578,3820],[3579,3820],[3580,3820],[3581,3820],[3582,3820],[3583,3820],[3584,3820],[3585,3820],[3586,3820],[3756,3907],[3758,3907],[3760,3907],[3762,3907],[3764,3907],[3766,3907],[3768,3907],[3770,3907],[3771,3907],[3772,3907],[3774,3907],[3776,3907],[3778,3907],[3780,3907],[3782,3907],[3783,3907],[3784,3907],[3785,3907],[3786,3907],[3787,3907],[3790,3907],[3792,3907],[3794,3907],[3796,3907],[3798,3907]],"b":[[158,"impl-Debug-for-PublicKey"],[159,"impl-Display-for-PublicKey"],[160,"impl-Display-for-KeyParsingError"],[161,"impl-Debug-for-KeyParsingError"],[164,"impl-Display-for-RelayUrl"],[165,"impl-Debug-for-RelayUrl"],[166,"impl-Display-for-RelayUrlParseError"],[167,"impl-Debug-for-RelayUrlParseError"],[168,"impl-Debug-for-RelayMap"],[169,"impl-Display-for-RelayMap"],[170,"impl-Display-for-RelayNode"],[171,"impl-Debug-for-RelayNode"],[175,"impl-From%3CDecodeError%3E-for-KeyParsingError"],[176,"impl-From%3CError%3E-for-KeyParsingError"],[179,"impl-From%3CSigningKey%3E-for-SecretKey"],[180,"impl-From%3C%5Bu8;+32%5D%3E-for-SecretKey"],[181,"impl-From%3C(PublicKey,+Option%3CRelayUrl%3E,+%26%5BSocketAddr%5D)%3E-for-NodeAddr"],[182,"impl-From%3CPublicKey%3E-for-NodeAddr"],[184,"impl-From%3CNodeInfo%3E-for-NodeAddr"],[185,"impl-From%3CRemoteInfo%3E-for-NodeAddr"],[186,"impl-From%3CNodeTicket%3E-for-NodeAddr"],[191,"impl-From%3CRelayNode%3E-for-RelayMap"],[192,"impl-From%3CRelayUrl%3E-for-RelayMap"],[197,"impl-FromIterator%3CRelayNode%3E-for-RelayMap"],[198,"impl-FromIterator%3CRelayUrl%3E-for-RelayMap"],[283,"impl-TryFrom%3C%26%5Bu8;+32%5D%3E-for-PublicKey"],[284,"impl-TryFrom%3C%26%5Bu8%5D%3E-for-PublicKey"],[513,"impl-Display-for-UserData"],[514,"impl-Debug-for-UserData"],[516,"impl-Debug-for-ParseError"],[517,"impl-Display-for-ParseError"],[519,"impl-Debug-for-IntoDiscoveryError"],[520,"impl-Display-for-IntoDiscoveryError"],[521,"impl-Display-for-DiscoveryError"],[522,"impl-Debug-for-DiscoveryError"],[525,"impl-Display-for-Lagged"],[526,"impl-Debug-for-Lagged"],[531,"impl-From%3CNodeAddr%3E-for-NodeInfo"],[532,"impl-From%3CDiscoveryItem%3E-for-NodeInfo"],[533,"impl-From%3CTxtAttrs%3CIrohAttr%3E%3E-for-NodeInfo"],[534,"impl-From%3C%26TxtAttrs%3CIrohAttr%3E%3E-for-NodeInfo"],[881,"impl-Display-for-PkarrError"],[882,"impl-Debug-for-PkarrError"],[2148,"impl-Display-for-SendDatagramError"],[2149,"impl-Debug-for-SendDatagramError"],[2150,"impl-Display-for-RetryError"],[2151,"impl-Debug-for-RetryError"],[2153,"impl-Debug-for-ReadToEndError"],[2154,"impl-Display-for-ReadToEndError"],[2155,"impl-Debug-for-ReadError"],[2156,"impl-Display-for-ReadError"],[2157,"impl-Debug-for-ResetError"],[2158,"impl-Display-for-ResetError"],[2159,"impl-Debug-for-ReadExactError"],[2160,"impl-Display-for-ReadExactError"],[2162,"impl-Display-for-WriteError"],[2163,"impl-Debug-for-WriteError"],[2164,"impl-Debug-for-StoppedError"],[2165,"impl-Display-for-StoppedError"],[2167,"impl-Debug-for-VarInt"],[2168,"impl-Display-for-VarInt"],[2175,"impl-Debug-for-ControlMsg"],[2176,"impl-Display-for-ControlMsg"],[2178,"impl-Debug-for-ClosedStream"],[2179,"impl-Display-for-ClosedStream"],[2181,"impl-Display-for-ConnectionType"],[2182,"impl-Debug-for-ConnectionType"],[2183,"impl-Display-for-Source"],[2184,"impl-Debug-for-Source"],[2185,"impl-Display-for-ConnectionError"],[2186,"impl-Debug-for-ConnectionError"],[2193,"impl-Debug-for-ConnectionClose"],[2194,"impl-Display-for-ConnectionClose"],[2195,"impl-Debug-for-ApplicationClose"],[2196,"impl-Display-for-ApplicationClose"],[2197,"impl-Display-for-AddNodeAddrError"],[2198,"impl-Debug-for-AddNodeAddrError"],[2199,"impl-Display-for-TransportError"],[2200,"impl-Debug-for-TransportError"],[2201,"impl-Debug-for-TransportErrorCode"],[2202,"impl-Display-for-TransportErrorCode"],[2203,"impl-Debug-for-StreamId"],[2204,"impl-Display-for-StreamId"],[2206,"impl-Debug-for-DirectAddrType"],[2207,"impl-Display-for-DirectAddrType"],[2211,"impl-Display-for-ConnectWithOptsError"],[2212,"impl-Debug-for-ConnectWithOptsError"],[2213,"impl-Display-for-ConnectError"],[2214,"impl-Debug-for-ConnectError"],[2215,"impl-Display-for-BindError"],[2216,"impl-Debug-for-BindError"],[2217,"impl-Display-for-GetMappingAddressError"],[2218,"impl-Debug-for-GetMappingAddressError"],[2224,"impl-Debug-for-AlpnError"],[2225,"impl-Display-for-AlpnError"],[2228,"impl-Display-for-RemoteNodeIdError"],[2229,"impl-Debug-for-RemoteNodeIdError"],[2249,"impl-From%3CResetError%3E-for-ReadError"],[2250,"impl-From%3CReadableError%3E-for-ReadError"],[2251,"impl-From%3CConnectionError%3E-for-ReadError"],[2257,"impl-From%3CStoppedError%3E-for-WriteError"],[2258,"impl-From%3CClosedStream%3E-for-WriteError"],[2260,"impl-From%3CConnectionError%3E-for-WriteError"],[2264,"impl-From%3Cu16%3E-for-VarInt"],[2265,"impl-From%3CStreamId%3E-for-VarInt"],[2266,"impl-From%3CFrameType%3E-for-VarInt"],[2268,"impl-From%3Cu32%3E-for-VarInt"],[2269,"impl-From%3Cu8%3E-for-VarInt"],[2282,"impl-From%3CTransportError%3E-for-ConnectionError"],[2283,"impl-From%3CClose%3E-for-ConnectionError"],[2296,"impl-From%3CTransportErrorCode%3E-for-TransportError"],[2297,"impl-From%3CError%3E-for-TransportError"],[2298,"impl-From%3CInvalidFrame%3E-for-TransportError"],[2310,"impl-From%3CConnectionError%3E-for-ConnectError"],[2311,"impl-From%3CConnectWithOptsError%3E-for-ConnectError"],[2620,"impl-RecvStream"],[2621,"impl-AsyncRead-for-RecvStream"],[2623,"impl-SendStream"],[2624,"impl-AsyncWrite-for-SendStream"],[2794,"impl-TryFrom%3Cusize%3E-for-VarInt"],[2795,"impl-TryFrom%3Cu128%3E-for-VarInt"],[2796,"impl-TryFrom%3Cu64%3E-for-VarInt"],[3380,"impl-Debug-for-Probe"],[3381,"impl-Display-for-Probe"],[3382,"impl-Debug-for-Report"],[3383,"impl-Display-for-Report"],[3535,"impl-Display-for-EncodingError"],[3536,"impl-Debug-for-EncodingError"],[3537,"impl-Display-for-DecodingError"],[3538,"impl-Debug-for-DecodingError"],[3539,"impl-Display-for-MaxLengthExceededError"],[3540,"impl-Debug-for-MaxLengthExceededError"],[3541,"impl-Debug-for-LookupError"],[3542,"impl-Display-for-LookupError"],[3693,"impl-Display-for-AcceptError"],[3694,"impl-Debug-for-AcceptError"],[3698,"impl-From%3CConnectionError%3E-for-AcceptError"],[3699,"impl-From%3CRemoteNodeIdError%3E-for-AcceptError"],[3700,"impl-From%3CBox%3Cdyn+Error+%2B+Send+%2B+Sync%3E%3E-for-AcceptError"],[3701,"impl-From%3CError%3E-for-AcceptError"],[3702,"impl-From%3CClosedStream%3E-for-AcceptError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAACYL5AADAAAACwAAABIABQAZAEkAZQAXAIEABwCLACEArgAAALAAAQC0AAMAuQABALwAAADAAAAAwgAAAMYAAADJAAkA1gALAPYAAwACAQQACAEBAA4BJwA6AQcARAEHAF4BAABgAQAAaQEBAG0BBQB0AQQAewEgAJ0BKwDKARwA6gEJAPUBGwAUAgMAGQIAABwCAAAfAgAAKAIDAC0CAAAvAg4ASQIAAFUCAABZAgAAXAIAAGACAwBmAgAAaQIDAG4CBAB0Ah4AlgIJAKYCHgDJAgMAzwIJANoCAwDgAgEA5AIBAOcCCADzAgMA+AINAAgDAQAMAwEADwMKABwDBAAjAwAAKQMSAEADKABsAwwAfwMJAI8DAwCWAwAAmQMAAJsDEACtAwUAtAMFALsDBgDEAwQAzAMOANwDAwDiAwAA5AMBAOkDAQDuAwAA8AMAAPIDBAD4AwMA/gMAAAAEDAAPBAAAEQQAABMEAAAVBAAAFwQAABkEBAAhBAIAJQQLADIEAQBCBAAARAQEAFAEAQBUBAAAWAQAAGMEAQBmBAAAaQQAAG0EAACCBAAAhAQBAIcEAQCQBAAAnAQAAKIEAQCnBAAAsAQAAL0EAADFBAAA2AQAANoEAADnBCIAEAUAABIFAAAeBRgAPAV7AL4FBgDHBSIA6wVFADUGAwA6Br0A/wYAAAEHAAAGBwEADAcQAB4HhwCwBz8A8QduAGQIUwDECAAAxwgAAMoIAgDOCAAA0AgAANIIAQDVCAEA2QgCAN0IAQDrCAEA8wgAAPUIAAD5CAIA/ggAAAYJAgAKCQAAEwkAABgJIgBACQAAQgkEAEsJEgBhCT0A5gkJAAcKAAALCgIAGAoBAB0KAAAoCgMALQoBADIKCgA+CgEAQQoAAF4KAQBvCgQAegoOAI8KAACRCgEAlAoBAJgKPQDaChAA7gpxAGELPQClCz0A7QssAB4MAAAhDAAAIwwRADgMDgBKDA4AXQwDAGIMCQBwDAAAcgwFAIAMAwCSDAIAlgwHAJ8MBgCpDAYAsQwPAMMMAADIDAMA1QwFANwMCwDqDDMAHw0FACYNFQBCDQQASw0FAF4NAQBlDRkAgQ0KAI0NBgCYDQQAng0gAMANGADeDQcA6w0HAPQNOgAwDgAAMg4BADcOAgA9DgsASg4fAGwOBABzDgQAew4GAIsOAQCQDgIAlA4XAK4ODQC+DgMAxA4BANAOBwA=","P":[[29,"T"],[30,""],[31,"T"],[46,""],[54,"T"],[60,""],[70,"K"],[74,"T"],[98,""],[100,"T"],[105,""],[106,"T"],[117,""],[119,"D"],[121,"__D"],[124,""],[143,"K"],[158,""],[174,"T"],[175,""],[177,"T"],[179,""],[183,"T"],[184,""],[188,"T"],[191,""],[194,"T"],[195,""],[197,"T"],[199,""],[200,"T"],[206,""],[210,"R"],[211,"Watcher::Value"],[212,""],[213,"H"],[214,"__H"],[215,""],[225,"Watcher::Value,T,W"],[226,"U"],[234,""],[237,"Watcher::Value,T,"],[240,""],[244,"Watcher::Value,W"],[245,""],[249,"Watcher::Value"],[251,""],[257,"S"],[259,"__S"],[262,""],[265,"Watcher::Value"],[268,""],[269,"T"],[275,""],[282,"U,T"],[283,""],[285,"U,T"],[286,""],[287,"U,T"],[293,"U"],[301,""],[309,"Watcher::Value"],[310,""],[313,"V"],[321,""],[322,""],[376,""],[378,""],[387,"T"],[407,""],[416,"T"],[420,""],[425,"K"],[426,"T"],[456,""],[459,"T"],[462,""],[463,"T"],[467,"Deref::Target"],[468,"T"],[474,""],[475,"T"],[482,""],[503,"K"],[512,""],[528,"T"],[531,""],[535,"T"],[536,""],[537,"T"],[539,""],[540,"T"],[547,""],[551,"T"],[555,""],[558,"__H"],[559,""],[573,"U"],[583,""],[616,"T"],[620,""],[627,"U,T"],[628,""],[629,"U,T"],[638,"U"],[648,""],[661,"V"],[671,""],[712,"T"],[716,""],[718,"T"],[728,""],[733,"T"],[735,""],[737,"U"],[739,""],[743,"U,T"],[745,"U"],[747,""],[749,"V"],[753,""],[754,"T"],[758,""],[759,"T"],[769,""],[773,"T"],[775,""],[777,"U"],[779,""],[785,"U,T"],[787,"U"],[789,""],[791,"V"],[793,""],[815,"T"],[827,""],[835,"T"],[838,""],[841,"T"],[871,""],[888,"T"],[897,""],[904,"U"],[910,""],[923,"T"],[926,""],[927,"U,T"],[933,"U"],[939,""],[947,"V"],[953,""],[964,"T"],[968,""],[972,"T"],[973,""],[974,"T"],[980,""],[982,"T"],[986,""],[991,"T"],[994,""],[998,"U"],[1000,""],[1009,"T"],[1010,"U,T"],[1012,"U"],[1014,""],[1017,"V"],[1021,""],[1022,""],[1023,"T"],[1025,""],[1026,"T"],[1027,""],[1028,"T"],[1031,""],[1032,"T"],[1034,""],[1036,"T"],[1037,","],[1038,"T"],[1039,""],[1041,"U"],[1042,""],[1047,""],[1048,"T"],[1049,"U,T"],[1050,"U"],[1051,""],[1052,"V"],[1054,""],[1057,"T"],[1059,""],[1061,"T"],[1062,""],[1063,"T"],[1066,""],[1067,"T"],[1069,""],[1072,"T"],[1074,""],[1075,"U"],[1076,""],[1082,""],[1086,""],[1087,""],[1091,"T"],[1092,"U,T"],[1093,"U"],[1094,""],[1095,"V"],[1096,""],[1298,""],[1299,""],[1339,"T"],[1463,""],[1514,"T"],[1549,""],[1593,"K"],[1597,"T"],[1783,""],[1788,""],[1790,""],[1803,"B"],[1806,""],[1821,"T"],[1945,""],[1952,"__D"],[1957,""],[1959,""],[1960,""],[2032,"B"],[2035,""],[2062,"K"],[2143,""],[2236,"T"],[2243,""],[2244,"T"],[2246,""],[2247,"T"],[2249,""],[2252,"T"],[2253,""],[2254,"T"],[2255,""],[2256,"T"],[2257,""],[2259,"T"],[2260,""],[2262,"T"],[2264,""],[2267,"T"],[2268,""],[2270,"T"],[2282,""],[2284,"T"],[2290,""],[2291,"T"],[2292,""],[2293,"T"],[2296,""],[2299,"T"],[2301,""],[2302,"T"],[2309,""],[2312,"T"],[2313,""],[2314,"T"],[2322,""],[2323,"T"],[2362,""],[2369,"__H"],[2374,""],[2469,"U"],[2531,""],[2539,"IntoFuture::IntoFuture"],[2540,""],[2615,"Future::Output"],[2619,""],[2660,""],[2661,""],[2670,"__S"],[2675,""],[2711,"T"],[2746,""],[2777,"U,T"],[2794,""],[2797,"U,T"],[2842,"U"],[2904,"F"],[2911,""],[2980,"V"],[3042,""],[3116,"T"],[3124,""],[3128,"T"],[3129,""],[3130,"T"],[3142,""],[3149,"T"],[3157,"__D"],[3160,""],[3179,"T"],[3184,""],[3191,"U"],[3195,""],[3248,"__S"],[3251,"T"],[3252,"U,T"],[3256,"U"],[3260,""],[3271,"V"],[3284,""],[3291,"T"],[3303,""],[3310,"T"],[3315,""],[3321,"K"],[3322,"T"],[3340,""],[3344,"T"],[3356,"__D"],[3357,""],[3368,"K"],[3377,""],[3387,"T"],[3398,""],[3409,"U"],[3415,""],[3428,"__S"],[3429,"T"],[3434,""],[3436,"U,T"],[3442,"U"],[3448,""],[3456,"V"],[3467,""],[3494,"T"],[3502,""],[3506,"T"],[3518,""],[3519,"T"],[3527,""],[3544,"T"],[3548,""],[3557,"U"],[3561,""],[3571,"U,T"],[3575,"U"],[3579,""],[3583,"V"],[3587,""],[3643,","],[3644,""],[3645,"P"],[3646,""],[3648,"T"],[3656,""],[3659,"P"],[3660,"T"],[3662,""],[3664,"T"],[3684,""],[3695,"P"],[3696,"T"],[3698,""],[3703,"T"],[3708,""],[3713,"U"],[3717,""],[3719,"P,F"],[3720,""],[3723,"P"],[3724,""],[3727,"P"],[3728,""],[3731,"T"],[3733,""],[3734,"U,T"],[3738,"U"],[3742,""],[3746,"V"],[3750,""],[3757,"T"],[3771,""],[3777,"T"],[3779,""],[3781,"U"],[3783,""],[3791,"U,T"],[3793,"U"],[3795,""],[3797,"V"]]}],["iroh_base",{"t":"TPPPGTFIFFFFFINNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNONNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOPTPFGPKPNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNMNNNNNNNNNNNNOOOOOOOOOOOO","n":["BYTE_SIZE","Decode","DecodeInvalidLength","Key","KeyParsingError","LENGTH","NodeAddr","NodeId","PublicKey","RelayUrl","RelayUrlParseError","SecretKey","Signature","SignatureError","as_bytes","as_error_source","","as_ref","backtrace","","borrow","","","","","","","","borrow_mut","","","","","","","cause","","clone","","","","","clone_into","","","","","clone_to_uninit","","","","","cmp","","","deref","description","","deserialize","","","","","direct_addresses","","eq","","","","fmt","","","","","","","","","","","","","","fmt_short","from","","","","","","","","","","","","","","","","","","","from_bytes","","","from_components","from_parts","from_slice","from_str","","","","generate","hash","","in_current_span","","into","","","","","","","is_empty","new","node_id","partial_cmp","","","public","","r_bytes","relay_url","","s_bytes","secret","serialize","","","","","sign","source","","ticket","to_bytes","","","to_owned","","","","","to_string","","","","","to_vec","try_from","","","","","","","","","","","try_into","","","","","","","type_id","","","","","","","verify","with_direct_addresses","with_relay_url","backtrace","","","source","","span_trace","","","Encoding","KIND","Kind","NodeTicket","ParseError","Postcard","Ticket","Verify","as_error_source","backtrace","borrow","","borrow_mut","","cause","clone","clone_into","clone_to_uninit","description","deserialize","","eq","fmt","","","","from","","","","","from_bytes","","from_str","in_current_span","into","","new","node_addr","serialize","","source","to_bytes","","to_owned","to_string","","try_from","","try_into","","type_id","","verification_failed","wrong_prefix","backtrace","","","","expected","message","source","","span_trace","","",""],"q":[[0,"iroh_base"],[189,"iroh_base::KeyParsingError"],[197,"iroh_base::ticket"],[252,"iroh_base::ticket::ParseError"],[264,"iroh_base::key"],[265,"core::error"],[266,"backtrace::capture"],[267,"core::option"],[268,"iroh_base::relay_url"],[269,"ed25519"],[270,"iroh_base::node_addr"],[271,"core::cmp"],[272,"core::result"],[273,"serde::de"],[274,"core::net::socket_addr"],[275,"core::iter::traits::iterator"],[276,"alloc::collections::btree::set"],[277,"core::fmt"],[278,"alloc::string"],[279,"ed25519_dalek::signature"],[280,"ed25519_dalek::verifying"],[281,"data_encoding"],[282,"ed25519_dalek::errors"],[283,"ed25519_dalek::signing"],[284,"iroh_base::ticket::node"],[285,"url"],[286,"core::iter::traits::collect"],[287,"signature::error"],[288,"rand_core"],[289,"core::hash"],[290,"serde::ser"],[291,"alloc::vec"],[292,"core::any"],[293,"n0_snafu::spantrace"],[294,"postcard::error"]],"i":"Ahn00`b````````01Ad1203112AjAlAn36452103536421064210642104100536421011641066664455210033466664455522211110036426166420240536452103111410426116264210253`662642106450366644452210364521036452103411ElEnF`21210FdFf1``1`111Dh20220002100002200222100202001021000202020222FjFlFnG`30213210","f":"``````````````{{{d{b}}}{{d{{h{f}}}}}}{d{{d{j}}}}0{{{d{b}}}{{d{{l{f}}}}}}{{{d{n}}}{{Ab{{d{A`}}}}}}{{{d{Ad}}}{{Ab{{d{A`}}}}}}{d{{d{c}}}{}}0500000{{{d{Af}}}{{d{Afc}}}{}}000000{{{d{n}}}{{Ab{{d{j}}}}}}{{{d{Ad}}}{{Ab{{d{j}}}}}}{{{d{Ah}}}Ah}{{{d{b}}}b}{{{d{Aj}}}Aj}{{{d{Al}}}Al}{{{d{An}}}An}{{d{d{Afc}}}B`{}}0000{{df}B`}0000{{{d{b}}{d{b}}}Bb}{{{d{Al}}{d{Al}}}Bb}{{{d{An}}{d{An}}}Bb}{{{d{An}}}{{d{c}}}{}}{{{d{n}}}{{d{Bd}}}}{{{d{Ad}}}{{d{Bd}}}}{c{{Bf{Ah}}}Bh}{c{{Bf{b}}}Bh}{c{{Bf{Aj}}}Bh}{c{{Bf{Al}}}Bh}{c{{Bf{An}}}Bh}{{{d{Al}}}{{`{{Bn{}{{Bj{{d{Bl}}}}}}}}}}{AlC`}{{{d{Ah}}{d{Ah}}}Cb}{{{d{b}}{d{b}}}Cb}{{{d{Al}}{d{Al}}}Cb}{{{d{An}}{d{An}}}Cb}{{{d{Ah}}{d{AfCd}}}{{Bf{B`Cf}}}}000{{{d{b}}{d{AfCd}}}Ch}0{{{d{n}}{d{AfCd}}}Ch}0{{{d{Aj}}{d{AfCd}}}Ch}{{{d{Al}}{d{AfCd}}}Ch}{{{d{An}}{d{AfCd}}}Ch}0{{{d{Ad}}{d{AfCd}}}Ch}0{{{d{b}}}Cj}{{{d{{h{f}}}}}Ah}{cc{}}{ClAh}{{{h{f}}}Ah}{Cnb}3{D`n}{Dbn}5{DdAj}6{{{h{f}}}Aj}7{{{Df{b{Ab{An}}{d{{l{Bl}}}}}}}Al}{DhAl}{DjAl}{DlAn};;<{{{d{{h{f}}}}}{{Bf{bDb}}}}{{{d{{h{f}}}}}Aj}{{{h{f}}{h{f}}}Ah}{{b{Ab{An}}c}Al{{Dn{}{{Bj{Bl}}}}}}{{{d{{l{f}}}}}{{Bf{AhE`}}}}{{{d{Bd}}}{{Bf{AhE`}}}}{{{d{Bd}}}{{Bf{bc}}}{}}{{{d{Bd}}}{{Bf{Ajc}}}{}}{{{d{Bd}}}{{Bf{Anc}}}{}}{cAjEb}{{{d{b}}{d{Afc}}}B`Ed}{{{d{An}}{d{Afc}}}B`Ed}{{}}0{{}c{}}000000{{{d{Al}}}Cb}{bAl}{AlDj}{{{d{b}}{d{b}}}{{Ab{Bb}}}}{{{d{Al}}{d{Al}}}{{Ab{Bb}}}}{{{d{An}}{d{An}}}{{Ab{Bb}}}}{{{d{b}}}Cn}{{{d{Aj}}}b}{{{d{Ah}}}{{d{{h{f}}}}}}{{{d{Al}}}{{Ab{{d{An}}}}}}{AlAb}2{{{d{Aj}}}{{d{Dd}}}}{{{d{Ah}}c}BfEf}{{{d{b}}c}BfEf}{{{d{Aj}}c}BfEf}{{{d{Al}}c}BfEf}{{{d{An}}c}BfEf}{{{d{Aj}}{d{{l{f}}}}}Ah}{{{d{n}}}{{Ab{{d{j}}}}}}{{{d{Ad}}}{{Ab{{d{j}}}}}}`{{{d{Ah}}}{{h{f}}}}0{{{d{Aj}}}{{h{f}}}}{dc{}}0000{dCj}0000{{{d{Ah}}}{{Eh{f}}}}{{{d{{l{f}}}}}{{Bf{AhE`}}}}{c{{Bf{e}}}{}{}}0{{{d{{h{f}}}}}{{Bf{bc}}}{}}{{{d{{l{f}}}}}{{Bf{bc}}}{}}2{{{d{{l{f}}}}}{{Bf{Ajc}}}{}}3333{{}{{Bf{c}}}{}}000000{dEj}000000{{{d{b}}{d{{l{f}}}}{d{Ah}}}{{Bf{B`Db}}}}{{Alc}Al{{Dn{}{{Bj{Bl}}}}}}{{AlAn}Al}{ElAb}{EnAb}{F`Ab}{ElD`}{EnDb}{ElFb}{EnFb}{F`Fb}````````{d{{d{j}}}}{{{d{Fd}}}{{Ab{{d{A`}}}}}}{d{{d{c}}}{}}0{{{d{Af}}}{{d{Afc}}}{}}0{{{d{Fd}}}{{Ab{{d{j}}}}}}{{{d{Dh}}}Dh}{{d{d{Afc}}}B`{}}{{df}B`}{{{d{Fd}}}{{d{Bd}}}}{{{d{Bd}}}{{Bf{FfFd}}}}{c{{Bf{Dh}}}Bh}{{{d{Dh}}{d{Dh}}}Cb}{{{d{Dh}}{d{AfCd}}}Ch}0{{{d{Fd}}{d{AfCd}}}Ch}0{cc{}}{AlDh}1{D`Fd}{FhFd}{{{d{{l{f}}}}}{{Bf{FfFd}}}}{{{d{{l{f}}}}}{{Bf{DhFd}}}}{{{d{Bd}}}{{Bf{Dhc}}}{}}{{}}{{}c{}}07{{{d{Dh}}}{{d{Al}}}}{{{d{Ff}}}Cj}{{{d{Dh}}c}BfEf}{{{d{Fd}}}{{Ab{{d{j}}}}}}{{{d{Ff}}}{{Eh{f}}}}{{{d{Dh}}}{{Eh{f}}}}{dc{}}{dCj}0{c{{Bf{e}}}{}{}}0{{}{{Bf{c}}}{}}0{dEj}0{{{d{Bd}}}Fd}0{FjAb}{FlAb}{FnAb}{G`Ab}{Fjd}{G`d}{FlFh}{FnD`}{FjFb}{FlFb}{FnFb}{G`Fb}","D":"Jb","p":[[5,"PublicKey",0,264],[1,"reference",null,null,1],[1,"u8"],[1,"array"],[10,"Error",265],[1,"slice"],[6,"KeyParsingError",0,264],[5,"Backtrace",266],[6,"Option",267,null,1],[5,"RelayUrlParseError",0,268],[0,"mut"],[5,"Signature",0,269],[5,"SecretKey",0,264],[5,"NodeAddr",0,270],[5,"RelayUrl",0,268],[1,"unit"],[6,"Ordering",271],[1,"str"],[6,"Result",272,null,1],[10,"Deserializer",273],[17,"Item"],[6,"SocketAddr",274],[10,"Iterator",275],[5,"BTreeSet",276],[1,"bool"],[5,"Formatter",277],[5,"Error",277],[8,"Result",277],[5,"String",278],[5,"InternalSignature",279],[5,"VerifyingKey",280],[5,"DecodeError",281],[8,"SignatureError",0,282],[5,"SigningKey",283],[1,"tuple",null,null,1],[5,"NodeTicket",197,284],[8,"NodeId",0,264],[5,"Url",285],[10,"IntoIterator",286],[5,"Error",287],[10,"CryptoRngCore",288],[10,"Hasher",289],[10,"Serializer",290],[5,"Vec",291],[5,"TypeId",292],[15,"Decode",189],[15,"Key",189],[15,"DecodeInvalidLength",189],[5,"SpanTrace",293],[6,"ParseError",197],[10,"Ticket",197],[6,"Error",294],[15,"Kind",252],[15,"Postcard",252],[15,"Encoding",252],[15,"Verify",252]],"r":[[0,269],[1,264],[2,264],[3,264],[4,264],[5,264],[6,270],[7,264],[8,264],[9,268],[10,268],[11,264],[12,269],[13,282],[14,264],[15,264],[16,268],[17,264],[18,264],[19,268],[20,269],[21,264],[22,264],[23,264],[24,264],[25,270],[26,268],[27,268],[28,269],[29,264],[30,264],[31,264],[32,270],[33,268],[34,268],[35,264],[36,268],[37,269],[38,264],[39,264],[40,270],[41,268],[42,269],[43,264],[44,264],[45,270],[46,268],[47,269],[48,264],[49,264],[50,270],[51,268],[52,264],[53,270],[54,268],[55,268],[56,264],[57,268],[58,269],[59,264],[60,264],[61,270],[62,268],[63,270],[64,270],[65,269],[66,264],[67,270],[68,268],[69,269],[70,269],[71,269],[72,269],[73,264],[74,264],[75,264],[76,264],[77,264],[78,270],[79,268],[80,268],[81,268],[82,268],[83,264],[84,269],[85,269],[86,269],[87,269],[88,264],[89,264],[90,264],[91,264],[92,264],[93,264],[94,264],[95,264],[96,270],[97,270],[98,270],[99,270],[100,268],[101,268],[102,268],[103,269],[104,264],[105,264],[106,269],[107,270],[108,269],[109,269],[110,264],[111,264],[112,268],[113,264],[114,264],[115,268],[116,264],[117,268],[118,269],[119,264],[120,264],[121,264],[122,270],[123,268],[124,268],[125,270],[126,270],[127,270],[128,264],[129,270],[130,268],[131,264],[132,264],[133,269],[134,270],[135,270],[136,269],[137,264],[138,269],[139,264],[140,264],[141,270],[142,268],[143,264],[144,264],[145,268],[147,269],[148,269],[149,264],[150,269],[151,264],[152,264],[153,270],[154,268],[155,269],[156,264],[157,264],[158,268],[159,268],[160,269],[161,269],[162,269],[163,264],[164,264],[165,264],[166,264],[167,264],[168,264],[169,270],[170,268],[171,268],[172,269],[173,264],[174,264],[175,264],[176,270],[177,268],[178,268],[179,269],[180,264],[181,264],[182,264],[183,270],[184,268],[185,268],[186,264],[187,270],[188,270],[200,284],[207,284],[209,284],[212,284],[213,284],[214,284],[217,284],[218,284],[219,284],[220,284],[223,284],[224,284],[229,284],[230,284],[232,284],[234,284],[235,284],[237,284],[240,284],[241,284],[242,284],[244,284],[246,284],[248,284]],"b":[[69,"impl-Display-for-Signature"],[70,"impl-LowerHex-for-Signature"],[71,"impl-Debug-for-Signature"],[72,"impl-UpperHex-for-Signature"],[73,"impl-Debug-for-PublicKey"],[74,"impl-Display-for-PublicKey"],[75,"impl-Display-for-KeyParsingError"],[76,"impl-Debug-for-KeyParsingError"],[79,"impl-Display-for-RelayUrl"],[80,"impl-Debug-for-RelayUrl"],[81,"impl-Debug-for-RelayUrlParseError"],[82,"impl-Display-for-RelayUrlParseError"],[84,"impl-From%3C%26%5Bu8;+ed25519::::SignatureBytes::%7Bconstant%230%7D%5D%3E-for-Signature"],[86,"impl-From%3CInternalSignature%3E-for-Signature"],[87,"impl-From%3C%5Bu8;+ed25519::::SignatureBytes::%7Bconstant%230%7D%5D%3E-for-Signature"],[90,"impl-From%3CDecodeError%3E-for-KeyParsingError"],[91,"impl-From%3CError%3E-for-KeyParsingError"],[93,"impl-From%3CSigningKey%3E-for-SecretKey"],[95,"impl-From%3C%5Bu8;+32%5D%3E-for-SecretKey"],[97,"impl-From%3C(PublicKey,+Option%3CRelayUrl%3E,+%26%5BSocketAddr%5D)%3E-for-NodeAddr"],[98,"impl-From%3CNodeTicket%3E-for-NodeAddr"],[99,"impl-From%3CPublicKey%3E-for-NodeAddr"],[147,"impl-Signature"],[148,"impl-SignatureEncoding-for-Signature"],[164,"impl-TryFrom%3C%26%5Bu8;+32%5D%3E-for-PublicKey"],[165,"impl-TryFrom%3C%26%5Bu8%5D%3E-for-PublicKey"],[219,"impl-Display-for-NodeTicket"],[220,"impl-Debug-for-NodeTicket"],[221,"impl-Display-for-ParseError"],[222,"impl-Debug-for-ParseError"],[226,"impl-From%3CDecodeError%3E-for-ParseError"],[227,"impl-From%3CError%3E-for-ParseError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAALcAGgAQAC8AQgARAFUAAABXAAIAWwABAF4AAABgAAAAYgAAAGQAAQBuAAMAcwADAIEAAgCLAAQAkQABAJUAAACXAAkAogAYAL4ABwDOAAoA2gAFAOMAAQDmAAIA7gABAPEACQD9AAMAAgEGAA==","P":[[20,"T"],[22,""],[23,"T"],[35,""],[42,"T"],[47,""],[55,"Deref::Target"],[56,""],[58,"D"],[61,"__D"],[63,""],[85,"T"],[86,""],[89,"T"],[90,""],[92,"T"],[93,""],[94,"T"],[95,""],[96,"T"],[97,""],[101,"T"],[103,""],[107,""],[108,""],[110,"FromStr::Err"],[113,"R"],[114,"H"],[115,"__H"],[116,""],[118,"U"],[125,""],[138,"S"],[141,"__S"],[143,""],[150,"T"],[155,""],[162,"U,T"],[164,"TryFrom::Error"],[166,"U,T"],[167,"TryFrom::Error"],[168,"U,T"],[172,"U"],[179,""],[187,""],[188,""],[207,"T"],[211,""],[213,"T"],[214,""],[217,"D"],[218,""],[223,"T"],[224,""],[225,"T"],[226,""],[230,"FromStr::Err"],[231,""],[232,"U"],[234,""],[237,"S"],[238,""],[241,"T"],[242,""],[244,"U,T"],[246,"U"],[248,""]]}],["iroh_bench",{"t":"FGGGPPPFPPPPNNNNNNNNNNNNNNNNHONNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNONNNNNCOOONCOHCCNOONNNNNNNNNNNNNNNNNNNNNONNNNNSHHHHHHSHHHHHHFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFFFONNNNNNOOOONNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNONOOOHOOONNNNNNOONNNNNN","n":["ClientStats","Commands","ConnectionSelector","EndpointSelector","Iroh","","","Opt","Quinn","","","S2n","__clone_box","","augment_args","augment_args_for_update","augment_subcommands","augment_subcommands_for_update","borrow","","","","","borrow_mut","","","","","client_handler","clients","clone","","clone_into","","clone_to_uninit","","close","","command","","command_for_update","","compat","","","","","compat_mut","","","","","compat_ref","","","","","configure_tracing_subscriber","default","deref","","","","","deref_mut","","","","","download_size","drop","","","","","fmt","","from","","","","","from_arg_matches","","from_arg_matches_mut","","from_ref","","group_id","has_subcommand","init","","","","","initial_mtu","into","","","","","iroh","max_streams","metrics","only_relay","print","quinn","read_unordered","rt","s2n","stats","","","streams","to_owned","","try_from","","","","","try_into","","","","","type_id","","","","","update_from_arg_matches","","update_from_arg_matches_mut","","upload_size","vzip","","","","","ALPN","client","connect_client","handle_client_stream","server","server_endpoint","transport_config","ALPN","client","connect_client","handle_client_stream","server","server_endpoint","transport_config","Opt","__clone_box","augment_args","augment_args_for_update","borrow","borrow_mut","clone","clone_into","clone_to_uninit","command","command_for_update","compat","compat_mut","compat_ref","deref","deref_mut","drop","fmt","from","from_arg_matches","from_arg_matches_mut","from_ref","group_id","init","into","to_owned","try_from","try_into","type_id","update_from_arg_matches","update_from_arg_matches_mut","vzip","Stats","StreamStats","TransferResult","avg_chunk_size","borrow","","","borrow_mut","","","chunk_size","chunk_time","chunks","","compat","","","compat_mut","","","compat_ref","","","default","","deref","","","deref_mut","","","drop","","","duration","duration_hist","fmt","","","from","","","init","","","into","","","new","print","size","stream_finished","stream_stats","streams","throughput","throughput_bps","throughput_hist","total_duration","total_size","try_from","","","try_into","","","ttfb","ttfb_hist","type_id","","","vzip","",""],"q":[[0,"iroh_bench"],[141,"iroh_bench::iroh"],[148,"iroh_bench::quinn"],[155,"iroh_bench::s2n"],[187,"iroh_bench::stats"],[260,"dyn_clone::sealed"],[261,"clap_builder::builder::command"],[262,"n0_snafu::error"],[263,"async_compat"],[264,"core::fmt"],[265,"clap_builder::parser::matches::arg_matches"],[266,"clap_builder"],[267,"core::result"],[268,"clap_builder::util::id"],[269,"core::option"],[270,"tokio::runtime::runtime"],[271,"core::any"],[272,"iroh_base::node_addr"],[273,"iroh_base::relay_url"],[274,"iroh::endpoint"],[275,"iroh_quinn_proto::config::transport"],[276,"core::net::socket_addr"],[277,"rustls_pki_types"],[278,"iroh_quinn::endpoint"],[279,"iroh_quinn::connection"],[280,"hdrhistogram"],[281,"core::time"]],"i":"````lnAh`21000A`00113210Ab43210`1212121432121432104321043210`0432104321014321021432102121211243210143210`1110`1```311214321043210432102121143210```````````````Ed000000000000000000000000000000```DfEjEf2102000210210210210102102102201021021021022121112`01110210220102102","f":"````````````{{bd}f}0{hh}000{b{{b{c}}}{}}0000{{{b{j}}}{{b{jc}}}{}}0000{{lnA`}{{Ad{Ab}}}}{A`Af}{{{b{Ah}}}Ah}{{{b{A`}}}A`}{{b{b{jc}}}f{}}0{{bAj}f}0{lf}{{{b{n}}Al{b{{An{Aj}}}}}f}{{}h}000{{}{{B`{c}}}{}}0000{{{b{j}}}{{B`{{b{jc}}}}}{}}0000{b{{B`{{b{c}}}}}{}}0000{{}f}{{}Ab}{Af{{b{c}}}{}}0000{Af{{b{jc}}}{}}0000{A`Bb}{Aff}0000{{{b{Ah}}{b{jBd}}}Bf}{{{b{A`}}{b{jBd}}}Bf}{cc{}}0000{{{b{Bh}}}{{Bl{AhBj}}}}{{{b{Bh}}}{{Bl{A`Bj}}}}{{{b{jBh}}}{{Bl{AhBj}}}}{{{b{jBh}}}{{Bl{A`Bj}}}}{{{b{c}}}c{}}0{{}{{C`{Bn}}}}{{{b{Cb}}}Cd}{{}Af}0000{A`Cf}{{}c{}}0000`{A`Af}{A`Cd}0{{{b{Ab}}Af}f}`1{{}Ch}``{{{b{n}}}f}34{bc{}}0{c{{Bl{e}}}{}{}}0000{{}{{Bl{c}}}{}}0000{bCj}0000{{{b{jAh}}{b{Bh}}}{{Bl{fBj}}}}{{{b{jA`}}{b{Bh}}}{{Bl{fBj}}}}{{{b{jAh}}{b{jBh}}}{{Bl{fBj}}}}{{{b{jA`}}{b{jBh}}}{{Bl{fBj}}}}{A`Bb}{{}c{}}0000{{}b}{{Cl{C`{Cn}}A`}{{Ad{Ab}}}}{{Cl{C`{Cn}}A`}{{Ad{{Dd{D`Db}}}}}}{{{b{Db}}BbCd}{{Ad{{Dd{DfDf}}}}}}{{D`A`}{{Ad{f}}}}{{{b{Ch}}{b{{C`{Cn}}}}{b{A`}}}{{Dd{ClD`}}}}{{AfCf}Dh}6{{DjDlA`}{{Ad{Ab}}}}{{DjDlA`}{{Ad{{Dd{DnE`}}}}}}{{{b{E`}}BbCd}{{Ad{{Dd{DfDf}}}}}}{{DnA`}{{Ad{f}}}}{{{b{Ch}}DlEb{b{A`}}}{{Dd{DjDn}}}}5`{{bd}f}{hh}0{b{{b{c}}}{}}{{{b{j}}}{{b{jc}}}{}}{{{b{Ed}}}Ed}{{b{b{jc}}}f{}}{{bAj}f}{{}h}0{{}{{B`{c}}}{}}{{{b{j}}}{{B`{{b{jc}}}}}{}}{b{{B`{{b{c}}}}}{}}{Af{{b{c}}}{}}{Af{{b{jc}}}{}}{Aff}{{{b{Ed}}{b{jBd}}}Bf}{cc{}}{{{b{Bh}}}{{Bl{EdBj}}}}{{{b{jBh}}}{{Bl{EdBj}}}}{{{b{c}}}c{}}{{}{{C`{Bn}}}}{{}Af}{{}c{}}{bc{}}{c{{Bl{e}}}{}{}}{{}{{Bl{c}}}{}}{bCj}{{{b{jEd}}{b{Bh}}}{{Bl{fBj}}}}{{{b{jEd}}{b{jBh}}}{{Bl{fBj}}}}{{}c{}}```{DfBb}{b{{b{c}}}{}}00{{{b{j}}}{{b{jc}}}{}}00{EfEh}0{EfBb}4{{}{{B`{c}}}{}}00{{{b{j}}}{{B`{{b{jc}}}}}{}}00{b{{B`{{b{c}}}}}{}}00{{}Ej}{{}Ef}{Af{{b{c}}}{}}00{Af{{b{jc}}}{}}00{Aff}00{DfEl}:{{{b{Ej}}{b{jBd}}}Bf}{{{b{Ef}}{b{jBd}}}Bf}{{{b{Df}}{b{jBd}}}Bf}{cc{}}00{{}Af}00{{}c{}}00{{ElBbElBb}Df}{{{b{Ej}}{b{Cb}}}f}{DfBb}{{{b{jEj}}Df}f}{EjEf}{EjAf}{DfEn}{{ElBb}En}{EfEh}{EjEl}{EjBb}{c{{Bl{e}}}{}{}}00{{}{{Bl{c}}}{}}00{DfEl}5{bCj}00{{}c{}}00","D":"Dj","p":[[1,"reference",null,null,1],[5,"Private",260],[1,"unit"],[5,"Command",261],[0,"mut"],[6,"EndpointSelector",0],[6,"ConnectionSelector",0],[5,"Opt",0],[5,"ClientStats",0],[8,"Result",262],[1,"usize"],[6,"Commands",0],[1,"u8"],[1,"u32"],[1,"slice"],[5,"Compat",263],[1,"u64"],[5,"Formatter",264],[8,"Result",264],[5,"ArgMatches",265],[8,"Error",266],[6,"Result",267,null,1],[5,"Id",268],[6,"Option",269,null,1],[1,"str"],[1,"bool"],[1,"u16"],[5,"Runtime",270],[5,"TypeId",271],[5,"NodeAddr",272],[5,"RelayUrl",273],[5,"Endpoint",274],[5,"Connection",274],[1,"tuple",null,null,1],[5,"TransferResult",187],[5,"TransportConfig",275],[6,"SocketAddr",276],[5,"CertificateDer",277],[5,"Endpoint",278],[5,"Connection",279],[6,"PrivateKeyDer",277],[5,"Opt",155],[5,"StreamStats",187],[5,"Histogram",280],[5,"Stats",187],[5,"Duration",281],[1,"f64"]],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OzAAAAEAAN8AEQAAABwAHwAmAEcABgBTAAwAZgAAAGoAAQBtAAMAcwAUAIkABQCRAAAAlAABAJgAAACbABIArwAEALUALQDmAAIA7AAYAA==","P":[[18,"T"],[28,""],[32,"T"],[34,""],[42,"T"],[57,""],[59,"T"],[69,""],[77,"T"],[82,""],[86,"T"],[88,""],[96,"U"],[102,""],[114,"T"],[116,"U,T"],[121,"U"],[126,""],[136,"V"],[141,""],[159,"T"],[161,""],[162,"T"],[163,""],[166,"T"],[171,""],[173,"T"],[174,""],[176,"T"],[177,""],[179,"U"],[180,"T"],[181,"U,T"],[182,"U"],[183,""],[186,"V"],[190,""],[191,"T"],[197,""],[201,"T"],[210,""],[212,"T"],[218,""],[226,"T"],[229,""],[232,"U"],[235,""],[246,"U,T"],[249,"U"],[252,""],[257,"V"]]}],["iroh_dns_server",{"t":"FNNNNNNNNNCCNNNNCNNNCNNNCCNNNNNNGFPPFFFNOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONNNNNNNNNNNOONNNNNNOOONNNNNNNNNNNNNNNNNNNNNNNNNNNOFFFFNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNNNNOOOOONNNNNNNNNNNNNNNNNNNNNNNNGPFFFPPGPPPNNNNOONNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNFNNNNNNNOOOOOONNNNOOOONNOOOOOONNNNFNNNNNNNNHNNNNNNFNNNNNNNNNONNNOONNNNN","n":["ZoneStore","__clone_box","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","config","dns","fmt","from","from_ref","get_signed_packet","http","in_memory","insert","into","metrics","new","persistent","resolve","server","state","to_owned","try_from","try_into","type_id","vzip","with_mainline_fallback","BootstrapOption","Config","Custom","Default","MainlineConfig","MetricsConfig","StoreConfig","__clone_box","bind_addr","bootstrap","borrow","","","","","borrow_mut","","","","","clone","clone_into","clone_to_uninit","compat","","","","","compat_mut","","","","","compat_ref","","","","","data_dir","default","","","","deserialize","","","","","disabled","","dns","enabled","fmt","","","","","from","","","","","from_ref","http","https","into","","","","","load","mainline","metrics","pkarr_put_rate_limit","serialize","","","","","signed_packet_store_path","to_owned","try_from","","","","","try_into","","","","","type_id","","","","","vzip","","","","","zone_store","DnsConfig","DnsHandler","DnsServer","Handle","__clone_box","","","answer_request","bind_addr","borrow","","","","borrow_mut","","","","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","compat_mut","","","","compat_ref","","","","default_soa","default_ttl","deserialize","fmt","","","from","","","","from_ref","","","handle_request","into","","","","local_addr","new","origins","port","rr_a","rr_aaaa","rr_ns","run_until_done","send_response","serialize","shutdown","spawn","to_owned","","","try_from","","","","try_into","","","","type_id","","","","vzip","","","","CertMode","Disabled","HttpConfig","HttpServer","HttpsConfig","LetsEncrypt","Manual","RateLimitConfig","SelfSigned","Simple","Smart","__clone_box","","","","bind_addr","","borrow","","","","","borrow_mut","","","","","cert_mode","clone","","","","clone_into","","","","clone_to_uninit","","","","compat","","","","","compat_mut","","","","","compat_ref","","","","","default","","deserialize","","","","domains","eq","equivalent","","","fmt","","","","","from","","","","","from_ref","","","","http_addr","https_addr","into","","","","","letsencrypt_contact","letsencrypt_prod","port","","run_until_done","serialize","","","","shutdown","spawn","to_owned","","","","to_string","try_from","","","","","try_into","","","","","type_id","","","","","vzip","","","","","Metrics","as_iterable","borrow","borrow_mut","compat","compat_mut","compat_ref","default","dns_lookup_error","dns_lookup_notfound","dns_lookup_success","dns_requests","dns_requests_https","dns_requests_udp","field_count","field_ref","fmt","from","http_requests","http_requests_duration_ms","http_requests_error","http_requests_success","into","name","pkarr_publish_noop","pkarr_publish_update","store_packets_expired","store_packets_inserted","store_packets_removed","store_packets_updated","try_from","try_into","type_id","vzip","Server","borrow","borrow_mut","compat","compat_mut","compat_ref","from","into","run_until_error","run_with_config_until_ctrl_c","shutdown","spawn","try_from","try_into","type_id","vzip","AppState","__clone_box","borrow","borrow_mut","clone","clone_into","clone_to_uninit","compat","compat_mut","compat_ref","dns_handler","from","from_ref","into","metrics","store","to_owned","try_from","try_into","type_id","vzip"],"q":[[0,"iroh_dns_server"],[32,"iroh_dns_server::config"],[134,"iroh_dns_server::dns"],[221,"iroh_dns_server::http"],[344,"iroh_dns_server::metrics"],[378,"iroh_dns_server::server"],[394,"iroh_dns_server::state"],[415,"dyn_clone::sealed"],[416,"iroh_dns_server::store"],[417,"async_compat"],[418,"core::fmt"],[419,"pkarr::signed_packet"],[420,"core::option"],[421,"n0_snafu::error"],[422,"alloc::sync"],[423,"std::path"],[424,"core::convert"],[425,"hickory_proto::rr::domain::name"],[426,"hickory_proto::rr::record_type"],[427,"hickory_proto::rr::rr_set"],[428,"core::result"],[429,"core::any"],[430,"serde::de"],[431,"iroh_dns_server::http::rate_limiting"],[432,"serde::ser"],[433,"hickory_server::server::request_handler"],[434,"bytes::bytes"],[435,"alloc::string"],[436,"core::future::future"],[437,"alloc::boxed"],[438,"core::pin"],[439,"hickory_server::server::response_handler"],[440,"core::net::socket_addr"],[441,"alloc::vec"],[442,"hickory_server::authority::message_response"],[443,"hickory_proto::rr::resource"],[444,"core::iter::traits::iterator"],[445,"core::marker"],[446,"iroh_dns_server::http::tls"],[447,"iroh_metrics::iterable"],[448,"iroh_metrics::metrics"],[449,"iroh_metrics::base"]],"i":"`j00000000``0000`000`000``000000``Bn0```CdC`CbCh3214032143330321403214032140031403214220103214032143000321400000321403032140321403214032140````ClDbDh12Ef32103213213213210321032103213333210321321203210233333013003210321032103210321`Cn```Fl0`01110FhFj10G`432104321143214321432104321043210432144432113333433210432143210004321112104321004321304321043210432104321`Aj00000000000000000000000000000000`Gn0000000`000000`Gb0000000000000000000","f":"`{{bd}f}{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{{b{j}}}j}{{b{b{hc}}}f{}}{{bl}f}{{}{{n{c}}}{}}{{{b{h}}}{{n{{b{hc}}}}}{}}{b{{n{{b{c}}}}}{}}``{{{b{j}}{b{hA`}}}Ab}{cc{}}{{{b{c}}}c{}}{{{b{j}}{b{`}}}{{Ah{{Af{Ad}}}}}}```{{}c{}}```{{{b{j}}{b{`}}{b{Bd}}Bf}{{Ah{{Af{{Al{Bh}}}}}}}}``{bc{}}{c{{Bj{e}}}{}{}}{{}{{Bj{c}}}{}}{bBl}{{}c{}}{{jBn}j}```````{{bd}f}{C`Af}{CbAf}{b{{b{c}}}{}}0000{{{b{h}}}{{b{hc}}}{}}0000{{{b{Cd}}}Cd}{{b{b{hc}}}f{}}{{bl}f}{{}{{n{c}}}{}}0000{{{b{h}}}{{n{{b{hc}}}}}{}}0000{b{{n{{b{c}}}}}{}}0000{{}{{Ah{Cf}}}}{{}Ch}{{}Cd}{{}Cb}{{}Bn}{c{{Bj{Ch}}}Cj}{c{{Bj{Cd}}}Cj}{c{{Bj{C`}}}Cj}{c{{Bj{Cb}}}Cj}{c{{Bj{Bn}}}Cj}{{}C`}{C`An}{ChCl}{CbAn}{{{b{Ch}}{b{hA`}}}Ab}{{{b{Cd}}{b{hA`}}}Ab}{{{b{C`}}{b{hA`}}}Ab}{{{b{Cb}}{b{hA`}}}Ab}{{{b{Bn}}{b{hA`}}}Ab}{cc{}}0000{{{b{c}}}c{}}{ChAf}0{{}c{}}0000{c{{Ah{Ch}}}{{Bb{B`}}}}22{ChCn}{{{b{Ch}}c}BjD`}{{{b{Cd}}c}BjD`}{{{b{C`}}c}BjD`}{{{b{Cb}}c}BjD`}{{{b{Bn}}c}BjD`}{{}{{Ah{Cf}}}}{bc{}}{c{{Bj{e}}}{}{}}0000{{}{{Bj{c}}}{}}0000{bBl}0000{{}c{}}0000>````{{bd}f}00{{{b{Db}}Dd}{{Ah{Df}}}}{ClAf}{b{{b{c}}}{}}000{{{b{h}}}{{b{hc}}}{}}000{{{b{Cl}}}Cl}{{{b{Db}}}Db}{{{b{Dh}}}Dh}{{b{b{hc}}}f{}}00{{bl}f}00{{}{{n{c}}}{}}000{{{b{h}}}{{n{{b{hc}}}}}{}}000{b{{n{{b{c}}}}}{}}000{ClDj}{ClDl}{c{{Bj{Cl}}}Cj}{{{b{Cl}}{b{hA`}}}Ab}{{{b{Db}}{b{hA`}}}Ab}{{{b{Dh}}{b{hA`}}}Ab}{cc{}}000{{{b{c}}}c{}}00{{{b{Db}}{b{Dd}}c}{{Eb{{E`{Dn}}}}}Ed}{{}c{}}000{{{b{Ef}}}Eh}{{j{b{Cl}}{Al{Aj}}}{{Ah{Db}}}}{ClEj}{ClEl}{ClAf}00{Ef{{Ah{f}}}}{{{b{hDh}}{En{cegi}}}{{Eb{{E`{Dn}}}}}{{Fd{}{{F`{{b{Fb}}}}}}Ff}{{Fd{}{{F`{{b{Fb}}}}}}Ff}{{Fd{}{{F`{{b{Fb}}}}}}Ff}{{Fd{}{{F`{{b{Fb}}}}}}Ff}}{{{b{Cl}}c}BjD`}2{{ClDb}{{Ah{Ef}}}}{bc{}}00{c{{Bj{e}}}{}{}}000{{}{{Bj{c}}}{}}000{bBl}000{{}c{}}000```````````{{bd}f}000{FhAf}{FjAf}{b{{b{c}}}{}}0000{{{b{h}}}{{b{hc}}}{}}0000{FjFl}{{{b{Cn}}}Cn}{{{b{Fl}}}Fl}{{{b{Fh}}}Fh}{{{b{Fj}}}Fj}{{b{b{hc}}}f{}}000{{bl}f}000{{}{{n{c}}}{}}0000{{{b{h}}}{{n{{b{hc}}}}}{}}0000{b{{n{{b{c}}}}}{}}0000{{}Cn}{{}{{b{Cn}}}}{c{{Bj{Cn}}}Cj}{c{{Bj{Fl}}}Cj}{c{{Bj{Fh}}}Cj}{c{{Bj{Fj}}}Cj}{FjEj}{{{b{Fl}}{b{Fl}}}An}{{b{b{c}}}An{}}00{{{b{Cn}}{b{hA`}}}Ab}{{{b{Fl}}{b{hA`}}}{{Bj{fFn}}}}{{{b{Fl}}{b{hA`}}}Ab}{{{b{Fh}}{b{hA`}}}Ab}{{{b{Fj}}{b{hA`}}}Ab}{cc{}}0000{{{b{c}}}c{}}000{{{b{G`}}}{{Af{Eh}}}}0{{}c{}}0000{FjAf}0{FhEl}{FjEl}{G`{{Ah{f}}}}{{{b{Cn}}c}BjD`}{{{b{Fl}}c}BjD`}{{{b{Fh}}c}BjD`}{{{b{Fj}}c}BjD`}4{{{Af{Fh}}{Af{Fj}}CnGb}{{Ah{G`}}}}{bc{}}000{bDj}{c{{Bj{e}}}{}{}}0000{{}{{Bj{c}}}{}}0000{bBl}0000{{}c{}}0000`{b{{b{Gd}}}}{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{}{{n{c}}}{}}{{{b{h}}}{{n{{b{hc}}}}}{}}{b{{n{{b{c}}}}}{}}{{}Aj}{AjGf}00000{{{b{Aj}}}Gh}{{{b{Aj}}Gh}{{Af{Gj}}}}{{{b{Aj}}{b{hA`}}}Ab}{cc{}}4444{{}c{}}{{{b{Aj}}}{{b{Gl}}}}666666{c{{Bj{e}}}{}{}}{{}{{Bj{c}}}{}}{bBl}{{}c{}}`{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{}{{n{c}}}{}}{{{b{h}}}{{n{{b{hc}}}}}{}}{b{{n{{b{c}}}}}{}};:{Gn{{Ah{f}}}}{Ch{{Ah{f}}}}1{{Chj{Al{Aj}}}{{Ah{Gn}}}};:98`{{bd}f}87{{{b{Gb}}}Gb}{{b{b{hc}}}f{}}{{bl}f}987{GbDb}{cc{}}{{{b{c}}}c{}}{{}c{}}{GbAl}{Gbj}{bc{}}{c{{Bj{e}}}{}{}}{{}{{Bj{c}}}{}}{bBl}{{}c{}}","D":"AAj","p":[[1,"reference",null,null,1],[5,"Private",415],[1,"unit"],[0,"mut"],[5,"ZoneStore",0,416],[1,"u8"],[5,"Compat",417],[5,"Formatter",418],[8,"Result",418],[5,"SignedPacket",419],[6,"Option",420,null,1],[8,"Result",421],[5,"Metrics",344],[5,"Arc",422,null,1],[1,"bool"],[5,"Path",423],[10,"AsRef",424],[5,"Name",425],[6,"RecordType",426],[5,"RecordSet",427],[6,"Result",428,null,1],[5,"TypeId",429],[6,"BootstrapOption",32],[5,"MetricsConfig",32],[5,"MainlineConfig",32],[5,"StoreConfig",32],[5,"PathBuf",423],[5,"Config",32],[10,"Deserializer",430],[5,"DnsConfig",134],[6,"RateLimitConfig",221,431],[10,"Serializer",432],[5,"DnsHandler",134],[5,"Request",433],[5,"Bytes",434],[5,"Handle",134],[5,"String",435],[1,"u32"],[10,"Future",436,null,1],[5,"Box",437,null,1],[5,"Pin",438],[10,"ResponseHandler",439],[5,"DnsServer",134],[6,"SocketAddr",440],[5,"Vec",441],[1,"u16"],[5,"MessageResponse",442],[17,"Item"],[5,"Record",443],[10,"Iterator",444],[10,"Send",445],[5,"HttpConfig",221],[5,"HttpsConfig",221],[6,"CertMode",221,446],[5,"Error",418],[5,"HttpServer",221],[5,"AppState",394],[10,"Iterable",447],[5,"Counter",448],[1,"usize"],[5,"MetricItem",449],[1,"str"],[5,"Server",378]],"r":[[0,416],[1,416],[2,416],[3,416],[4,416],[5,416],[6,416],[7,416],[8,416],[9,416],[12,416],[13,416],[14,416],[15,416],[17,416],[18,416],[19,416],[21,416],[22,416],[23,416],[26,416],[27,416],[28,416],[29,416],[30,416],[31,416],[221,446],[222,431],[226,446],[227,446],[228,431],[229,446],[230,431],[231,431],[232,431],[233,446],[239,431],[240,446],[244,431],[245,446],[249,431],[250,446],[253,431],[254,446],[257,431],[258,446],[262,431],[263,446],[267,431],[268,446],[272,431],[273,446],[276,431],[277,431],[278,431],[279,446],[283,446],[284,446],[285,446],[286,446],[287,431],[288,446],[289,446],[293,431],[294,446],[297,431],[298,446],[304,431],[305,446],[313,431],[314,446],[319,431],[320,446],[323,446],[325,431],[326,446],[330,431],[331,446],[335,431],[336,446],[340,431],[341,446]],"b":[[276,"impl-Default-for-RateLimitConfig"],[277,"impl-Default-for-%26RateLimitConfig"],[288,"impl-Display-for-CertMode"],[289,"impl-Debug-for-CertMode"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAABIBIQACAAgADQAAAA8AAAAbAAQAKAAAACsAGwBIAAgAVQAEAF8AAABrAAQAcQAUAIsAAgCQABwArwADALcAAwDHAAEAywASAOkAAwDvAAkA+gAgABwBCAAqAQMAOgEDAEABGABaAQYAZwECAHABAAB3AQMAfAEEAIcBAwCMAQgAlwEAAJsBBAA=","P":[[2,"T"],[4,""],[5,"T"],[6,""],[7,"T"],[12,""],[13,"T"],[15,""],[19,"U"],[21,""],[22,""],[23,""],[26,"T"],[27,"U,T"],[28,"U"],[29,""],[30,"V"],[31,""],[42,"T"],[52,""],[53,"T"],[54,""],[55,"T"],[70,""],[75,"__D"],[80,""],[89,"T"],[95,""],[97,"U"],[102,""],[103,""],[106,"__S"],[111,""],[112,"T"],[113,"U,T"],[118,"U"],[123,""],[128,"V"],[133,""],[143,"T"],[151,""],[154,"T"],[157,""],[160,"T"],[172,""],[174,"__D"],[175,""],[178,"T"],[185,"R"],[186,"U"],[190,""],[198,",,,"],[199,"__S"],[200,""],[202,"T"],[205,"U,T"],[209,"U"],[213,""],[217,"V"],[232,""],[238,"T"],[248,""],[253,"T"],[257,""],[261,"T"],[276,""],[278,"__D"],[282,""],[284,"K"],[287,""],[292,"T"],[301,""],[303,"U"],[308,""],[313,"__S"],[317,""],[319,"T"],[323,""],[324,"U,T"],[329,"U"],[334,""],[339,"V"],[345,""],[346,"T"],[351,""],[361,"T"],[362,""],[366,"U"],[367,""],[374,"U,T"],[375,"U"],[376,""],[377,"V"],[379,"T"],[385,"U"],[386,""],[390,"U,T"],[391,"U"],[392,""],[393,"V"],[395,""],[396,"T"],[398,""],[399,"T"],[400,""],[401,"T"],[404,""],[405,"T"],[407,"U"],[408,""],[410,"T"],[411,"U,T"],[412,"U"],[413,""],[414,"V"]]}],["iroh_relay",{"t":"EFFFFNNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNCNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNCNNNNNNNNNNNNCNNNNOCCONNCNNNNNNNNNNNNNNNNNNONNNNNFFFFGPGPPPPPPPPPPPPPPPPGGPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNHNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOSSSSSGFPPSSPPPFFPFNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOSSSSPGPGPSPPPPPGPTFFKFPPGPPFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNMNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOCCCCCPGGPPPPPPPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOSHPPGPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOGGPPPPPPPSPPPPPPGPPPPPPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOSPPGSSFPNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOOOOOOOGGPPPPGFSPPPPFPPFPPPFPFFPFPFFGGPFPNNNOOOONNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNONONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOOONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNONNNONNONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOOONONNOOOONOONNOOOOOOONNNNNNCONNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNOONNNNNNNNNNNNNNNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOHHHHH","n":["MAX_PACKET_SIZE","PingTracker","RelayMap","RelayNode","RelayQuicConfig","__clone_box","","","borrow","","","","borrow_mut","","","","client","clone","","","clone_into","","","clone_to_uninit","","","cmp","","compare","","compat","","","","compat_mut","","","","compat_ref","","","","contains_node","default","","default_timeout","defaults","deref","","","","deref_mut","","","","deserialize","","dns","drop","","","","empty","eq","","","equivalent","","","","","","","","","fmt","","","","","","from","","","","","","","from_iter","","get_node","http","init","","","","into","","","","is_empty","len","new","new_ping","node_info","nodes","partial_cmp","","pong_received","port","protos","quic","","serialize","","server","timeout","to_owned","","","to_string","","try_from","","","","try_into","","","","type_id","","","","url","urls","vzip","","","","Client","ClientBuilder","ClientSink","ClientStream","ConnectError","Dial","DialError","Dns","ExceedsMaxPacketSize","Handshake","InvalidRelayUrl","InvalidTargetPort","InvalidTlsServername","InvalidUrl","InvalidWebsocketUrl","Io","NoLocalAddr","Protocol","ProxyConnect","ProxyConnectInvalidStatus","ProxyInvalidTargetPort","ProxyInvalidTlsServername","ProxyInvalidUrl","RecvError","SendError","StreamError","","Timeout","Tls","UnexpectedUpgradeStatus","Upgrade","Websocket","__clone_box","address_family_selector","as_error_source","","","","backtrace","","","","borrow","","","","","","","","borrow_mut","","","","","","","","cause","","","","clone","clone_into","clone_to_uninit","compat","","","","","","","","compat_mut","","","","","","","","compat_ref","","","","","","","","connect","deref","","","","","","","","deref_mut","","","","","","","","description","","","","drop","","","","","","","","fmt","","","","","","","","","","","","from","","","","","","","","","","","","","","","","","in_current_span","","","","init","","","","","","","","insecure_skip_cert_verify","into","","","","","","","","key_cache_capacity","local_addr","make_dangerous_client_config","new","poll_close","","poll_flush","","poll_next","","poll_ready","","proxy_url","source","","","","split","start_send","","to_owned","to_string","","","","try_from","","","","","","","","try_into","","","","","","","","try_poll_next","","type_id","","","","","","","","vzip","","","","","","","","backtrace","","","","","","","","","","code","source","","","","","span_trace","","","","","","","","","","url","","backtrace","","","","","","","","","","proxy_hostname","proxy_url","source","","","","span_trace","","","","","","","","","","status","url","backtrace","","source","","span_trace","","backtrace","","size","source","span_trace","","DEFAULT_HTTPS_PORT","DEFAULT_HTTP_PORT","DEFAULT_KEY_CACHE_CAPACITY","DEFAULT_METRICS_PORT","DEFAULT_RELAY_QUIC_PORT","DnsError","DnsResolver","InvalidResponse","MissingHost","N0_DNS_NODE_ORIGIN_PROD","N0_DNS_NODE_ORIGIN_STAGING","NoResponse","Resolve","ResolveBoth","StaggeredError","TXT","Timeout","TxtLookup","__clone_box","","","as_error_source","","backtrace","","borrow","","","","","borrow_mut","","","","","cause","","clear_cache","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","","compat_mut","","","","","compat_ref","","","","","default","deref","","","","","deref_mut","","","","","description","","drop","","","","","fmt","","","","","","","","from","","","","","","","","","in_current_span","","init","","","","","into","","","","","into_iter","lookup_ipv4","lookup_ipv4_ipv6","lookup_ipv4_ipv6_staggered","lookup_ipv4_staggered","lookup_ipv6","lookup_ipv6_staggered","lookup_node_by_domain_name","lookup_node_by_domain_name_staggered","lookup_node_by_id","lookup_node_by_id_staggered","lookup_txt","new","reset","resolve","resolve_host","source","","to_owned","","","to_string","","","try_from","","","","","try_into","","","","","txt_data","type_id","","","","","vzip","","","","","with_nameserver","backtrace","","","","","","ipv4","ipv6","source","","span_trace","","","","","","CLIENT_AUTH_HEADER","RELAY_PATH","RELAY_PROBE_PATH","RELAY_PROTOCOL_VERSION","AttrFromString","DecodingError","","EncodingError","FailedBuildingPacket","IROH_TXT_NAME","InvalidEncodingZ32","InvalidLabel","InvalidLength","InvalidSignature","InvalidTxtEntry","LookupError","LookupFailed","MAX_LENGTH","MaxLengthExceededError","NodeData","NodeIdExt","NodeInfo","NotAnIrohRecord","NumLabels","ParseError","","UnexpectedFormat","UserData","Utf8","__clone_box","","","add_direct_addresses","as_error_source","","","","","as_ref","backtrace","","","","","borrow","","","","","","","","borrow_mut","","","","","","","","cause","","","","","clear_direct_addresses","clone","","","clone_into","","","clone_to_uninit","","","cmp","compare","compat","","","","","","","","compat_mut","","","","","","","","compat_ref","","","","","","","","data","default","deref","","","","","","","","","deref_mut","","","","","","","","","description","","","","","direct_addresses","drop","","","","","","","","eq","","","equivalent","","","","","","","","","fmt","","","","","","","","","","","","","","from","","","","","","","","","","","","from_parts","from_pkarr_signed_packet","from_str","from_txt_lookup","from_z32","hash","in_current_span","","","","","init","","","","","","","","into","","","","","","","","into_node_addr","new","","node_id","partial_cmp","relay_url","set_relay_url","set_user_data","source","","","","","to_node_addr","to_owned","","","to_pkarr_signed_packet","to_string","","","","","","to_txt_strings","to_z32","try_from","","","","","","","","","try_into","","","","","","","","type_id","","","","","","","","user_data","vzip","","","","","","","","with_direct_addresses","","with_relay_url","","with_user_data","","backtrace","","","len","source","","span_trace","","","backtrace","","source","","span_trace","","backtrace","","","source","","","span_trace","","","backtrace","","","","","","key","label","num_labels","s","source","","span_trace","","","","","","common","disco","handshake","relay","streams","ClientAuth","FrameType","FrameTypeError","Health","NodeGone","Ping","Pong","RecvPacket","Restarting","SendPacket","ServerChallenge","ServerConfirmsAuth","ServerDeniesAuth","UnexpectedEnd","UnknownFrameType","__clone_box","as_error_source","backtrace","borrow","","borrow_mut","","cause","clone","clone_into","clone_to_uninit","compat","","compat_mut","","compat_ref","","deref","","deref_mut","","description","drop","","eq","equivalent","","","fmt","","","","from","","in_current_span","init","","into","","source","to_owned","to_string","","try_from","","","try_from_primitive","try_into","","type_id","","vzip","","backtrace","","span_trace","","tag","MAGIC","looks_like_disco_wrapper","ClientAuthHeaderInvalid","DeserializationError","Error","FrameTypeError","ServerDeniedAuth","Timeout","UnexpectedEnd","UnexpectedFrameType","Websocket","as_error_source","backtrace","borrow","borrow_mut","cause","compat","compat_mut","compat_ref","deref","deref_mut","description","drop","fmt","","from","","","in_current_span","init","into","source","to_string","try_from","try_into","type_id","vzip","backtrace","","","","","","","","expected_types","frame_type","","reason","source","","","","span_trace","","","","","","","","value","ClientToRelayMsg","Error","FrameTooLarge","FrameTypeError","Health","InvalidFrame","InvalidFrameType","InvalidProtocolMessageEncoding","InvalidPublicKey","MAX_PACKET_SIZE","NodeGone","Ping","","Pong","","ReceivedPacket","RelayToClientMsg","Restarting","SendPacket","SerDe","Timeout","TooSmall","UnexpectedFrame","__clone_box","","as_error_source","backtrace","borrow","","","borrow_mut","","","cause","clone","","clone_into","","clone_to_uninit","","compat","","","compat_mut","","","compat_ref","","","deref","","","deref_mut","","","description","drop","","","eq","","equivalent","","","","","","fmt","","","","from","","","","","","in_current_span","init","","","into","","","source","to_owned","","to_string","try_from","","","try_into","","","typ","type_id","","","vzip","","","dst_key","packet","backtrace","","","","","","","","","","expected","frame_len","frame_type","got","source","","","","","span_trace","","","","","","","","","","content","problem","reconnect_in","src_key","try_for","ALPN_QUIC_ADDR_DISC","Connect","Connection","Error","QUIC_ADDR_DISC_CLOSE_CODE","QUIC_ADDR_DISC_CLOSE_REASON","QuicClient","WatchRecv","__clone_box","as_error_source","backtrace","borrow","","borrow_mut","","cause","clone","clone_into","clone_to_uninit","compat","","compat_mut","","compat_ref","","create_conn","deref","","deref_mut","","description","drop","","fmt","","","from","","","","","in_current_span","init","","into","","new","source","to_owned","to_string","try_from","","try_into","","type_id","","vzip","","backtrace","","","source","","","span_trace","","","Access","AccessConfig","AcmeEventStreamFinished","Allow","BindTcpListener","BindTlsListener","CertConfig","ClientRateLimit","DEFAULT_CERT_RELOAD_INTERVAL","Deny","Everyone","JoinError","LetsEncrypt","Limits","LocalAddr","Manual","Metrics","","NoLocalAddr","NoRelayServicesEnabled","QuicConfig","QuicSpawn","RelayConfig","RelayMetrics","Reloading","ReloadingResolver","Restricted","Server","ServerConfig","SpawnError","SupervisorError","TaskCancelled","TlsConfig","TlsHeaderParse","__clone_box","","","accept_conn_burst","accept_conn_limit","accepts","access","as_error_source","","as_iterable","backtrace","","bind_addr","borrow","","","","","","","","","","","","","","","borrow_mut","","","","","","","","","","","","","","","bytes_per_second","bytes_recv","bytes_rx_ratelimited_total","bytes_sent","cause","","cert","certificates","client_rx","clone","","","clone_into","","","clone_to_uninit","","","compat","","","","","","","","","","","","","","","compat_mut","","","","","","","","","","","","","","","compat_ref","","","","","","","","","","","","","","","conns_rx_ratelimited_total","default","","","","deref","","","","","","","","","","","","","","","","deref_mut","","","","","","","","","","","","","","","description","","disco_packets_dropped","disco_packets_recv","disco_packets_sent","disconnects","drop","","","","","","","","","","","","","","","eq","equivalent","","","field_count","field_ref","fmt","","","","","","","","","","","","","","","","","from","","","","","","","","","","","","","","","","got_ping","groups","groups_cloned","http_addr","http_bind_addr","http_url","https_addr","https_bind_addr","https_url","in_current_span","","init","","","","","","","","","","","","","","","","into","","","","","","","","","","","","","","","is_allowed","key_cache_capacity","limits","max_burst_bytes","metrics","metrics_addr","name","","other_packets_dropped","other_packets_recv","other_packets_sent","quic","quic_addr","quic_bind_addr","relay","reload","resolve","send_packets_dropped","send_packets_recv","send_packets_sent","sent_pong","server","server_config","","shutdown","","source","","spawn","task_handle","testing","tls","to_owned","","","to_string","","try_from","","","","","","","","","","","","","","","try_into","","","","","","","","","","","","","","","type_id","","","","","","","","","","","","","","","unique_client_keys","unknown_frames","vzip","","","","","","","","","","","","","","","certs","state","addr","backtrace","","","","","","source","","","","","span_trace","","","","","","backtrace","","","","","source","","span_trace","","","","","quic_config","relay_config","self_signed_tls_certs_and_config","server_config","tls_config"],"q":[[0,"iroh_relay"],[140,"iroh_relay::client"],[367,"iroh_relay::client::ConnectError"],[395,"iroh_relay::client::DialError"],[423,"iroh_relay::client::RecvError"],[429,"iroh_relay::client::SendError"],[435,"iroh_relay::defaults"],[440,"iroh_relay::dns"],[590,"iroh_relay::dns::DnsError"],[606,"iroh_relay::http"],[610,"iroh_relay::node_info"],[872,"iroh_relay::node_info::DecodingError"],[881,"iroh_relay::node_info::EncodingError"],[887,"iroh_relay::node_info::LookupError"],[896,"iroh_relay::node_info::ParseError"],[914,"iroh_relay::protos"],[919,"iroh_relay::protos::common"],[987,"iroh_relay::protos::common::FrameTypeError"],[992,"iroh_relay::protos::disco"],[994,"iroh_relay::protos::handshake"],[1029,"iroh_relay::protos::handshake::Error"],[1054,"iroh_relay::protos::relay"],[1155,"iroh_relay::protos::relay::ClientToRelayMsg"],[1157,"iroh_relay::protos::relay::Error"],[1186,"iroh_relay::protos::relay::RelayToClientMsg"],[1191,"iroh_relay::quic"],[1249,"iroh_relay::quic::Error"],[1258,"iroh_relay::server"],[1635,"iroh_relay::server::CertConfig"],[1637,"iroh_relay::server::SpawnError"],[1655,"iroh_relay::server::SupervisorError"],[1667,"iroh_relay::server::testing"],[1672,"dyn_clone::sealed"],[1673,"iroh_relay::relay_map"],[1674,"core::cmp"],[1675,"async_compat"],[1676,"iroh_base::relay_url"],[1677,"iroh_relay::ping_tracker"],[1678,"core::time"],[1679,"core::result"],[1680,"serde::de"],[1681,"core::fmt"],[1682,"core::iter::traits::collect"],[1683,"alloc::sync"],[1684,"core::option"],[1685,"core::iter::traits::iterator"],[1686,"serde::ser"],[1687,"alloc::string"],[1688,"core::any"],[1689,"core::ops::function"],[1690,"core::marker"],[1691,"core::error"],[1692,"iroh_relay::client::conn"],[1693,"backtrace::capture"],[1694,"tokio_websockets::error"],[1695,"std::io::error"],[1696,"tokio::time::error"],[1697,"core::net::socket_addr"],[1698,"rustls::client::client_conn"],[1699,"iroh_base::key"],[1700,"core::convert"],[1701,"core::pin"],[1702,"core::task::wake"],[1703,"core::task::poll"],[1704,"url"],[1705,"http::status"],[1706,"hyper::error"],[1707,"n0_snafu::spantrace"],[1708,"hickory_resolver::error"],[1709,"hickory_resolver::resolver"],[1710,"hickory_resolver::lookup"],[1711,"core::net::ip_addr"],[1712,"reqwest::dns::resolve"],[1713,"alloc::boxed"],[1714,"http::header::name"],[1715,"alloc::collections::btree::set"],[1716,"pkarr::signed_packet"],[1717,"iroh_base::node_addr"],[1718,"core::hash"],[1719,"alloc::vec"],[1720,"z32"],[1721,"ed25519_dalek::errors"],[1722,"simple_dns::simple_dns_error"],[1723,"hickory_proto::error"],[1724,"core::str::error"],[1725,"num_enum"],[1726,"iroh_quinn_proto::varint"],[1727,"postcard::error"],[1728,"http::header::value"],[1729,"bytes::bytes"],[1730,"iroh_quinn::connection"],[1731,"tokio::sync::watch::error"],[1732,"iroh_quinn_proto::connection"],[1733,"iroh_quinn_proto::endpoint"],[1734,"iroh_quinn::endpoint"],[1735,"iroh_relay::server::metrics"],[1736,"iroh_metrics::metrics"],[1737,"iroh_metrics::iterable"],[1738,"core::num::nonzero"],[1739,"rustls_pki_types"],[1740,"core::default"],[1741,"iroh_relay::server::resolver"],[1742,"iroh_metrics::base"],[1743,"tokio::runtime::task::error"],[1744,"rustls::crypto::signer"],[1745,"reloadable_core"],[1746,"rustls::server::server_conn"],[1747,"tokio_util::task::abort_on_drop"],[1748,"tokio_rustls_acme::state"]],"i":"`````jlnAj3210321`32132132121210321032103213010`0321032121`032133213332221110332210333221333`032103213300`32101``221`032132032103210321230321`````Dn`E`Dh22121212Dl22222``1023333Cl02143214321430EbEfEh547632105476333547632105476321054763210354763210547632105476547632105544776632105544477776666321054765476321035476321030`32121202135476221354765476321054763210205476321054763210GlGnH`HbHdHfHhHjHlHn476530987654321098IfIhIjIlInJ`JbJdJfJh138762987654321045JjJl1010JnK`0110```````Fd0``000``0`FlKhKj3Kb404032140321403321321321403214032140321340321403214040321440032114440332214040321403212333333333333333403214014032140321140321403213MfMhMjMlMnN`3351543210````Nn`0`Nh`NjLl112`0Nf````44`14`4Nd1Lj154Nl473650476523014765230147650472231231231336523014765230147652301471265230114765230114765047265230147231222333111665523300144776652230114771131On4761587634125876341258232243337615823422764158207634412587634125876341258376341258323232A@`A@bA@d120210A@jA@l1010AA`AAbAAd210210AAhAAjAAlAAnAB`ABb413520543210`````ABh``0000000000ABf010010100111101010101001011111100100101001101101101010ABlABn100``En0`00000000000000000000000000000000ACbACdACfAChACjAClACnAD`11026530765432107``El0ADf1111`00Gj101`102222102221021021010102102102102102102210101110002210222210221021021022102101210210ADh0ADlADnAE`AEbAEdAEfAEhAEjAElAEn9829765419876543210AF`AFbAFd20`AFf0````0AFh1110101000101010010101101101111011010010110101010AGdAGfAGh210210``AHhAIjAHf0```1AHb3AIb`20`424`2``0`1````4`2AIh4AHlAGj0AGlAH`79179AHj25AJ`AIl39;2AI`679AId<>69325;=4178:0<>8666<>1079=89=89=869325;=4178:0<>69325;=4178:0<>69325;=4178:0<>66927693325;=4178:0<>69325;=4178:0<><>666669325;=4178:0<>====6669325;=4178:0<<>>69325;=4178:0<>>699050010<>693325;=4178:0<>69325;=4178:0<>;5580269666201233666694130<>00`59=8<>69325;=4178:0<>69325;=4178:0<>69325;=4178:0<>6669325;=4178:0<>AKdAKfAKjAKlAKnAL`ALbALd543210432105ALhALjALlALnAM`4243210`````","f":"`````{{bd}f}00{b{{b{c}}}{}}000{{{b{h}}}{{b{hc}}}{}}000`{{{b{j}}}j}{{{b{l}}}l}{{{b{n}}}n}{{b{b{hc}}}f{}}00{{bA`}f}00{{{b{l}}{b{l}}}Ab}{{{b{n}}{b{n}}}Ab}{{b{b{c}}}Ab{}}0{{}{{Ad{c}}}{}}000{{{b{h}}}{{Ad{{b{hc}}}}}{}}000{b{{Ad{{b{c}}}}}{}}000{{{b{j}}{b{Af}}}Ah}{{}Aj}{{}n}{{{b{Aj}}}Al}`{An{{b{c}}}{}}000{An{{b{hc}}}{}}000{c{{B`{l}}}Bb}{c{{B`{n}}}Bb}`{Anf}000{{}j}{{{b{j}}{b{j}}}Ah}{{{b{l}}{b{l}}}Ah}{{{b{n}}{b{n}}}Ah}{{b{b{c}}}Ah{}}00000000{{{b{Aj}}{b{hBd}}}Bf}{{{b{j}}{b{hBd}}}Bf}0{{{b{l}}{b{hBd}}}Bf}0{{{b{n}}{b{hBd}}}Bf}{cc{}}{lj}{Afj}2{Afl}33{cj{{Bj{}{{Bh{l}}}}}}{cj{{Bj{}{{Bh{Af}}}}}}{{{b{j}}{b{Af}}}{{Bn{{b{{Bl{l}}}}}}}}`{{}An}000{{}c{}}000{{{b{j}}}Ah}{{{b{j}}}An}{AlAj}{{{b{hAj}}}{{C`{A`}}}}`{{{b{j}}}{{`{{Cb{}{{Bh{{b{{Bl{l}}}}}}}}}}}}{{{b{l}}{b{l}}}{{Bn{Ab}}}}{{{b{n}}{b{n}}}{{Bn{Ab}}}}{{{b{hAj}}{C`{A`}}}f}{nCd}``{lBn}{{{b{l}}c}B`Cf}{{{b{n}}c}B`Cf}`{{{b{hAj}}}f}{bc{}}00{bCh}0{c{{B`{e}}}{}{}}000{{}{{B`{c}}}{}}000{bCj}000{lAf}{{{b{j}}}{{`{{Cb{}{{Bh{{b{Af}}}}}}}}}}{{}c{}}000````````````````````````````````{{bd}f}{{Clc}Cl{{D`{}{{Cn{Ah}}}}DbDd}}{b{{b{Df}}}}000{{{b{Dh}}}{{Bn{{b{Dj}}}}}}{{{b{Dl}}}{{Bn{{b{Dj}}}}}}{{{b{Dn}}}{{Bn{{b{Dj}}}}}}{{{b{E`}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0000000{{{b{h}}}{{b{hc}}}{}}0000000{{{b{Dh}}}{{Bn{{b{Df}}}}}}{{{b{Dl}}}{{Bn{{b{Df}}}}}}{{{b{Dn}}}{{Bn{{b{Df}}}}}}{{{b{E`}}}{{Bn{{b{Df}}}}}}{{{b{Cl}}}Cl}{{b{b{hc}}}f{}}{{bA`}f}{{}{{Ad{c}}}{}}0000000{{{b{h}}}{{Ad{{b{hc}}}}}{}}0000000{b{{Ad{{b{c}}}}}{}}0000000{{{b{Cl}}}{{B`{EbDn}}}}{An{{b{c}}}{}}0000000{An{{b{hc}}}{}}0000000{{{b{Dh}}}{{b{Ed}}}}{{{b{Dl}}}{{b{Ed}}}}{{{b{Dn}}}{{b{Ed}}}}{{{b{E`}}}{{b{Ed}}}}{Anf}0000000{{{b{Dh}}{b{hBd}}}Bf}0{{{b{Dl}}{b{hBd}}}Bf}0{{{b{Dn}}{b{hBd}}}Bf}0{{{b{E`}}{b{hBd}}}Bf}0{{{b{Cl}}{b{hBd}}}Bf}{{{b{Eb}}{b{hBd}}}Bf}{{{b{Ef}}{b{hBd}}}Bf}{{{b{Eh}}{b{hBd}}}Bf}{EjDh}{cc{}}{EjDl}{ElDl}2{E`Dn}{EnDn}{EjDn}5{F`E`}{FbE`}7{FdE`}8888{{}}000{{}An}0000000{{ClAh}Cl}{{}c{}}0000000{{ClAn}Cl}{{{b{Eh}}}{{Bn{Ff}}}}{{}Fh}{{cFjFl}Cl{{Fn{Af}}}}{{{G`{{b{hEb}}}}{b{hGb}}}{{Gd{{B`{fc}}}}}{}}{{{G`{{b{hEf}}}}{b{hGb}}}{{Gd{{B`{fc}}}}}{}}10{{{G`{{b{hEb}}}}{b{hGb}}}{{Gd{{Bn{c}}}}}{}}{{{G`{{b{hEh}}}}{b{hGb}}}{{Gd{{Bn{c}}}}}{}}32{{ClGf}Cl}{{{b{Dh}}}{{Bn{{b{Df}}}}}}{{{b{Dl}}}{{Bn{{b{Df}}}}}}{{{b{Dn}}}{{Bn{{b{Df}}}}}}{{{b{E`}}}{{Bn{{b{Df}}}}}}{Eb{{Gh{EhEf}}}}{{{G`{{b{hEb}}}}Gj}{{B`{fc}}}{}}{{{G`{{b{hEf}}}}Gj}{{B`{fc}}}{}}{bc{}}{bCh}000{c{{B`{e}}}{}{}}0000000{{}{{B`{c}}}{}}0000000{{{G`{{b{hc}}}}{b{hGb}}}{{Gd{{Bn{B`}}}}}{}}0{bCj}0000000{{}c{}}0000000{GlBn}{GnBn}{H`Bn}{HbBn}{HdBn}{HfBn}{HhBn}{HjBn}{HlBn}{HnBn}{HfI`}{H`Ej}{HbEn}{HdE`}{HhIb}{HnF`}{GlId}{GnId}{H`Id}{HbId}{HdId}{HfId}{HhId}{HjId}{HlId}{HnId}{GlGf}{GnGf}{IfBn}{IhBn}{IjBn}{IlBn}{InBn}{J`Bn}{JbBn}{JdBn}{JfBn}{JhBn}{JfCh}{JbGf}{IhFd}{IjFb}{IlF`}{JdIb}{IfId}{IhId}{IjId}{IlId}{InId}{J`Id}{JbId}{JdId}{JfId}{JhId}{J`I`}{InGf}{JjBn}{JlBn}{JjEl}{JlEj}{JjId}{JlId}{JnBn}{K`Bn}{K`An}{JnEj}{JnId}{K`Id}{{}Cd}0{{}An}11````{{}b}0```````{{bd}f}00{b{{b{Df}}}}0{{{b{Fd}}}{{Bn{{b{Dj}}}}}}{{{b{{Kb{c}}}}}{{Bn{{b{Dj}}}}}{KdKf}}{b{{b{c}}}{}}0000{{{b{h}}}{{b{hc}}}{}}0000{{{b{Fd}}}{{Bn{{b{Df}}}}}}{{{b{{Kb{c}}}}}{{Bn{{b{Df}}}}}{KdKf}}{{{b{Fl}}}f}{{{b{Fl}}}Fl}{{{b{Kh}}}Kh}{{{b{Kj}}}Kj}{{b{b{hc}}}f{}}00{{bA`}f}00{{}{{Ad{c}}}{}}0000{{{b{h}}}{{Ad{{b{hc}}}}}{}}0000{b{{Ad{{b{c}}}}}{}}0000{{}Fl}{An{{b{c}}}{}}0000{An{{b{hc}}}{}}0000{{{b{Fd}}}{{b{Ed}}}}{{{b{{Kb{c}}}}}{{b{Ed}}}{KdKf}}{Anf}0000{{{b{Fd}}{b{hBd}}}Bf}0{{{b{{Kb{c}}}}{b{hBd}}}Bf{KdKf}}{{{b{{Kb{c}}}}{b{hBd}}}Bf{KdKdKf}}{{{b{Fl}}{b{hBd}}}Bf}{{{b{Kh}}{b{hBd}}}Bf}{{{b{Kj}}{b{hBd}}}Bf}0{FbFd}{KlFd}{cc{}}0{KnFl}11{L`Kh}2{{}}0{{}An}0000{{}c{}}0000{Khc{}}{{{b{Fl}}cAl}{{B`{{`{{Cb{}{{Bh{Lb}}}}}}Fd}}}Ld}0{{{b{Fl}}cAl{b{{Lh{Lf}}}}}{{B`{{`{{Cb{}{{Bh{Lb}}}}}}{Kb{Fd}}}}}Ld}010{{{b{Fl}}{b{Ed}}}{{B`{LjLl}}}}{{{b{Fl}}{b{Ed}}{b{{Lh{Lf}}}}}{{B`{Lj{Kb{Ll}}}}}}{{{b{Fl}}{b{Ln}}{b{Ed}}}{{B`{LjLl}}}}{{{b{Fl}}{b{Ln}}{b{Ed}}{b{{Lh{Lf}}}}}{{B`{Lj{Kb{Ll}}}}}}{{{b{Fl}}cAl}{{B`{KhFd}}}Ld}{{}Fl}{{{b{Fl}}}f}{{{b{Fl}}M`}Mb}{{{b{Fl}}{b{Gf}}AhAl}{{B`{LbFd}}}}{{{b{Fd}}}{{Bn{{b{Df}}}}}}{{{b{{Kb{c}}}}}{{Bn{{b{Df}}}}}{KdKf}}{bc{}}00{bCh}00{c{{B`{e}}}{}{}}0000{{}{{B`{c}}}{}}0000{{{b{Kj}}}{{b{{Lh{{Md{{Lh{A`}}}}}}}}}}{bCj}0000{{}c{}}0000{FfFl}{MfBn}{MhBn}{MjBn}{MlBn}{MnBn}{N`Bn}{MjMd}0{MfFb}{MnKl}{MfId}{MhId}{MjId}{MlId}{MnId}{N`Id}{{}Nb}{{}b}00`````0```````````````````{{bd}f}00{{{b{hNd}}c}f{{Bj{}{{Bh{Ff}}}}}}{b{{b{Df}}}}0000{{{b{Nf}}}{{b{Ed}}}}{{{b{Nh}}}{{Bn{{b{Dj}}}}}}{{{b{Nj}}}{{Bn{{b{Dj}}}}}}{{{b{Nl}}}{{Bn{{b{Dj}}}}}}{{{b{Ll}}}{{Bn{{b{Dj}}}}}}{{{b{Nn}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0000000{{{b{h}}}{{b{hc}}}{}}0000000{{{b{Nh}}}{{Bn{{b{Df}}}}}}{{{b{Nj}}}{{Bn{{b{Df}}}}}}{{{b{Nl}}}{{Bn{{b{Df}}}}}}{{{b{Ll}}}{{Bn{{b{Df}}}}}}{{{b{Nn}}}{{Bn{{b{Df}}}}}}{{{b{hNd}}}f}{{{b{Nd}}}Nd}{{{b{Nf}}}Nf}{{{b{Lj}}}Lj}{{b{b{hc}}}f{}}00{{bA`}f}00{{{b{Nf}}{b{Nf}}}Ab}{{b{b{c}}}Ab{}}{{}{{Ad{c}}}{}}0000000{{{b{h}}}{{Ad{{b{hc}}}}}{}}0000000{b{{Ad{{b{c}}}}}{}}0000000{LjNd}{{}Nd}{An{{b{c}}}{}}00000{{{b{Lj}}}{{b{c}}}{}}11{An{{b{hc}}}{}}00000{{{b{hLj}}}{{b{hc}}}{}}11{{{b{Nh}}}{{b{Ed}}}}{{{b{Nj}}}{{b{Ed}}}}{{{b{Nl}}}{{b{Ed}}}}{{{b{Ll}}}{{b{Ed}}}}{{{b{Nn}}}{{b{Ed}}}}{{{b{Nd}}}{{b{{O`{Ff}}}}}}{Anf}0000000{{{b{Nd}}{b{Nd}}}Ah}{{{b{Nf}}{b{Nf}}}Ah}{{{b{Lj}}{b{Lj}}}Ah}{{b{b{c}}}Ah{}}00000000{{{b{Nh}}{b{hBd}}}Bf}0{{{b{Nj}}{b{hBd}}}Bf}0{{{b{Nd}}{b{hBd}}}Bf}{{{b{Nf}}{b{hBd}}}Bf}0{{{b{Nl}}{b{hBd}}}Bf}0{{{b{Lj}}{b{hBd}}}Bf}{{{b{Ll}}{b{hBd}}}Bf}0{{{b{Nn}}{b{hBd}}}Bf}0{ObNh}{cc{}}00{OdNd}111{OdLj}22{NjNn}{{LnNd}Lj}{{{b{Of}}}{{B`{LjNn}}}}{{{b{Ed}}}{{B`{Nfc}}}{}}{Kh{{B`{LjNn}}}}{{{b{Ed}}}{{B`{LnNj}}}}{{{b{Nf}}{b{hc}}}fOh}{{}}0000{{}An}0000000{{}c{}}0000000{LjOd}{{{Bn{Af}}{O`{Ff}}}Nd}{LnLj}{LjLn}{{{b{Nf}}{b{Nf}}}{{Bn{Ab}}}}{{{b{Nd}}}{{Bn{{b{Af}}}}}}{{{b{hNd}}{Bn{Af}}}f}{{{b{hNd}}{Bn{Nf}}}f}{{{b{Nh}}}{{Bn{{b{Df}}}}}}{{{b{Nj}}}{{Bn{{b{Df}}}}}}{{{b{Nl}}}{{Bn{{b{Df}}}}}}{{{b{Ll}}}{{Bn{{b{Df}}}}}}{{{b{Nn}}}{{Bn{{b{Df}}}}}}{{{b{Lj}}}Od}{bc{}}00{{{b{Lj}}{b{Fj}}Oj}{{B`{OfNh}}}}{bCh}00000{{{b{Lj}}}{{Ol{Ch}}}}{{{b{On}}}Ch}{c{{B`{e}}}{}{}}000{Ch{{B`{Nfc}}}{}}1111{{}{{B`{c}}}{}}0000000{bCj}0000000{{{b{Nd}}}{{Bn{{b{Nf}}}}}}{{}c{}}0000000{{Nd{O`{Ff}}}Nd}{{Lj{O`{Ff}}}Lj}{{Nd{Bn{Af}}}Nd}{{Lj{Bn{Af}}}Lj}{{Nd{Bn{Nf}}}Nd}{{Lj{Bn{Nf}}}Lj}{A@`Bn}{A@bBn}{A@dBn}{A@bAn}{A@`A@f}{A@dA@h}{A@`Id}{A@bId}{A@dId}{A@jBn}{A@lBn}{A@jOb}{A@lA@n}{A@jId}{A@lId}{AA`Bn}{AAbBn}{AAdBn}{AA`Md}{AAbMd}{AAdAAf}{AA`Id}{AAbId}{AAdId}{AAhBn}{AAjBn}{AAlBn}{AAnBn}{AB`Bn}{ABbBn}{AAjCh}{AB`Ch}{AAlAn}{AAhCh}{AAnABd}{ABbMd}{AAhId}{AAjId}{AAlId}{AAnId}{AB`Id}{ABbId}````````````````````{{bd}f}{b{{b{Df}}}}{{{b{ABf}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0{{{b{h}}}{{b{hc}}}{}}0{{{b{ABf}}}{{Bn{{b{Df}}}}}}{{{b{ABh}}}ABh}{{b{b{hc}}}f{}}{{bA`}f}{{}{{Ad{c}}}{}}0{{{b{h}}}{{Ad{{b{hc}}}}}{}}0{b{{Ad{{b{c}}}}}{}}0{An{{b{c}}}{}}0{An{{b{hc}}}{}}0{{{b{ABf}}}{{b{Ed}}}}{Anf}0{{{b{ABh}}{b{ABh}}}Ah}{{b{b{c}}}Ah{}}00{{{b{ABh}}{b{hBd}}}Bf}0{{{b{ABf}}{b{hBd}}}Bf}0{cc{}}0{{}}{{}An}0{{}c{}}0{{{b{ABf}}}{{Bn{{b{Df}}}}}}{bc{}}{bCh}0{c{{B`{e}}}{}{}}{Oj{{B`{ABh{ABj{ABh}}}}}}1{c{{B`{ABh{ABj{ABh}}}}}{}}{{}{{B`{c}}}{}}0{bCj}0{{}c{}}0{ABlBn}{ABnBn}{ABlId}{ABnId}{ABnAC`}{{}b}{{{b{{Lh{A`}}}}}Ah}`````````{b{{b{Df}}}}{{{b{En}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}{{{b{h}}}{{b{hc}}}{}}{{{b{En}}}{{Bn{{b{Df}}}}}}{{}{{Ad{c}}}{}}{{{b{h}}}{{Ad{{b{hc}}}}}{}}{b{{Ad{{b{c}}}}}{}}{An{{b{c}}}{}}{An{{b{hc}}}{}}{{{b{En}}}{{b{Ed}}}}{Anf}{{{b{En}}{b{hBd}}}Bf}0{ABfEn}{cc{}}{EjEn}{{}}{{}An}{{}c{}}>{bCh}{c{{B`{e}}}{}{}}{{}{{B`{c}}}{}}{bCj}{{}c{}}{ACbBn}{ACdBn}{ACfBn}{AChBn}{ACjBn}{AClBn}{ACnBn}{AD`Bn}{ACnOl}{ACnABh}{AD`ABh}{AClCh}{ACdEj}{ACfFb}{ACjABf}{AD`ADb}{ACbId}{ACdId}{ACfId}{AChId}{ACjId}{AClId}{ACnId}{AD`Id}{ACbADd}`````````{{}An}`````````````{{bd}f}0{b{{b{Df}}}}{{{b{El}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}00{{{b{h}}}{{b{hc}}}{}}00{{{b{El}}}{{Bn{{b{Df}}}}}}{{{b{ADf}}}ADf}{{{b{Gj}}}Gj}{{b{b{hc}}}f{}}0{{bA`}f}0{{}{{Ad{c}}}{}}00{{{b{h}}}{{Ad{{b{hc}}}}}{}}00{b{{Ad{{b{c}}}}}{}}00{An{{b{c}}}{}}00{An{{b{hc}}}{}}00{{{b{El}}}{{b{Ed}}}}{Anf}00{{{b{ADf}}{b{ADf}}}Ah}{{{b{Gj}}{b{Gj}}}Ah}{{b{b{c}}}Ah{}}00000{{{b{El}}{b{hBd}}}Bf}0{{{b{ADf}}{b{hBd}}}Bf}{{{b{Gj}}{b{hBd}}}Bf}{FbEl}{ADbEl}{cc{}}{ABfEl}11{{}}{{}An}00{{}c{}}00{{{b{El}}}{{Bn{{b{Df}}}}}}{bc{}}0{bCh}{c{{B`{e}}}{}{}}00{{}{{B`{c}}}{}}00{{{b{ADf}}}ABh}{bCj}00{{}c{}}00{ADhLn}{ADhADj}{ADlBn}{ADnBn}{AE`Bn}{AEbBn}{AEdBn}{AEfBn}{AEhBn}{AEjBn}{AElBn}{AEnBn}{ADlABh}{ADnAn}{AEjABh}2{AE`Fb}{AEbADb}{AEdABf}{AEfA@h}{AElABd}{ADlId}{ADnId}{AE`Id}{AEbId}{AEdId}{AEfId}{AEhId}{AEjId}{AElId}{AEnId}{AF`ADj}{AFbCh}{AFdAl}{AF`Ln}1{{}b}```{{}AC`}1``{{bd}f}{b{{b{Df}}}}{{{b{AFf}}}{{Bn{{b{Dj}}}}}}{b{{b{c}}}{}}0{{{b{h}}}{{b{hc}}}{}}0{{{b{AFf}}}{{Bn{{b{Df}}}}}}{{{b{AFh}}}AFh}{{b{b{hc}}}f{}}{{bA`}f}{{}{{Ad{c}}}{}}0{{{b{h}}}{{Ad{{b{hc}}}}}{}}0{b{{Ad{{b{c}}}}}{}}0{{{b{AFh}}Ff{b{Ed}}}{{B`{AFjAFf}}}}{An{{b{c}}}{}}0{An{{b{hc}}}{}}0{{{b{AFf}}}{{b{Ed}}}}{Anf}0{{{b{AFf}}{b{hBd}}}Bf}0{{{b{AFh}}{b{hBd}}}Bf}{cc{}}{AFlAFf}{AFnAFf}{AG`AFf}3{{}}{{}An}0{{}c{}}0{{AGbFh}AFh}{{{b{AFf}}}{{Bn{{b{Df}}}}}}{bc{}}{bCh}{c{{B`{e}}}{}{}}0{{}{{B`{c}}}{}}0{bCj}0{{}c{}}0{AGdBn}{AGfBn}{AGhBn}{AGdAG`}{AGfAFn}{AGhAFl}{AGdId}{AGfId}{AGhId}````````{{}Al}`````````````````````````{{bd}f}00{AGjBn}0{AGlAGn}{AH`AHb}{b{{b{Df}}}}0{b{{b{AHd}}}}{{{b{AHf}}}{{Bn{{b{Dj}}}}}}{{{b{AHh}}}{{Bn{{b{Dj}}}}}}{AHjFf}{b{{b{c}}}{}}00000000000000{{{b{h}}}{{b{hc}}}{}}00000000000000{AHlAHn}999{{{b{AHf}}}{{Bn{{b{Df}}}}}}{{{b{AHh}}}{{Bn{{b{Df}}}}}}{AI`AIb}{{{b{AId}}}{{Bn{{Ol{AIf}}}}}}>{{{b{AIh}}}AIh}{{{b{AIj}}}AIj}{{{b{AHl}}}AHl}{{b{b{hc}}}f{}}00{{bA`}f}00{{}{{Ad{c}}}{}}00000000000000{{{b{h}}}{{Ad{{b{hc}}}}}{}}00000000000000{b{{Ad{{b{c}}}}}{}}00000000000000{AGlAGn}{{}AGl}{{}AIh}{{}{{AIl{ce}}}{AInKd}{AInKd}}{{}AGj}{An{{b{c}}}{}}0{{{b{{AJ`{c}}}}}{{b{e}}}Db{}}1111111111111{An{{b{hc}}}{}}00000000000000{{{b{AHf}}}{{b{Ed}}}}{{{b{AHh}}}{{b{Ed}}}}9999{Anf}00000000000000{{{b{AIj}}{b{AIj}}}Ah}{{b{b{c}}}Ah{}}00{{{b{AGl}}}An}{{{b{AGl}}An}{{Bn{AJb}}}}{{{b{AGl}}{b{hBd}}}Bf}{{{b{AIh}}{b{hBd}}}Bf}{{{b{{AJ`{c}}}}{b{hBd}}}Bf{KdDb}}{{{b{{AIl{ce}}}}{b{hBd}}}BfKdKd}{{{b{{AH`{ce}}}}{b{hBd}}}BfKdKd}{{{b{AHb}}{b{hBd}}}Bf}{{{b{AIj}}{b{hBd}}}Bf}{{{b{AHj}}{b{hBd}}}Bf}{{{b{{AI`{ce}}}}{b{hBd}}}BfKdKd}{{{b{AGj}}{b{hBd}}}Bf}{{{b{AHl}}{b{hBd}}}Bf}{{{b{{AIb{ce}}}}{b{hBd}}}BfKdKd}{{{b{AId}}{b{hBd}}}Bf}{{{b{AHf}}{b{hBd}}}Bf}0{{{b{AHh}}{b{hBd}}}Bf}0{cc{}}0000000000000{AJdAHh}1{AGlAGn}{{{b{AIh}}}{{`{{Cb{}{{Bh{{b{AJf}}}}}}}}}}{{{b{AIh}}}{{`{{Cb{}{{Bh{{Bl{AJf}}}}}}}}}}{{{b{AId}}}{{Bn{Ff}}}}{AH`Ff}{{{b{AId}}}{{Bn{Af}}}}2{AI`Ff}1{{}}0{{}An}00{{cAl}{{B`{{AJ`{c}}}}}{Db{AJl{}{{AJh{AJj}}}}}}111111111111{{}c{}}00000000000000{{{b{AHb}}Ln}Ah}{AH`Bn}{AH`AGj}{AHlBn}{{{b{AId}}}{{b{AIh}}}}{AIlBn}{{{b{AGl}}}{{b{Ed}}}}{{{b{AIh}}}{{b{Ed}}}}{AGlAGn}003{{{b{AId}}}{{Bn{Ff}}}}>4{{{b{{AJ`{c}}}}}f{Db{AJl{}{{AJh{AJj}}}}}}{{{b{{AJ`{c}}}}AJn}{{Bn{{Bl{AJj}}}}}{{AJl{}{{AJh{AJj}}}}DbKd}}3333{AIhBl}{AHjAK`}{AI`AK`}{{{AJ`{c}}}f{Db{AJl{}{{AJh{AJj}}}}}}{AId{{B`{fAHh}}}}{{{b{AHf}}}{{Bn{{b{Df}}}}}}{{{b{AHh}}}{{Bn{{b{Df}}}}}}{{{AIl{ce}}}{{B`{AIdAHf}}}KdKd}{{{b{hAId}}}{{b{h{AKb{{B`{fAHh}}}}}}}}`{AH`Bn}{bc{}}00{bCh}0{c{{B`{e}}}{}{}}00000000000000{{}{{B`{c}}}{}}00000000000000{bCj}00000000000000{AGlAGn}0{{}c{}}00000000000000{AKdOl}{AKfAKh}{AKjFf}{AKlBn}{AKnBn}{AL`Bn}{ALbBn}{ALdBn}{AKjBn}{AKlF`}`{AL`ALf}{ALbF`}{ALdF`}{AKlId}{AKnId}{AL`Id}{ALbId}{ALdId}{AKjId}{ALhBn}{ALjBn}{ALlBn}{ALnBn}{AM`Bn}{ALhF`}{ALlAJd}{ALhId}{ALjId}{ALlId}{ALnId}{AM`Id}{{}AHj}{{}{{AH`{f}}}}{{}{{Gh{{Ol{AIf}}AK`}}}}{{}{{AIl{f}}}}{{}{{AI`{f}}}}","D":"BJj","p":[[1,"reference",null,null,1],[5,"Private",1672],[1,"unit"],[0,"mut"],[5,"RelayMap",0,1673],[5,"RelayNode",0,1673],[5,"RelayQuicConfig",0,1673],[1,"u8"],[6,"Ordering",1674],[5,"Compat",1675],[5,"RelayUrl",1676],[1,"bool"],[5,"PingTracker",0,1677],[5,"Duration",1678],[1,"usize"],[6,"Result",1679,null,1],[10,"Deserializer",1680],[5,"Formatter",1681],[8,"Result",1681],[17,"Item"],[10,"IntoIterator",1682],[5,"Arc",1683,null,1],[6,"Option",1684,null,1],[1,"array"],[10,"Iterator",1685],[1,"u16"],[10,"Serializer",1686],[5,"String",1687],[5,"TypeId",1688],[5,"ClientBuilder",140],[17,"Output"],[10,"Fn",1689],[10,"Send",1690],[10,"Sync",1690],[10,"Error",1691],[6,"SendError",140,1692],[5,"Backtrace",1693],[6,"RecvError",140,1692],[6,"ConnectError",140],[6,"DialError",140],[5,"Client",140],[1,"str"],[5,"ClientSink",140],[5,"ClientStream",140],[6,"Error",1694],[6,"Error",1054],[6,"Error",994],[5,"Error",1695],[5,"Elapsed",1696],[6,"DnsError",440],[6,"SocketAddr",1697],[5,"ClientConfig",1698],[5,"SecretKey",1699],[5,"DnsResolver",440],[10,"Into",1700,null,1],[5,"Pin",1701],[5,"Context",1702],[6,"Poll",1703],[5,"Url",1704],[1,"tuple",null,null,1],[6,"ClientToRelayMsg",1054],[15,"InvalidWebsocketUrl",367],[15,"InvalidRelayUrl",367],[15,"Websocket",367],[15,"Handshake",367],[15,"Dial",367],[15,"UnexpectedUpgradeStatus",367],[15,"Upgrade",367],[15,"InvalidTlsServername",367],[15,"NoLocalAddr",367],[15,"Tls",367],[5,"StatusCode",1705],[5,"Error",1706],[5,"SpanTrace",1707],[15,"InvalidTargetPort",395],[15,"Dns",395],[15,"Timeout",395],[15,"Io",395],[15,"InvalidUrl",395],[15,"ProxyConnectInvalidStatus",395],[15,"ProxyInvalidUrl",395],[15,"ProxyConnect",395],[15,"ProxyInvalidTlsServername",395],[15,"ProxyInvalidTargetPort",395],[15,"Protocol",423],[15,"StreamError",423],[15,"StreamError",429],[15,"ExceedsMaxPacketSize",429],[5,"StaggeredError",440],[10,"Debug",1681],[10,"Display",1681],[5,"TxtLookup",440],[5,"TXT",440],[5,"ResolveError",1708],[8,"TokioResolver",1709],[5,"TxtLookup",1710],[6,"IpAddr",1711],[10,"ToString",1687],[1,"u64"],[1,"slice"],[5,"NodeInfo",610],[6,"LookupError",610],[8,"NodeId",1699],[5,"Name",1712],[8,"Resolving",1712],[5,"Box",1713,null,1],[15,"Timeout",590],[15,"NoResponse",590],[15,"ResolveBoth",590],[15,"MissingHost",590],[15,"Resolve",590],[15,"InvalidResponse",590],[5,"HeaderName",1714],[5,"NodeData",610],[5,"UserData",610],[6,"EncodingError",610],[6,"DecodingError",610],[5,"MaxLengthExceededError",610],[6,"ParseError",610],[5,"BTreeSet",1715],[6,"SignedPacketBuildError",1716],[5,"NodeAddr",1717],[5,"SignedPacket",1716],[10,"Hasher",1718],[1,"u32"],[5,"Vec",1719],[10,"NodeIdExt",610],[15,"InvalidEncodingZ32",872],[15,"InvalidLength",872],[15,"InvalidSignature",872],[6,"Z32Error",1720],[8,"SignatureError",1721],[15,"FailedBuildingPacket",881],[15,"InvalidTxtEntry",881],[6,"SimpleDnsError",1722],[15,"ParseError",887],[15,"LookupFailed",887],[15,"InvalidLabel",887],[5,"ProtoError",1723],[15,"UnexpectedFormat",896],[15,"AttrFromString",896],[15,"NumLabels",896],[15,"Utf8",896],[15,"NotAnIrohRecord",896],[15,"DecodingError",896],[5,"Utf8Error",1724],[6,"FrameTypeError",919],[6,"FrameType",919],[5,"TryFromPrimitiveError",1725],[15,"UnexpectedEnd",987],[15,"UnknownFrameType",987],[5,"VarInt",1726],[15,"ClientAuthHeaderInvalid",1029],[15,"Websocket",1029],[15,"Timeout",1029],[15,"UnexpectedEnd",1029],[15,"FrameTypeError",1029],[15,"ServerDeniedAuth",1029],[15,"UnexpectedFrameType",1029],[15,"DeserializationError",1029],[6,"Error",1727],[5,"HeaderValue",1728],[6,"RelayToClientMsg",1054],[15,"SendPacket",1155],[5,"Bytes",1729],[15,"UnexpectedFrame",1157],[15,"FrameTooLarge",1157],[15,"Timeout",1157],[15,"SerDe",1157],[15,"FrameTypeError",1157],[15,"InvalidPublicKey",1157],[15,"InvalidFrame",1157],[15,"InvalidFrameType",1157],[15,"InvalidProtocolMessageEncoding",1157],[15,"TooSmall",1157],[15,"ReceivedPacket",1186],[15,"Health",1186],[15,"Restarting",1186],[6,"Error",1191],[5,"QuicClient",1191],[5,"Connection",1730],[5,"RecvError",1731],[6,"ConnectionError",1732],[6,"ConnectError",1733],[5,"Endpoint",1734],[15,"Connect",1249],[15,"Connection",1249],[15,"WatchRecv",1249],[5,"Limits",1258],[5,"Metrics",1258,1735],[5,"Counter",1736],[5,"RelayConfig",1258],[6,"AccessConfig",1258],[10,"Iterable",1737],[6,"SpawnError",1258],[6,"SupervisorError",1258],[5,"QuicConfig",1258],[5,"ClientRateLimit",1258],[8,"NonZeroU32",1738],[5,"TlsConfig",1258],[6,"CertConfig",1258],[5,"Server",1258],[5,"CertificateDer",1739],[5,"RelayMetrics",1258,1735],[6,"Access",1258],[5,"ServerConfig",1258],[10,"Default",1740],[5,"ReloadingResolver",1258,1741],[5,"MetricItem",1742],[5,"JoinError",1743],[10,"MetricsGroup",1742],[17,"Value"],[5,"CertifiedKey",1744],[10,"Loader",1745],[5,"ClientHello",1746],[5,"ServerConfig",1746],[5,"AbortOnDropHandle",1747],[15,"Manual",1635],[15,"LetsEncrypt",1635],[5,"AcmeState",1748],[15,"BindTcpListener",1637],[15,"LocalAddr",1637],[15,"QuicSpawn",1637],[15,"TlsHeaderParse",1637],[15,"BindTlsListener",1637],[15,"NoLocalAddr",1637],[5,"InvalidHeaderValue",1728],[15,"Metrics",1655],[15,"AcmeEventStreamFinished",1655],[15,"JoinError",1655],[15,"NoRelayServicesEnabled",1655],[15,"TaskCancelled",1655]],"r":[[0,1054],[1,1677],[2,1673],[3,1673],[4,1673],[5,1673],[6,1673],[7,1673],[8,1677],[9,1673],[10,1673],[11,1673],[12,1677],[13,1673],[14,1673],[15,1673],[17,1673],[18,1673],[19,1673],[20,1673],[21,1673],[22,1673],[23,1673],[24,1673],[25,1673],[26,1673],[27,1673],[28,1673],[29,1673],[30,1677],[31,1673],[32,1673],[33,1673],[34,1677],[35,1673],[36,1673],[37,1673],[38,1677],[39,1673],[40,1673],[41,1673],[42,1673],[43,1677],[44,1673],[45,1677],[47,1677],[48,1673],[49,1673],[50,1673],[51,1677],[52,1673],[53,1673],[54,1673],[55,1673],[56,1673],[58,1677],[59,1673],[60,1673],[61,1673],[62,1673],[63,1673],[64,1673],[65,1673],[66,1673],[67,1673],[68,1673],[69,1673],[70,1673],[71,1673],[72,1673],[73,1673],[74,1673],[75,1677],[76,1673],[77,1673],[78,1673],[79,1673],[80,1673],[81,1677],[82,1673],[83,1673],[84,1673],[85,1673],[86,1673],[87,1673],[88,1673],[89,1673],[90,1673],[92,1677],[93,1673],[94,1673],[95,1673],[96,1677],[97,1673],[98,1673],[99,1673],[100,1673],[101,1673],[102,1677],[103,1677],[105,1673],[106,1673],[107,1673],[108,1677],[109,1673],[112,1673],[113,1673],[114,1673],[116,1677],[117,1673],[118,1673],[119,1673],[120,1673],[121,1673],[122,1677],[123,1673],[124,1673],[125,1673],[126,1677],[127,1673],[128,1673],[129,1673],[130,1677],[131,1673],[132,1673],[133,1673],[134,1673],[135,1673],[136,1677],[137,1673],[138,1673],[139,1673],[148,1692],[157,1692],[163,1692],[164,1692],[165,1692],[166,1692],[174,1692],[175,1692],[178,1692],[179,1692],[182,1692],[183,1692],[190,1692],[191,1692],[198,1692],[199,1692],[205,1692],[206,1692],[213,1692],[214,1692],[221,1692],[222,1692],[230,1692],[231,1692],[238,1692],[239,1692],[246,1692],[247,1692],[250,1692],[251,1692],[258,1692],[259,1692],[260,1692],[261,1692],[270,1692],[271,1692],[272,1692],[273,1692],[274,1692],[287,1692],[288,1692],[291,1692],[292,1692],[300,1692],[301,1692],[321,1692],[322,1692],[329,1692],[330,1692],[333,1692],[334,1692],[341,1692],[342,1692],[351,1692],[352,1692],[359,1692],[360,1692],[1266,1741],[1274,1735],[1281,1735],[1283,1741],[1292,1735],[1297,1735],[1301,1735],[1305,1735],[1306,1735],[1307,1741],[1320,1735],[1321,1735],[1322,1741],[1336,1735],[1337,1735],[1338,1735],[1344,1735],[1347,1735],[1350,1735],[1353,1735],[1354,1735],[1355,1741],[1368,1735],[1369,1735],[1370,1741],[1383,1735],[1384,1735],[1385,1741],[1398,1735],[1399,1735],[1400,1735],[1403,1735],[1404,1735],[1405,1741],[1406,1741],[1419,1735],[1420,1735],[1421,1741],[1436,1735],[1437,1735],[1438,1735],[1439,1735],[1440,1735],[1441,1735],[1442,1741],[1459,1735],[1460,1735],[1461,1735],[1462,1735],[1463,1741],[1478,1735],[1479,1735],[1480,1741],[1494,1735],[1495,1735],[1496,1735],[1505,1735],[1506,1735],[1507,1741],[1508,1741],[1521,1735],[1522,1735],[1523,1741],[1542,1735],[1543,1735],[1544,1735],[1545,1735],[1546,1735],[1551,1741],[1552,1741],[1553,1735],[1554,1735],[1555,1735],[1556,1735],[1557,1735],[1560,1741],[1568,1735],[1573,1735],[1574,1735],[1575,1741],[1588,1735],[1589,1735],[1590,1741],[1603,1735],[1604,1735],[1605,1741],[1618,1735],[1619,1735],[1620,1735],[1621,1735],[1622,1741]],"b":[[76,"impl-Debug-for-RelayMap"],[77,"impl-Display-for-RelayMap"],[78,"impl-Display-for-RelayNode"],[79,"impl-Debug-for-RelayNode"],[82,"impl-From%3CRelayNode%3E-for-RelayMap"],[83,"impl-From%3CRelayUrl%3E-for-RelayMap"],[88,"impl-FromIterator%3CRelayNode%3E-for-RelayMap"],[89,"impl-FromIterator%3CRelayUrl%3E-for-RelayMap"],[258,"impl-Debug-for-SendError"],[259,"impl-Display-for-SendError"],[260,"impl-Display-for-RecvError"],[261,"impl-Debug-for-RecvError"],[262,"impl-Debug-for-ConnectError"],[263,"impl-Display-for-ConnectError"],[264,"impl-Debug-for-DialError"],[265,"impl-Display-for-DialError"],[272,"impl-From%3CError%3E-for-RecvError"],[273,"impl-From%3CError%3E-for-RecvError"],[275,"impl-From%3CDialError%3E-for-ConnectError"],[276,"impl-From%3CError%3E-for-ConnectError"],[277,"impl-From%3CError%3E-for-ConnectError"],[279,"impl-From%3CError%3E-for-DialError"],[280,"impl-From%3CElapsed%3E-for-DialError"],[282,"impl-From%3CDnsError%3E-for-DialError"],[515,"impl-Debug-for-DnsError"],[516,"impl-Display-for-DnsError"],[517,"impl-Display-for-StaggeredError%3CE%3E"],[518,"impl-Debug-for-StaggeredError%3CE%3E"],[521,"impl-Debug-for-TXT"],[522,"impl-Display-for-TXT"],[523,"impl-From%3CElapsed%3E-for-DnsError"],[524,"impl-From%3CResolveError%3E-for-DnsError"],[753,"impl-Debug-for-EncodingError"],[754,"impl-Display-for-EncodingError"],[755,"impl-Debug-for-DecodingError"],[756,"impl-Display-for-DecodingError"],[758,"impl-Debug-for-UserData"],[759,"impl-Display-for-UserData"],[760,"impl-Debug-for-MaxLengthExceededError"],[761,"impl-Display-for-MaxLengthExceededError"],[763,"impl-Debug-for-LookupError"],[764,"impl-Display-for-LookupError"],[765,"impl-Debug-for-ParseError"],[766,"impl-Display-for-ParseError"],[962,"impl-Debug-for-FrameType"],[963,"impl-Display-for-FrameType"],[964,"impl-Display-for-FrameTypeError"],[965,"impl-Debug-for-FrameTypeError"],[1015,"impl-Debug-for-Error"],[1016,"impl-Display-for-Error"],[1017,"impl-From%3CFrameTypeError%3E-for-Error"],[1019,"impl-From%3CError%3E-for-Error"],[1121,"impl-Debug-for-Error"],[1122,"impl-Display-for-Error"],[1125,"impl-From%3CElapsed%3E-for-Error"],[1126,"impl-From%3CError%3E-for-Error"],[1128,"impl-From%3CFrameTypeError%3E-for-Error"],[1224,"impl-Debug-for-Error"],[1225,"impl-Display-for-Error"],[1228,"impl-From%3CRecvError%3E-for-Error"],[1229,"impl-From%3CConnectionError%3E-for-Error"],[1230,"impl-From%3CConnectError%3E-for-Error"],[1474,"impl-Display-for-SpawnError"],[1475,"impl-Debug-for-SpawnError"],[1476,"impl-Debug-for-SupervisorError"],[1477,"impl-Display-for-SupervisorError"]],"c":"OjAAAAAAAAA=","e":"OzAAAAEAADMFagABAAAABgAKABIAGAAsAAEAMAAJADsAAwBAABEAUwAAAFYAAABZAAAAXQADAGsAAQByAAEAdgAQAIkAAwCSAAAAlAAPAKYABwCvADYA5wAoABEBAQAUAQIAGAEBABsBAAAgAQsAOQEHAEIBAwBHAWwAuwEBAL8BAgDEAQAAxgESANoBMwAQAgAAEwIAABUCBgAhAgAALwIAADECEQBEAgkATwIPAGMCBABpAgYAdQIEAHsCAwCAAh8AoQIiAMUCFwDeAiIABAMAAAgDAAALAwAADgMAABEDDQArAwAALwMEADUDAgA5AwUAQQMYAFsDBwBpAykAmgMAAKUDIQDJAwIAzgMSAOQDFgD8AwIAAAQeACEEAQAkBAMAMgQ1AGkEAABsBAMAcwQJAH4EBQCGBBwAqQQBAK8EEQDCBAkAzQQCANEEAgDXBBMA7QQAAO8EAQD2BAAA+QQAAPwEAgAABQAACgUAAAwFAwAUBQQAGgUdADwFAQBBBTUAeAUkAKEFJQDVBQAA2AUBAOAFBADmBQsABwYBABEGAAAbBgEAIQYxAFUGDgBmBh0A","P":[[8,"T"],[17,""],[20,"T"],[23,""],[28,"K"],[30,"T"],[42,""],[47,"T"],[55,"__D"],[58,""],[66,"K"],[75,""],[81,"T"],[82,""],[84,"T"],[85,""],[86,"T"],[90,""],[96,"U"],[100,""],[113,"__S"],[116,""],[117,"T"],[120,""],[122,"U,T"],[126,"U"],[130,""],[136,"V"],[172,""],[173,"S"],[174,""],[182,"T"],[198,""],[203,"T"],[204,""],[205,"T"],[229,""],[230,"T"],[246,""],[271,"T"],[272,""],[274,"T"],[275,""],[278,"T"],[279,""],[281,"T"],[282,""],[283,"T"],[287,""],[300,"U"],[308,""],[311,""],[312,"Sink::Error"],[316,"Stream::Item"],[318,"Sink::Error"],[320,""],[326,"Sink::Error"],[328,"T"],[329,""],[333,"U,T"],[341,"U"],[349,"S"],[351,""],[359,"V"],[367,""],[459,"E"],[460,"T"],[470,""],[471,"E"],[472,""],[476,"T"],[479,""],[482,"T"],[497,""],[498,"T"],[508,""],[509,"E"],[510,""],[517,"E"],[519,""],[525,"T"],[527,""],[528,"T"],[530,""],[531,"T"],[532,""],[539,"U"],[544,"IntoIterator::IntoIter"],[545,""],[551,""],[555,""],[556,""],[561,"E"],[562,"T"],[565,""],[568,"U,T"],[573,"U"],[578,""],[584,"V"],[589,""],[638,""],[639,""],[650,"T"],[666,""],[675,"T"],[678,""],[682,"K"],[683,"T"],[707,""],[709,"T"],[715,"Deref::Target"],[716,"T"],[724,"Deref::Target"],[725,"T"],[727,""],[744,"K"],[753,""],[768,"T"],[771,""],[772,"T"],[775,""],[776,"T"],[778,""],[781,"FromStr::Err"],[782,""],[784,"__H"],[785,""],[798,"U"],[806,""],[820,"T"],[823,""],[832,"U,T"],[836,"TryFrom::Error"],[837,"U,T"],[841,"U"],[849,""],[858,"V"],[866,""],[937,"T"],[941,""],[943,"T"],[944,""],[945,"T"],[955,""],[959,"K"],[962,""],[966,"T"],[968,""],[971,"U"],[973,""],[974,"T"],[975,""],[977,"U,T"],[978,""],[979,"U,T"],[980,"TryFromPrimitive::Primitive"],[981,"U"],[983,""],[985,"V"],[987,""],[1005,"T"],[1007,""],[1008,"T"],[1013,""],[1018,"T"],[1019,""],[1022,"U"],[1023,""],[1025,"U,T"],[1026,"U"],[1027,""],[1028,"V"],[1029,""],[1081,"T"],[1087,""],[1090,"T"],[1092,""],[1094,"T"],[1109,""],[1115,"K"],[1121,""],[1127,"T"],[1128,""],[1129,"T"],[1131,""],[1135,"U"],[1138,""],[1139,"T"],[1141,""],[1142,"U,T"],[1145,"U"],[1148,""],[1152,"V"],[1155,""],[1202,"T"],[1206,""],[1208,"T"],[1209,""],[1210,"T"],[1216,""],[1217,"T"],[1221,""],[1227,"T"],[1228,""],[1231,"T"],[1232,""],[1235,"U"],[1237,""],[1239,"T"],[1240,""],[1241,"U,T"],[1243,"U"],[1245,""],[1247,"V"],[1249,""],[1305,"T"],[1335,""],[1347,"T"],[1350,""],[1353,"T"],[1398,""],[1401,"EC,EA"],[1402,""],[1403,"T"],[1405,"Loader,Deref::Target"],[1406,"T"],[1434,""],[1456,"K"],[1459,""],[1463,"Loader"],[1464,"EC,EA"],[1466,""],[1469,"EC,EA"],[1470,""],[1472,"EC,EA"],[1473,""],[1478,"T"],[1492,""],[1493,"T"],[1494,""],[1508,"Loader"],[1509,""],[1521,"U"],[1536,""],[1551,"Loader"],[1553,""],[1560,"Loader"],[1561,""],[1564,"EC,EA"],[1565,""],[1568,"T"],[1571,""],[1573,"U,T"],[1588,"U"],[1603,""],[1620,"V"],[1635,""]]}]]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); -//{"start":39,"fragment_lengths":[446,110829,11257,6900,11823,44229]} \ No newline at end of file +//{"start":39,"fragment_lengths":[446,110829,11257,6900,11823,43858]} \ No newline at end of file diff --git a/pr/3331/docs/search.desc/iroh_relay/iroh_relay-desc-0-.js b/pr/3331/docs/search.desc/iroh_relay/iroh_relay-desc-0-.js index a166aa7bcf..7ece2d1378 100644 --- a/pr/3331/docs/search.desc/iroh_relay/iroh_relay-desc-0-.js +++ b/pr/3331/docs/search.desc/iroh_relay/iroh_relay-desc-0-.js @@ -1 +1 @@ -searchState.loadedDescShard("iroh_relay", 0, "Iroh’s relay is a feature within iroh, a peer-to-peer …\nTracks pings on a single relay connection.\nConfiguration of all the relay servers that can be used.\nInformation on a specific relay server.\nConfiguration for speaking to the QUIC endpoint on the …\nExposes Client, which allows to establish connections to a …\nIs this a known node?\nReturns the current timeout set for pings.\nDefault values used in the relay.\nDNS resolver\nCreate an empty relay map.\nReturns the argument unchanged.\nCreates a RelayMap from a RelayUrl.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreates a RelayMap from an iterator of RelayUrl.\nGet the given node.\nHTTP-specific constants for the relay server and client.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nAre there any nodes in this map?\nHow many nodes are known?\nCreates a new ping tracker, setting the ping timeout for …\nStarts a new ping.\nSupport for handling DNS resource records for dialing by …\nReturns an Iterator over all known nodes.\nUpdates the ping tracker with a received pong.\nThe port on which the connection should be bound to.\nProtocols used by the iroh-relay\nCreate a QUIC server that accepts connections for QUIC …\nConfiguration to speak to the QUIC endpoint on the relay …\nA fully-fledged iroh-relay server over HTTP or HTTPS.\nCancel-safe waiting for a ping timeout.\nThe RelayUrl where this relay server can be dialed.\nReturns the sorted relay URLs.\nA relay client.\nBuild a Client.\nThe send half of a relay client.\nThe receive half of a relay client.\nConnection errors.\nErrors that can occur while dialing the relay server.\nErrors when receiving messages from the relay server.\nError for sending messages to the relay server.\nReturns if we should prefer ipv6 it replaces the …\nEstablishes a new connection to the relay server.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nSkip the verification of the relay server’s SSL …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nSet the capacity of the cache for public keys.\nReturns the local address of the client.\nCreates a client config that trusts any servers without …\nCreate a new ClientBuilder\nSet an explicit proxy url to proxy all HTTP(S) traffic …\nSplits the client into a sink and a stream.\nThe default HTTPS port used by the Relay server.\nThe default HTTP port used by the Relay server.\nThe default capacity of the key cache for the relay server.\nThe default metrics port used by the Relay server.\nThe default QUIC port used by the Relay server to accept …\nPotential errors related to dns.\nThe DNS resolver used throughout iroh.\nThe n0 testing DNS node origin, for production.\nThe n0 testing DNS node origin, for testing.\nError returned when an input value is too long for …\nRecord data for a TXT record\nTXT records returned from DnsResolver::lookup_txt\nRemoves all entries from the cache.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nPerform an ipv4 lookup with a timeout.\nResolve IPv4 and IPv6 in parallel with a timeout.\nRace an ipv4 and ipv6 lookup with a timeout in a staggered …\nPerform an ipv4 lookup with a timeout in a staggered …\nPerform an ipv6 lookup with a timeout.\nPerform an ipv6 lookup with a timeout in a staggered …\nLooks up node info by DNS name.\nLooks up node info by DNS name in a staggered fashion.\nLooks up node info by NodeId and origin domain name.\nLooks up node info by NodeId and origin domain name.\nLookup a TXT record.\nCreate a new DNS resolver with sensible cross-platform …\nRecreate the inner resolver\nResolve a hostname from a URL to an IP address.\nReturns the raw character strings of this TXT record.\nCreate a new DNS resolver configured with a single UDP DNS …\nThe HTTP header name for relay client authentication\nThe HTTP path under which the relay accepts relaying …\nThe HTTP path under which the relay allows doing latency …\nThe websocket sub-protocol version that we currently …\nThe DNS name for the iroh TXT record.\nThe max byte length allowed for user-defined data.\nError returned when an input value is too long for UserData…\nData about a node that may be published to and resolved …\nExtension methods for NodeId to encode to and decode from …\nInformation about a node that may be published to and …\nUnder the hood this is a UTF-8 String is no longer than …\nAdds direct addresses to the node data.\nRemoves all direct addresses from the node data.\nThe information published about the node.\nReturns the direct addresses of the node.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreates a new NodeInfo from its parts.\nParses a NodeInfo from a pkarr::SignedPacket.\nParses a NodeInfo from a TXT records lookup.\nParses a NodeId from [z-base-32] encoding.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nConverts into a NodeAddr without cloning.\nCreates a new NodeData with a relay URL and a set of …\nCreates a new NodeInfo with an empty NodeData.\nThe NodeId of the node this is about.\nReturns the relay URL of the node.\nSets the relay URL of the node data.\nSets the user-defined data of the node data.\nConverts into a NodeAddr by cloning the needed fields.\nCreates a pkarr::SignedPacket.\nConverts into a list of {key}={value} strings.\nEncodes a NodeId in [z-base-32] encoding.\nReturns the optional user-defined data of the node.\nSets the direct addresses and returns the updated node …\nSets the direct addresses and returns the updated node …\nSets the relay URL and returns the updated node data.\nSets the relay URL and returns the updated node info.\nSets the user-defined data and returns the updated node …\nSets the user-defined data and returns the updated node …\nCommon types between the super::handshake and super::relay …\nThis module exports looks_like_disco_wrapper as the only …\nImplements the handshake protocol that iroh’s relays and …\nThis module implements the send/recv relaying protocol.\nImplements logic for abstracting over a websocket stream …\nThe client frame type for the authentication frame\n32B dest pub key + ECN byte + segment size u16 + datagrams …\nPossible frame types during handshaking\nSent from server to client to tell the client if their …\nSent from server to client to signal that a previous …\nMessages with these frames will be ignored. 8 byte ping …\n8 byte payload, the contents of ping being replied to\n32B src pub key + ECN byte + segment size u16 + datagrams …\nSent from server to client for the server to declare that …\nThe server frame type for the challenge response\nThe server frame type for authentication confirmation\nThe server frame type for authentication denial\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nThe 6 byte header of all discovery messages.\nReports whether p looks like it’s a packet containing an …\nFailed to deserialize client auth header\nReturns the argument unchanged.\nCalls U::from(self).\nMessages that clients send to relays.\nOne or multiple datagrams being transferred via the relay.\nRepresents datagrams sent from relays (originally sent to …\nRequest from the client to relay datagrams to given remote …\nProtocol send errors.\nA one-way message from relay to client, declaring the …\nThe maximum size of a packet sent over relay. (This only …\nMaximum size a datagram payload is allowed to be.\nIndicates that the client identified by the underlying …\nRequest from the relay to reply to the other side with a …\nRequest from the client to the server to reply to the …\nReply to a ClientToRelayMsg::Ping from a client with the …\nReply to a RelayToClientMsg::Ping from a server with the …\nThe messages that a relay sends to clients or the clients …\nA one-way message from relay to client, advertising that …\nThe contents of the datagram(s)\nExplicit congestion notification bits\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nThe segment size if this transmission contains multiple …\nReturns this frame’s corresponding frame type.\nThe datagrams and related metadata to relay.\nThe remote node to relay to.\nThe datagrams and related metadata.\nIf set, is a description of why the connection is …\nAn advisory duration that the client should wait before …\nThe NodeId of the original sender.\nAn advisory duration for how long the client should …\nALPN for our quic addr discovery\nQuic client related errors.\nEndpoint close error code\nEndpoint close reason\nHandles the client side of QUIC address discovery.\nCreate a connection usable for qad\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCreate a new QuicClient to handle the client side of QUIC …\nAccess restriction for a node.\nControls which nodes are allowed to use the relay.\nAccess is allowed.\nTLS certificate configuration.\nPer-client rate limit configuration.\nThe default certificate reload interval.\nAccess is denied.\nEveryone\nUse Let’s Encrypt.\nRate limits.\nUse a static TLS key and certificate chain.\nMetrics tracked for the relay server\nConfiguration for the QUIC server.\nConfiguration for the Relay HTTP and HTTPS server.\nAll metrics tracked in the relay server.\nUse a TLS key and certificate chain that can be reloaded.\nA Certificate resolver that reloads the certificate every …\nOnly nodes for which the function returns Access::Allow.\nA running Relay + QAD server.\nConfiguration for the full Relay.\nServer spawn errors\nServer task errors\nTLS configuration for Relay server.\nBurst limit for accepting new connection. Unlimited if not …\nRate limit for accepting new connection. Unlimited if not …\nNumber of times this server has accepted a connection.\nAccess configuration.\nThe socket address on which the QUIC server should bind.\nMax number of bytes per second to read from the client …\nBytes received from a FrameType::SendPacket\nNumber of bytes received from client connection which have …\nBytes sent from a FrameType::SendPacket\nMode for getting a cert.\nThe certificates chain if configured with manual TLS …\nRate limits for incoming traffic from a client connection.\nNumber of client connections which have had any frames …\nFrameType::SendPacket dropped that are disco messages\nFrameType::SendPacket received that are disco messages\nFrameType::SendPacket sent that are disco messages\nNumber of connections we have removed because of an error\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nNumber of FrameType::Pings received\nThe socket address the HTTP server is listening on.\nThe socket address on which the Relay HTTP server should …\nGet the server’s http RelayUrl.\nThe socket address the HTTPS server is listening on.\nThe socket address on which to serve the HTTPS server.\nGet the server’s https RelayUrl.\nPerform the initial load and construct the …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nIs this node allowed?\nKey cache capacity.\nRate limits.\nMax number of bytes to read in a single burst.\nReturns the metrics collected in the relay server.\nSocket to serve metrics on.\nPackets of other FrameTypes dropped\nPackets of other FrameTypes received\nPackets of other FrameTypes sent\nConfiguration for the QUIC server, disabled if None.\nThe socket address the QUIC server is listening on.\nThe socket address on which to server the QUIC server is …\nConfiguration for the Relay server, disabled if None.\nReload the certificate.\nFrameType::SendPacket dropped, that are not disco messages\nFrameType::SendPacket received, that are not disco messages\nFrameType::SendPacket sent, that are not disco messages\nNumber of FrameType::Pongs sent\nMetrics tracked for the relay server.\nThe TLS server configuration for the QUIC server.\nThe server configuration.\nShutdown the resolver.\nRequests graceful shutdown.\nStarts the server.\nReturns the handle for the task.\nExposes functions to quickly configure a server suitable …\nTLS configuration for the HTTPS server.\nNumber of unique client keys per day\nNumber of FrameType::Unknown received\nThe TLS certificate chain.\nState for Let’s Encrypt certificates.\nCreates a QuicConfig suitable for testing.\nCreates a RelayConfig suitable for testing.\nCreates a rustls::ServerConfig and certificates suitable …\nCreates a ServerConfig suitable for testing.\nCreates a TlsConfig suitable for testing.") \ No newline at end of file +searchState.loadedDescShard("iroh_relay", 0, "Iroh’s relay is a feature within iroh, a peer-to-peer …\nTracks pings on a single relay connection.\nConfiguration of all the relay servers that can be used.\nInformation on a specific relay server.\nConfiguration for speaking to the QUIC endpoint on the …\nExposes Client, which allows to establish connections to a …\nIs this a known node?\nReturns the current timeout set for pings.\nDefault values used in the relay.\nDNS resolver\nCreate an empty relay map.\nReturns the argument unchanged.\nCreates a RelayMap from a RelayUrl.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreates a RelayMap from an iterator of RelayUrl.\nGet the given node.\nHTTP-specific constants for the relay server and client.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nAre there any nodes in this map?\nHow many nodes are known?\nCreates a new ping tracker, setting the ping timeout for …\nStarts a new ping.\nSupport for handling DNS resource records for dialing by …\nReturns an Iterator over all known nodes.\nUpdates the ping tracker with a received pong.\nThe port on which the connection should be bound to.\nProtocols used by the iroh-relay\nCreate a QUIC server that accepts connections for QUIC …\nConfiguration to speak to the QUIC endpoint on the relay …\nA fully-fledged iroh-relay server over HTTP or HTTPS.\nCancel-safe waiting for a ping timeout.\nThe RelayUrl where this relay server can be dialed.\nReturns the sorted relay URLs.\nA relay client.\nBuild a Client.\nThe send half of a relay client.\nThe receive half of a relay client.\nConnection errors.\nErrors that can occur while dialing the relay server.\nErrors when receiving messages from the relay server.\nError for sending messages to the relay server.\nReturns if we should prefer ipv6 it replaces the …\nEstablishes a new connection to the relay server.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nSkip the verification of the relay server’s SSL …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nSet the capacity of the cache for public keys.\nReturns the local address of the client.\nCreates a client config that trusts any servers without …\nCreate a new ClientBuilder\nSet an explicit proxy url to proxy all HTTP(S) traffic …\nSplits the client into a sink and a stream.\nThe default HTTPS port used by the Relay server.\nThe default HTTP port used by the Relay server.\nThe default capacity of the key cache for the relay server.\nThe default metrics port used by the Relay server.\nThe default QUIC port used by the Relay server to accept …\nPotential errors related to dns.\nThe DNS resolver used throughout iroh.\nThe n0 testing DNS node origin, for production.\nThe n0 testing DNS node origin, for testing.\nError returned when an input value is too long for …\nRecord data for a TXT record\nTXT records returned from DnsResolver::lookup_txt\nRemoves all entries from the cache.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nPerform an ipv4 lookup with a timeout.\nResolve IPv4 and IPv6 in parallel with a timeout.\nRace an ipv4 and ipv6 lookup with a timeout in a staggered …\nPerform an ipv4 lookup with a timeout in a staggered …\nPerform an ipv6 lookup with a timeout.\nPerform an ipv6 lookup with a timeout in a staggered …\nLooks up node info by DNS name.\nLooks up node info by DNS name in a staggered fashion.\nLooks up node info by NodeId and origin domain name.\nLooks up node info by NodeId and origin domain name.\nLookup a TXT record.\nCreate a new DNS resolver with sensible cross-platform …\nRecreate the inner resolver\nResolve a hostname from a URL to an IP address.\nReturns the raw character strings of this TXT record.\nCreate a new DNS resolver configured with a single UDP DNS …\nThe HTTP header name for relay client authentication\nThe HTTP path under which the relay accepts relaying …\nThe HTTP path under which the relay allows doing latency …\nThe websocket sub-protocol version that we currently …\nThe DNS name for the iroh TXT record.\nThe max byte length allowed for user-defined data.\nError returned when an input value is too long for UserData…\nData about a node that may be published to and resolved …\nExtension methods for NodeId to encode to and decode from …\nInformation about a node that may be published to and …\nUnder the hood this is a UTF-8 String is no longer than …\nAdds direct addresses to the node data.\nRemoves all direct addresses from the node data.\nThe information published about the node.\nReturns the direct addresses of the node.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCreates a new NodeInfo from its parts.\nParses a NodeInfo from a pkarr::SignedPacket.\nParses a NodeInfo from a TXT records lookup.\nParses a NodeId from [z-base-32] encoding.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nConverts into a NodeAddr without cloning.\nCreates a new NodeData with a relay URL and a set of …\nCreates a new NodeInfo with an empty NodeData.\nThe NodeId of the node this is about.\nReturns the relay URL of the node.\nSets the relay URL of the node data.\nSets the user-defined data of the node data.\nConverts into a NodeAddr by cloning the needed fields.\nCreates a pkarr::SignedPacket.\nConverts into a list of {key}={value} strings.\nEncodes a NodeId in [z-base-32] encoding.\nReturns the optional user-defined data of the node.\nSets the direct addresses and returns the updated node …\nSets the direct addresses and returns the updated node …\nSets the relay URL and returns the updated node data.\nSets the relay URL and returns the updated node info.\nSets the user-defined data and returns the updated node …\nSets the user-defined data and returns the updated node …\nCommon types between the super::handshake and super::relay …\nThis module exports looks_like_disco_wrapper as the only …\nImplements the handshake protocol that iroh’s relays and …\nThis module implements the send/recv relaying protocol.\nImplements logic for abstracting over a websocket stream …\nThe client frame type for the authentication frame\nPossible frame types during handshaking\nSent from server to client to tell the client if their …\nSent from server to client to signal that a previous …\nMessages with these frames will be ignored. 8 byte ping …\n8 byte payload, the contents of ping being replied to\n32B src pub key + ECN byte + segment size u16 + datagrams …\nSent from server to client for the server to declare that …\n32B dest pub key + ECN byte + segment size u16 + datagrams …\nThe server frame type for the challenge response\nThe server frame type for authentication confirmation\nThe server frame type for authentication denial\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nThe 6 byte header of all discovery messages.\nReports whether p looks like it’s a packet containing an …\nFailed to deserialize client auth header\nReturns the argument unchanged.\nCalls U::from(self).\nMessages that clients send to relays.\nProtocol send errors.\nA one-way message from relay to client, declaring the …\nThe maximum size of a packet sent over relay. (This only …\nIndicates that the client identified by the underlying …\nRequest from the relay to reply to the other side with a …\nRequest from the client to the server to reply to the …\nReply to a ClientToRelayMsg::Ping from a client with the …\nReply to a RelayToClientMsg::Ping from a server with the …\nRepresents datagrams sent from relays (originally sent to …\nThe messages that a relay sends to clients or the clients …\nA one-way message from relay to client, advertising that …\nRequest from the client to relay datagrams to given remote …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns this frame’s corresponding frame type.\nThe remote node to relay to.\nThe datagrams and related metadata to relay.\nThe received packet bytes.\nIf set, is a description of why the connection is …\nAn advisory duration that the client should wait before …\nThe NodeId of the original sender.\nAn advisory duration for how long the client should …\nALPN for our quic addr discovery\nQuic client related errors.\nEndpoint close error code\nEndpoint close reason\nHandles the client side of QUIC address discovery.\nCreate a connection usable for qad\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCreate a new QuicClient to handle the client side of QUIC …\nAccess restriction for a node.\nControls which nodes are allowed to use the relay.\nAccess is allowed.\nTLS certificate configuration.\nPer-client rate limit configuration.\nThe default certificate reload interval.\nAccess is denied.\nEveryone\nUse Let’s Encrypt.\nRate limits.\nUse a static TLS key and certificate chain.\nMetrics tracked for the relay server\nConfiguration for the QUIC server.\nConfiguration for the Relay HTTP and HTTPS server.\nAll metrics tracked in the relay server.\nUse a TLS key and certificate chain that can be reloaded.\nA Certificate resolver that reloads the certificate every …\nOnly nodes for which the function returns Access::Allow.\nA running Relay + QAD server.\nConfiguration for the full Relay.\nServer spawn errors\nServer task errors\nTLS configuration for Relay server.\nBurst limit for accepting new connection. Unlimited if not …\nRate limit for accepting new connection. Unlimited if not …\nNumber of times this server has accepted a connection.\nAccess configuration.\nThe socket address on which the QUIC server should bind.\nMax number of bytes per second to read from the client …\nBytes received from a FrameType::SendPacket\nNumber of bytes received from client connection which have …\nBytes sent from a FrameType::SendPacket\nMode for getting a cert.\nThe certificates chain if configured with manual TLS …\nRate limits for incoming traffic from a client connection.\nNumber of client connections which have had any frames …\nFrameType::SendPacket dropped that are disco messages\nFrameType::SendPacket received that are disco messages\nFrameType::SendPacket sent that are disco messages\nNumber of connections we have removed because of an error\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nNumber of FrameType::Pings received\nThe socket address the HTTP server is listening on.\nThe socket address on which the Relay HTTP server should …\nGet the server’s http RelayUrl.\nThe socket address the HTTPS server is listening on.\nThe socket address on which to serve the HTTPS server.\nGet the server’s https RelayUrl.\nPerform the initial load and construct the …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nIs this node allowed?\nKey cache capacity.\nRate limits.\nMax number of bytes to read in a single burst.\nReturns the metrics collected in the relay server.\nSocket to serve metrics on.\nPackets of other FrameTypes dropped\nPackets of other FrameTypes received\nPackets of other FrameTypes sent\nConfiguration for the QUIC server, disabled if None.\nThe socket address the QUIC server is listening on.\nThe socket address on which to server the QUIC server is …\nConfiguration for the Relay server, disabled if None.\nReload the certificate.\nFrameType::SendPacket dropped, that are not disco messages\nFrameType::SendPacket received, that are not disco messages\nFrameType::SendPacket sent, that are not disco messages\nNumber of FrameType::Pongs sent\nMetrics tracked for the relay server.\nThe TLS server configuration for the QUIC server.\nThe server configuration.\nShutdown the resolver.\nRequests graceful shutdown.\nStarts the server.\nReturns the handle for the task.\nExposes functions to quickly configure a server suitable …\nTLS configuration for the HTTPS server.\nNumber of unique client keys per day\nNumber of FrameType::Unknown received\nThe TLS certificate chain.\nState for Let’s Encrypt certificates.\nCreates a QuicConfig suitable for testing.\nCreates a RelayConfig suitable for testing.\nCreates a rustls::ServerConfig and certificates suitable …\nCreates a ServerConfig suitable for testing.\nCreates a TlsConfig suitable for testing.") \ No newline at end of file diff --git a/pr/3331/docs/src/iroh/magicsock.rs.html b/pr/3331/docs/src/iroh/magicsock.rs.html index ea9264069a..e2acecdfd8 100644 --- a/pr/3331/docs/src/iroh/magicsock.rs.html +++ b/pr/3331/docs/src/iroh/magicsock.rs.html @@ -148,3167 +148,3171 @@ 148 pub(crate) metrics: EndpointMetrics, 149} 150 -151/// Handle for [`MagicSock`]. -152/// -153/// Dereferences to [`MagicSock`], and handles closing. -154#[derive(Clone, Debug, derive_more::Deref)] -155pub(crate) struct Handle { -156 #[deref(forward)] -157 msock: Arc<MagicSock>, -158 // empty when shutdown -159 actor_task: Arc<Mutex<Option<AbortOnDropHandle<()>>>>, -160 /// Token to cancel the actor task. -161 actor_token: CancellationToken, -162 // quinn endpoint -163 endpoint: quinn::Endpoint, -164} -165 -166/// Iroh connectivity layer. -167/// -168/// This is responsible for routing packets to nodes based on node IDs, it will initially -169/// route packets via a relay and transparently try and establish a node-to-node -170/// connection and upgrade to it. It will also keep looking for better connections as the -171/// network details of both nodes change. -172/// -173/// It is usually only necessary to use a single [`MagicSock`] instance in an application, it -174/// means any QUIC endpoints on top will be sharing as much information about nodes as -175/// possible. -176#[derive(Debug)] -177pub(crate) struct MagicSock { -178 /// Channel to send to the internal actor. -179 actor_sender: mpsc::Sender<ActorMessage>, -180 /// NodeId of this node. -181 public_key: PublicKey, -182 -183 // - State Management -184 /// Close is in progress (or done) -185 closing: AtomicBool, -186 /// Close was called. -187 closed: AtomicBool, -188 -189 // - Networking Info -190 /// Our discovered direct addresses. -191 direct_addrs: DiscoveredDirectAddrs, -192 /// Our latest net-report -193 net_report: Watchable<(Option<Report>, UpdateReason)>, -194 /// If the last net_report report, reports IPv6 to be available. -195 ipv6_reported: Arc<AtomicBool>, -196 /// Tracks the networkmap node entity for each node discovery key. -197 node_map: NodeMap, -198 /// Tracks the mapped IP addresses -199 ip_mapped_addrs: IpMappedAddresses, -200 /// Local addresses -201 local_addrs_watch: LocalAddrsWatch, -202 /// Currently bound IP addresses of all sockets -203 #[cfg(not(wasm_browser))] -204 ip_bind_addrs: Vec<SocketAddr>, -205 /// The DNS resolver to be used in this magicsock. -206 #[cfg(not(wasm_browser))] -207 dns_resolver: DnsResolver, -208 -209 /// Disco -210 disco: DiscoState, -211 -212 // - Discovery -213 /// Optional discovery service -214 discovery: Option<Box<dyn Discovery>>, -215 /// Optional user-defined discover data. -216 discovery_user_data: RwLock<Option<UserData>>, -217 /// Broadcast channel for listening to discovery updates. -218 discovery_subscribers: DiscoverySubscribers, -219 -220 /// Metrics -221 pub(crate) metrics: EndpointMetrics, -222} +151/// Contents of a relay message. Use a SmallVec to avoid allocations for the very +152/// common case of a single packet. +153type RelayContents = SmallVec<[Bytes; 1]>; +154 +155/// Handle for [`MagicSock`]. +156/// +157/// Dereferences to [`MagicSock`], and handles closing. +158#[derive(Clone, Debug, derive_more::Deref)] +159pub(crate) struct Handle { +160 #[deref(forward)] +161 msock: Arc<MagicSock>, +162 // empty when shutdown +163 actor_task: Arc<Mutex<Option<AbortOnDropHandle<()>>>>, +164 /// Token to cancel the actor task. +165 actor_token: CancellationToken, +166 // quinn endpoint +167 endpoint: quinn::Endpoint, +168} +169 +170/// Iroh connectivity layer. +171/// +172/// This is responsible for routing packets to nodes based on node IDs, it will initially +173/// route packets via a relay and transparently try and establish a node-to-node +174/// connection and upgrade to it. It will also keep looking for better connections as the +175/// network details of both nodes change. +176/// +177/// It is usually only necessary to use a single [`MagicSock`] instance in an application, it +178/// means any QUIC endpoints on top will be sharing as much information about nodes as +179/// possible. +180#[derive(Debug)] +181pub(crate) struct MagicSock { +182 /// Channel to send to the internal actor. +183 actor_sender: mpsc::Sender<ActorMessage>, +184 /// NodeId of this node. +185 public_key: PublicKey, +186 +187 // - State Management +188 /// Close is in progress (or done) +189 closing: AtomicBool, +190 /// Close was called. +191 closed: AtomicBool, +192 +193 // - Networking Info +194 /// Our discovered direct addresses. +195 direct_addrs: DiscoveredDirectAddrs, +196 /// Our latest net-report +197 net_report: Watchable<(Option<Report>, UpdateReason)>, +198 /// If the last net_report report, reports IPv6 to be available. +199 ipv6_reported: Arc<AtomicBool>, +200 /// Tracks the networkmap node entity for each node discovery key. +201 node_map: NodeMap, +202 /// Tracks the mapped IP addresses +203 ip_mapped_addrs: IpMappedAddresses, +204 /// Local addresses +205 local_addrs_watch: LocalAddrsWatch, +206 /// Currently bound IP addresses of all sockets +207 #[cfg(not(wasm_browser))] +208 ip_bind_addrs: Vec<SocketAddr>, +209 /// The DNS resolver to be used in this magicsock. +210 #[cfg(not(wasm_browser))] +211 dns_resolver: DnsResolver, +212 +213 /// Disco +214 disco: DiscoState, +215 +216 // - Discovery +217 /// Optional discovery service +218 discovery: Option<Box<dyn Discovery>>, +219 /// Optional user-defined discover data. +220 discovery_user_data: RwLock<Option<UserData>>, +221 /// Broadcast channel for listening to discovery updates. +222 discovery_subscribers: DiscoverySubscribers, 223 -224#[allow(missing_docs)] -225#[common_fields({ -226 backtrace: Option<snafu::Backtrace>, -227 #[snafu(implicit)] -228 span_trace: n0_snafu::SpanTrace, -229})] -230#[derive(Debug, Snafu)] -231#[snafu(visibility(pub(crate)))] -232#[non_exhaustive] -233pub enum AddNodeAddrError { -234 #[snafu(display("Empty addressing info"))] -235 Empty {}, -236 #[snafu(display("Empty addressing info, {pruned} direct address have been pruned"))] -237 EmptyPruned { pruned: usize }, -238 #[snafu(display("Adding our own address is not supported"))] -239 OwnAddress {}, -240} -241 -242impl MagicSock { -243 /// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`]. -244 pub(crate) async fn spawn(opts: Options) -> Result<Handle, CreateHandleError> { -245 Handle::new(opts).await -246 } -247 -248 /// Returns the relay node we are connected to, that has the best latency. -249 /// -250 /// If `None`, then we are not connected to any relay nodes. -251 pub(crate) fn my_relay(&self) -> Option<RelayUrl> { -252 self.local_addr().into_iter().find_map(|a| { -253 if let transports::Addr::Relay(url, _) = a { -254 Some(url) -255 } else { -256 None -257 } -258 }) -259 } -260 -261 fn is_closing(&self) -> bool { -262 self.closing.load(Ordering::Relaxed) +224 /// Metrics +225 pub(crate) metrics: EndpointMetrics, +226} +227 +228#[allow(missing_docs)] +229#[common_fields({ +230 backtrace: Option<snafu::Backtrace>, +231 #[snafu(implicit)] +232 span_trace: n0_snafu::SpanTrace, +233})] +234#[derive(Debug, Snafu)] +235#[snafu(visibility(pub(crate)))] +236#[non_exhaustive] +237pub enum AddNodeAddrError { +238 #[snafu(display("Empty addressing info"))] +239 Empty {}, +240 #[snafu(display("Empty addressing info, {pruned} direct address have been pruned"))] +241 EmptyPruned { pruned: usize }, +242 #[snafu(display("Adding our own address is not supported"))] +243 OwnAddress {}, +244} +245 +246impl MagicSock { +247 /// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`]. +248 pub(crate) async fn spawn(opts: Options) -> Result<Handle, CreateHandleError> { +249 Handle::new(opts).await +250 } +251 +252 /// Returns the relay node we are connected to, that has the best latency. +253 /// +254 /// If `None`, then we are not connected to any relay nodes. +255 pub(crate) fn my_relay(&self) -> Option<RelayUrl> { +256 self.local_addr().into_iter().find_map(|a| { +257 if let transports::Addr::Relay(url, _) = a { +258 Some(url) +259 } else { +260 None +261 } +262 }) 263 } 264 -265 pub(crate) fn is_closed(&self) -> bool { -266 self.closed.load(Ordering::SeqCst) +265 fn is_closing(&self) -> bool { +266 self.closing.load(Ordering::Relaxed) 267 } 268 -269 /// Get the cached version of addresses. -270 pub(crate) fn local_addr(&self) -> Vec<transports::Addr> { -271 self.local_addrs_watch.get().expect("disconnected") -272 } -273 -274 #[cfg(not(wasm_browser))] -275 fn ip_bind_addrs(&self) -> &[SocketAddr] { -276 &self.ip_bind_addrs -277 } -278 -279 fn ip_local_addrs(&self) -> impl Iterator<Item = SocketAddr> { -280 self.local_addr() -281 .into_iter() -282 .filter_map(|addr| addr.into_socket_addr()) -283 } -284 -285 /// Returns `true` if we have at least one candidate address where we can send packets to. -286 pub(crate) fn has_send_address(&self, node_key: PublicKey) -> bool { -287 self.remote_info(node_key) -288 .map(|info| info.has_send_address()) -289 .unwrap_or(false) -290 } -291 -292 /// Return the [`RemoteInfo`]s of all nodes in the node map. -293 pub(crate) fn list_remote_infos(&self) -> Vec<RemoteInfo> { -294 self.node_map.list_remote_infos(Instant::now()) -295 } -296 -297 /// Return the [`RemoteInfo`] for a single node in the node map. -298 pub(crate) fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo> { -299 self.node_map.remote_info(node_id) -300 } -301 -302 /// Returns a [`Watcher`] for this socket's direct addresses. -303 /// -304 /// The [`MagicSock`] continuously monitors the direct addresses, the network addresses -305 /// it might be able to be contacted on, for changes. Whenever changes are detected -306 /// this [`Watcher`] will yield a new list of addresses. +269 pub(crate) fn is_closed(&self) -> bool { +270 self.closed.load(Ordering::SeqCst) +271 } +272 +273 /// Get the cached version of addresses. +274 pub(crate) fn local_addr(&self) -> Vec<transports::Addr> { +275 self.local_addrs_watch.get().expect("disconnected") +276 } +277 +278 #[cfg(not(wasm_browser))] +279 fn ip_bind_addrs(&self) -> &[SocketAddr] { +280 &self.ip_bind_addrs +281 } +282 +283 fn ip_local_addrs(&self) -> impl Iterator<Item = SocketAddr> { +284 self.local_addr() +285 .into_iter() +286 .filter_map(|addr| addr.into_socket_addr()) +287 } +288 +289 /// Returns `true` if we have at least one candidate address where we can send packets to. +290 pub(crate) fn has_send_address(&self, node_key: PublicKey) -> bool { +291 self.remote_info(node_key) +292 .map(|info| info.has_send_address()) +293 .unwrap_or(false) +294 } +295 +296 /// Return the [`RemoteInfo`]s of all nodes in the node map. +297 pub(crate) fn list_remote_infos(&self) -> Vec<RemoteInfo> { +298 self.node_map.list_remote_infos(Instant::now()) +299 } +300 +301 /// Return the [`RemoteInfo`] for a single node in the node map. +302 pub(crate) fn remote_info(&self, node_id: NodeId) -> Option<RemoteInfo> { +303 self.node_map.remote_info(node_id) +304 } +305 +306 /// Returns a [`Watcher`] for this socket's direct addresses. 307 /// -308 /// Upon the first creation on the [`MagicSock`] it may not yet have completed a first -309 /// direct addresses discovery, in this case the current item in this [`Watcher`] will be -310 /// [`None`]. Once the first set of direct addresses are discovered the [`Watcher`] will -311 /// store [`Some`] set of addresses. -312 /// -313 /// To get the current direct addresses, use [`Watcher::initialized`]. -314 /// -315 /// [`Watcher`]: n0_watcher::Watcher -316 /// [`Watcher::initialized`]: n0_watcher::Watcher::initialized -317 pub(crate) fn direct_addresses(&self) -> n0_watcher::Direct<Option<BTreeSet<DirectAddr>>> { -318 self.direct_addrs.addrs.watch() -319 } -320 -321 /// Returns a [`Watcher`] for this socket's net-report. -322 /// -323 /// The [`MagicSock`] continuously monitors the network conditions for changes. -324 /// Whenever changes are detected this [`Watcher`] will yield a new report. -325 /// -326 /// Upon the first creation on the [`MagicSock`] it may not yet have completed -327 /// a first net-report. In this case, the current item in this [`Watcher`] will -328 /// be [`None`]. Once the first report has been run, the [`Watcher`] will -329 /// store [`Some`] report. -330 /// -331 /// To get the current `net-report`, use [`Watcher::initialized`]. -332 /// -333 /// [`Watcher`]: n0_watcher::Watcher -334 /// [`Watcher::initialized`]: n0_watcher::Watcher::initialized -335 pub(crate) fn net_report(&self) -> impl Watcher<Value = Option<Report>> { -336 self.net_report -337 .watch() -338 .map(|(r, _)| r) -339 .expect("disconnected") -340 } -341 -342 /// Watch for changes to the home relay. -343 /// -344 /// Note that this can be used to wait for the initial home relay to be known using -345 /// [`Watcher::initialized`]. -346 pub(crate) fn home_relay(&self) -> impl Watcher<Value = Vec<RelayUrl>> { -347 let res = self.local_addrs_watch.clone().map(|addrs| { -348 addrs -349 .into_iter() -350 .filter_map(|addr| { -351 if let transports::Addr::Relay(url, _) = addr { -352 Some(url) -353 } else { -354 None -355 } -356 }) -357 .collect() -358 }); -359 res.expect("disconnected") -360 } -361 -362 /// Returns a [`n0_watcher::Direct`] that reports the [`ConnectionType`] we have to the -363 /// given `node_id`. -364 /// -365 /// This gets us a copy of the [`n0_watcher::Direct`] for the [`Watchable`] with a [`ConnectionType`] -366 /// that the `NodeMap` stores for each `node_id`'s endpoint. -367 /// -368 /// # Errors -369 /// -370 /// Will return `None` if there is no address information known about the -371 /// given `node_id`. -372 pub(crate) fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> { -373 self.node_map.conn_type(node_id) -374 } -375 -376 /// Returns the socket address which can be used by the QUIC layer to dial this node. -377 pub(crate) fn get_mapping_addr(&self, node_id: NodeId) -> Option<NodeIdMappedAddr> { -378 self.node_map.get_quic_mapped_addr_for_node_key(node_id) -379 } -380 -381 /// Add addresses for a node to the magic socket's addresbook. -382 #[instrument(skip_all)] -383 pub fn add_node_addr( -384 &self, -385 mut addr: NodeAddr, -386 source: node_map::Source, -387 ) -> Result<(), AddNodeAddrError> { -388 let mut pruned: usize = 0; -389 for my_addr in self.direct_addrs.sockaddrs() { -390 if addr.direct_addresses.remove(&my_addr) { -391 warn!( node_id=addr.node_id.fmt_short(), %my_addr, %source, "not adding our addr for node"); -392 pruned += 1; -393 } -394 } -395 if !addr.is_empty() { -396 self.node_map -397 .add_node_addr(addr, source, &self.metrics.magicsock); -398 Ok(()) -399 } else if pruned != 0 { -400 Err(EmptyPrunedSnafu { pruned }.build()) -401 } else { -402 Err(EmptySnafu.build()) -403 } -404 } -405 -406 /// Stores a new set of direct addresses. -407 /// -408 /// If the direct addresses have changed from the previous set, they are published to -409 /// discovery. -410 pub(super) fn store_direct_addresses(&self, addrs: BTreeSet<DirectAddr>) { -411 let updated = self.direct_addrs.update(addrs); -412 if updated { -413 self.node_map -414 .on_direct_addr_discovered(self.direct_addrs.sockaddrs()); -415 self.publish_my_addr(); -416 } -417 } -418 -419 /// Get a reference to the DNS resolver used in this [`MagicSock`]. -420 #[cfg(not(wasm_browser))] -421 pub(crate) fn dns_resolver(&self) -> &DnsResolver { -422 &self.dns_resolver -423 } -424 -425 /// Reference to optional discovery service -426 pub(crate) fn discovery(&self) -> Option<&dyn Discovery> { -427 self.discovery.as_ref().map(Box::as_ref) -428 } -429 -430 /// Updates the user-defined discovery data for this node. -431 pub(crate) fn set_user_data_for_discovery(&self, user_data: Option<UserData>) { -432 let mut guard = self.discovery_user_data.write().expect("lock poisened"); -433 if *guard != user_data { -434 *guard = user_data; -435 drop(guard); -436 self.publish_my_addr(); -437 } -438 } -439 -440 /// Call to notify the system of potential network changes. -441 pub(crate) async fn network_change(&self) { -442 self.actor_sender -443 .send(ActorMessage::NetworkChange) -444 .await -445 .ok(); -446 } -447 -448 /// Returns a reference to the subscribers channel for discovery events. -449 pub(crate) fn discovery_subscribers(&self) -> &DiscoverySubscribers { -450 &self.discovery_subscribers -451 } -452 -453 #[cfg(test)] -454 async fn force_network_change(&self, is_major: bool) { -455 self.actor_sender -456 .send(ActorMessage::ForceNetworkChange(is_major)) -457 .await -458 .ok(); -459 } -460 -461 #[cfg_attr(windows, allow(dead_code))] -462 fn normalized_local_addr(&self) -> io::Result<SocketAddr> { -463 let addrs = self.local_addrs_watch.get().expect("disconnected"); +308 /// The [`MagicSock`] continuously monitors the direct addresses, the network addresses +309 /// it might be able to be contacted on, for changes. Whenever changes are detected +310 /// this [`Watcher`] will yield a new list of addresses. +311 /// +312 /// Upon the first creation on the [`MagicSock`] it may not yet have completed a first +313 /// direct addresses discovery, in this case the current item in this [`Watcher`] will be +314 /// [`None`]. Once the first set of direct addresses are discovered the [`Watcher`] will +315 /// store [`Some`] set of addresses. +316 /// +317 /// To get the current direct addresses, use [`Watcher::initialized`]. +318 /// +319 /// [`Watcher`]: n0_watcher::Watcher +320 /// [`Watcher::initialized`]: n0_watcher::Watcher::initialized +321 pub(crate) fn direct_addresses(&self) -> n0_watcher::Direct<Option<BTreeSet<DirectAddr>>> { +322 self.direct_addrs.addrs.watch() +323 } +324 +325 /// Returns a [`Watcher`] for this socket's net-report. +326 /// +327 /// The [`MagicSock`] continuously monitors the network conditions for changes. +328 /// Whenever changes are detected this [`Watcher`] will yield a new report. +329 /// +330 /// Upon the first creation on the [`MagicSock`] it may not yet have completed +331 /// a first net-report. In this case, the current item in this [`Watcher`] will +332 /// be [`None`]. Once the first report has been run, the [`Watcher`] will +333 /// store [`Some`] report. +334 /// +335 /// To get the current `net-report`, use [`Watcher::initialized`]. +336 /// +337 /// [`Watcher`]: n0_watcher::Watcher +338 /// [`Watcher::initialized`]: n0_watcher::Watcher::initialized +339 pub(crate) fn net_report(&self) -> impl Watcher<Value = Option<Report>> { +340 self.net_report +341 .watch() +342 .map(|(r, _)| r) +343 .expect("disconnected") +344 } +345 +346 /// Watch for changes to the home relay. +347 /// +348 /// Note that this can be used to wait for the initial home relay to be known using +349 /// [`Watcher::initialized`]. +350 pub(crate) fn home_relay(&self) -> impl Watcher<Value = Vec<RelayUrl>> { +351 let res = self.local_addrs_watch.clone().map(|addrs| { +352 addrs +353 .into_iter() +354 .filter_map(|addr| { +355 if let transports::Addr::Relay(url, _) = addr { +356 Some(url) +357 } else { +358 None +359 } +360 }) +361 .collect() +362 }); +363 res.expect("disconnected") +364 } +365 +366 /// Returns a [`n0_watcher::Direct`] that reports the [`ConnectionType`] we have to the +367 /// given `node_id`. +368 /// +369 /// This gets us a copy of the [`n0_watcher::Direct`] for the [`Watchable`] with a [`ConnectionType`] +370 /// that the `NodeMap` stores for each `node_id`'s endpoint. +371 /// +372 /// # Errors +373 /// +374 /// Will return `None` if there is no address information known about the +375 /// given `node_id`. +376 pub(crate) fn conn_type(&self, node_id: NodeId) -> Option<n0_watcher::Direct<ConnectionType>> { +377 self.node_map.conn_type(node_id) +378 } +379 +380 /// Returns the socket address which can be used by the QUIC layer to dial this node. +381 pub(crate) fn get_mapping_addr(&self, node_id: NodeId) -> Option<NodeIdMappedAddr> { +382 self.node_map.get_quic_mapped_addr_for_node_key(node_id) +383 } +384 +385 /// Add addresses for a node to the magic socket's addresbook. +386 #[instrument(skip_all)] +387 pub fn add_node_addr( +388 &self, +389 mut addr: NodeAddr, +390 source: node_map::Source, +391 ) -> Result<(), AddNodeAddrError> { +392 let mut pruned: usize = 0; +393 for my_addr in self.direct_addrs.sockaddrs() { +394 if addr.direct_addresses.remove(&my_addr) { +395 warn!( node_id=addr.node_id.fmt_short(), %my_addr, %source, "not adding our addr for node"); +396 pruned += 1; +397 } +398 } +399 if !addr.is_empty() { +400 self.node_map +401 .add_node_addr(addr, source, &self.metrics.magicsock); +402 Ok(()) +403 } else if pruned != 0 { +404 Err(EmptyPrunedSnafu { pruned }.build()) +405 } else { +406 Err(EmptySnafu.build()) +407 } +408 } +409 +410 /// Stores a new set of direct addresses. +411 /// +412 /// If the direct addresses have changed from the previous set, they are published to +413 /// discovery. +414 pub(super) fn store_direct_addresses(&self, addrs: BTreeSet<DirectAddr>) { +415 let updated = self.direct_addrs.update(addrs); +416 if updated { +417 self.node_map +418 .on_direct_addr_discovered(self.direct_addrs.sockaddrs()); +419 self.publish_my_addr(); +420 } +421 } +422 +423 /// Get a reference to the DNS resolver used in this [`MagicSock`]. +424 #[cfg(not(wasm_browser))] +425 pub(crate) fn dns_resolver(&self) -> &DnsResolver { +426 &self.dns_resolver +427 } +428 +429 /// Reference to optional discovery service +430 pub(crate) fn discovery(&self) -> Option<&dyn Discovery> { +431 self.discovery.as_ref().map(Box::as_ref) +432 } +433 +434 /// Updates the user-defined discovery data for this node. +435 pub(crate) fn set_user_data_for_discovery(&self, user_data: Option<UserData>) { +436 let mut guard = self.discovery_user_data.write().expect("lock poisened"); +437 if *guard != user_data { +438 *guard = user_data; +439 drop(guard); +440 self.publish_my_addr(); +441 } +442 } +443 +444 /// Call to notify the system of potential network changes. +445 pub(crate) async fn network_change(&self) { +446 self.actor_sender +447 .send(ActorMessage::NetworkChange) +448 .await +449 .ok(); +450 } +451 +452 /// Returns a reference to the subscribers channel for discovery events. +453 pub(crate) fn discovery_subscribers(&self) -> &DiscoverySubscribers { +454 &self.discovery_subscribers +455 } +456 +457 #[cfg(test)] +458 async fn force_network_change(&self, is_major: bool) { +459 self.actor_sender +460 .send(ActorMessage::ForceNetworkChange(is_major)) +461 .await +462 .ok(); +463 } 464 -465 let mut ipv4_addr = None; -466 for addr in addrs { -467 let Some(addr) = addr.into_socket_addr() else { -468 continue; -469 }; -470 if addr.is_ipv6() { -471 return Ok(addr); -472 } -473 if addr.is_ipv4() && ipv4_addr.is_none() { -474 ipv4_addr.replace(addr); -475 } -476 } -477 match ipv4_addr { -478 Some(addr) => Ok(addr), -479 None => Err(io::Error::other("no valid socket available")), +465 #[cfg_attr(windows, allow(dead_code))] +466 fn normalized_local_addr(&self) -> io::Result<SocketAddr> { +467 let addrs = self.local_addrs_watch.get().expect("disconnected"); +468 +469 let mut ipv4_addr = None; +470 for addr in addrs { +471 let Some(addr) = addr.into_socket_addr() else { +472 continue; +473 }; +474 if addr.is_ipv6() { +475 return Ok(addr); +476 } +477 if addr.is_ipv4() && ipv4_addr.is_none() { +478 ipv4_addr.replace(addr); +479 } 480 } -481 } -482 -483 /// Searches the `node_map` to determine the current transports to be used. -484 #[instrument(skip_all)] -485 fn prepare_send( -486 &self, -487 transmit: &quinn_udp::Transmit, -488 ) -> io::Result<SmallVec<[transports::Addr; 3]>> { -489 self.metrics -490 .magicsock -491 .send_data -492 .inc_by(transmit.contents.len() as _); -493 -494 if self.is_closed() { -495 self.metrics -496 .magicsock -497 .send_data_network_down -498 .inc_by(transmit.contents.len() as _); -499 return Err(io::Error::new( -500 io::ErrorKind::NotConnected, -501 "connection closed", -502 )); -503 } -504 -505 let mut active_paths = SmallVec::<[_; 3]>::new(); -506 -507 match MappedAddr::from(transmit.destination) { -508 MappedAddr::None(dest) => { -509 error!(%dest, "Cannot convert to a mapped address."); -510 } -511 MappedAddr::NodeId(dest) => { -512 trace!( -513 dst = %dest, -514 src = ?transmit.src_ip, -515 len = %transmit.contents.len(), -516 "sending", -517 ); -518 -519 // Get the node's relay address and best direct address, as well -520 // as any pings that need to be sent for hole-punching purposes. -521 match self.node_map.get_send_addrs( -522 dest, -523 self.ipv6_reported.load(Ordering::Relaxed), -524 &self.metrics.magicsock, -525 ) { -526 Some((node_id, udp_addr, relay_url, ping_actions)) => { -527 if !ping_actions.is_empty() { -528 self.actor_sender -529 .try_send(ActorMessage::PingActions(ping_actions)) -530 .ok(); -531 } -532 if let Some(addr) = udp_addr { -533 active_paths.push(transports::Addr::from(addr)); -534 } -535 if let Some(url) = relay_url { -536 active_paths.push(transports::Addr::Relay(url, node_id)); -537 } -538 } -539 None => { -540 error!(%dest, "no NodeState for mapped address"); -541 } -542 } -543 } -544 #[cfg(not(wasm_browser))] -545 MappedAddr::Ip(dest) => { -546 trace!( -547 dst = %dest, -548 src = ?transmit.src_ip, -549 len = %transmit.contents.len(), -550 "sending", -551 ); -552 -553 // Check if this is a known IpMappedAddr, and if so, send over UDP -554 // Get the socket addr -555 match self.ip_mapped_addrs.get_ip_addr(&dest) { -556 Some(addr) => { -557 active_paths.push(transports::Addr::from(addr)); -558 } -559 None => { -560 error!(%dest, "unknown mapped address"); -561 } -562 } -563 } -564 } -565 -566 Ok(active_paths) -567 } -568 -569 /// Process datagrams received from UDP sockets. -570 /// -571 /// All the `bufs` and `metas` should have initialized packets in them. -572 /// -573 /// This fixes up the datagrams to use the correct [`NodeIdMappedAddr`] and extracts DISCO -574 /// packets, processing them inside the magic socket. -575 fn process_datagrams( -576 &self, -577 bufs: &mut [io::IoSliceMut<'_>], -578 metas: &mut [quinn_udp::RecvMeta], -579 source_addrs: &[transports::Addr], -580 ) { -581 debug_assert_eq!(bufs.len(), metas.len(), "non matching bufs & metas"); -582 debug_assert_eq!( -583 bufs.len(), -584 source_addrs.len(), -585 "non matching bufs & source_addrs" -586 ); -587 -588 // Adding the IP address we received something on results in Quinn using this -589 // address on the send path to send from. However we let Quinn use a -590 // NodeIdMappedAddress, not a real address. So we used to substitute our bind address -591 // here so that Quinn would send on the right address. But that would sometimes -592 // result in the wrong address family and Windows trips up on that. -593 // -594 // What should be done is that this dst_ip from the RecvMeta is stored in the -595 // NodeState/PathState. Then on the send path it should be retrieved from the -596 // NodeState/PathSate together with the send address and substituted at send time. -597 // This is relevant for IPv6 link-local addresses where the OS otherwise does not -598 // know which interface to send from. -599 #[cfg(not(windows))] -600 let dst_ip = self.normalized_local_addr().ok().map(|addr| addr.ip()); -601 // Reasoning for this here: -602 // https://github.com/n0-computer/iroh/pull/2595#issuecomment-2290947319 -603 #[cfg(windows)] -604 let dst_ip = None; -605 -606 let mut quic_packets_total = 0; -607 -608 for ((quinn_meta, buf), source_addr) in metas -609 .iter_mut() -610 .zip(bufs.iter_mut()) -611 .zip(source_addrs.iter()) -612 { -613 let mut buf_contains_quic_datagrams = false; -614 let mut quic_datagram_count = 0; -615 if quinn_meta.len > quinn_meta.stride { -616 trace!(%quinn_meta.len, %quinn_meta.stride, "GRO datagram received"); -617 self.metrics.magicsock.recv_gro_datagrams.inc(); -618 } -619 -620 // Chunk through the datagrams in this GRO payload to find disco -621 // packets and forward them to the actor -622 for datagram in buf[..quinn_meta.len].chunks_mut(quinn_meta.stride) { -623 if datagram.len() < quinn_meta.stride { -624 trace!( -625 len = %datagram.len(), -626 %quinn_meta.stride, -627 "Last GRO datagram smaller than stride", -628 ); -629 } -630 -631 // Detect DISCO datagrams and process them. Overwrite the first -632 // byte of those packets with zero to make Quinn ignore the packet. This -633 // relies on quinn::EndpointConfig::grease_quic_bit being set to `false`, -634 // which we do in Endpoint::bind. -635 if let Some((sender, sealed_box)) = disco::source_and_box(datagram) { -636 trace!(src = ?source_addr, len = %quinn_meta.stride, "UDP recv: disco packet"); -637 self.handle_disco_message(sender, sealed_box, source_addr); -638 datagram[0] = 0u8; -639 } else { -640 trace!(src = ?source_addr, len = %quinn_meta.stride, "UDP recv: quic packet"); -641 match source_addr { -642 transports::Addr::Ip(SocketAddr::V4(..)) => { -643 self.metrics -644 .magicsock -645 .recv_data_ipv4 -646 .inc_by(datagram.len() as _); -647 } -648 transports::Addr::Ip(SocketAddr::V6(..)) => { -649 self.metrics -650 .magicsock -651 .recv_data_ipv6 -652 .inc_by(datagram.len() as _); -653 } -654 transports::Addr::Relay(..) => { -655 self.metrics -656 .magicsock -657 .recv_data_relay -658 .inc_by(datagram.len() as _); -659 } -660 } -661 -662 quic_datagram_count += 1; -663 buf_contains_quic_datagrams = true; -664 } -665 } -666 -667 if buf_contains_quic_datagrams { -668 match source_addr { -669 #[cfg(wasm_browser)] -670 transports::Addr::Ip(_addr) => { -671 panic!("cannot use IP based addressing in the browser"); -672 } -673 #[cfg(not(wasm_browser))] -674 transports::Addr::Ip(addr) => { -675 // UDP -676 -677 // Update the NodeMap and remap RecvMeta to the NodeIdMappedAddr. -678 match self.node_map.receive_udp(*addr) { -679 None => { -680 // Check if this address is mapped to an IpMappedAddr -681 if let Some(ip_mapped_addr) = -682 self.ip_mapped_addrs.get_mapped_addr(addr) -683 { -684 trace!( -685 src = %addr, -686 count = %quic_datagram_count, -687 len = quinn_meta.len, -688 "UDP recv QUIC address discovery packets", -689 ); -690 quic_packets_total += quic_datagram_count; -691 quinn_meta.addr = ip_mapped_addr.private_socket_addr(); -692 } else { -693 warn!( -694 src = %addr, -695 count = %quic_datagram_count, -696 len = quinn_meta.len, -697 "UDP recv quic packets: no node state found, skipping", -698 ); -699 // If we have no node state for the from addr, set len to 0 to make -700 // quinn skip the buf completely. -701 quinn_meta.len = 0; -702 } -703 } -704 Some((node_id, quic_mapped_addr)) => { -705 trace!( -706 src = %addr, -707 node = %node_id.fmt_short(), -708 count = %quic_datagram_count, -709 len = quinn_meta.len, -710 "UDP recv quic packets", -711 ); -712 quic_packets_total += quic_datagram_count; -713 quinn_meta.addr = quic_mapped_addr.private_socket_addr(); -714 } -715 } -716 } -717 transports::Addr::Relay(src_url, src_node) => { -718 // Relay -719 let quic_mapped_addr = self.node_map.receive_relay(src_url, *src_node); -720 quinn_meta.addr = quic_mapped_addr.private_socket_addr(); -721 } -722 } -723 } else { -724 // If all datagrams in this buf are DISCO, set len to zero to make -725 // Quinn skip the buf completely. -726 quinn_meta.len = 0; -727 } -728 // Normalize local_ip -729 quinn_meta.dst_ip = dst_ip; -730 } -731 -732 if quic_packets_total > 0 { -733 self.metrics -734 .magicsock -735 .recv_datagrams -736 .inc_by(quic_packets_total as _); -737 trace!("UDP recv: {} packets", quic_packets_total); -738 } -739 } -740 -741 /// Handles a discovery message. -742 #[instrument("disco_in", skip_all, fields(node = %sender.fmt_short(), ?src))] -743 fn handle_disco_message(&self, sender: PublicKey, sealed_box: &[u8], src: &transports::Addr) { -744 trace!("handle_disco_message start"); -745 if self.is_closed() { -746 return; -747 } -748 -749 if let transports::Addr::Relay(_, node_id) = src { -750 if node_id != &sender { -751 // TODO: return here? -752 warn!( -753 "Received relay disco message from connection for {}, but with message from {}", -754 node_id.fmt_short(), -755 sender.fmt_short() -756 ); -757 } -758 } -759 -760 // We're now reasonably sure we're expecting communication from -761 // this node, do the heavy crypto lifting to see what they want. -762 let dm = match self.disco.unseal_and_decode(sender, sealed_box) { -763 Ok(dm) => dm, -764 Err(DiscoBoxError::Open { source, .. }) => { -765 warn!(?source, "failed to open disco box"); -766 self.metrics.magicsock.recv_disco_bad_key.inc(); -767 return; -768 } -769 Err(DiscoBoxError::Parse { source, .. }) => { -770 // Couldn't parse it, but it was inside a correctly -771 // signed box, so just ignore it, assuming it's from a -772 // newer version of Tailscale that we don't -773 // understand. Not even worth logging about, lest it -774 // be too spammy for old clients. -775 -776 self.metrics.magicsock.recv_disco_bad_parse.inc(); -777 debug!(?source, "failed to parse disco message"); -778 return; -779 } -780 }; -781 -782 if src.is_relay() { -783 self.metrics.magicsock.recv_disco_relay.inc(); -784 } else { -785 self.metrics.magicsock.recv_disco_udp.inc(); -786 } -787 -788 let span = trace_span!("handle_disco", ?dm); -789 let _guard = span.enter(); -790 trace!("receive disco message"); -791 match dm { -792 disco::Message::Ping(ping) => { -793 self.metrics.magicsock.recv_disco_ping.inc(); -794 self.handle_ping(ping, sender, src); -795 } -796 disco::Message::Pong(pong) => { -797 self.metrics.magicsock.recv_disco_pong.inc(); -798 self.node_map.handle_pong(sender, src, pong); +481 match ipv4_addr { +482 Some(addr) => Ok(addr), +483 None => Err(io::Error::other("no valid socket available")), +484 } +485 } +486 +487 /// Searches the `node_map` to determine the current transports to be used. +488 #[instrument(skip_all)] +489 fn prepare_send( +490 &self, +491 transmit: &quinn_udp::Transmit, +492 ) -> io::Result<SmallVec<[transports::Addr; 3]>> { +493 self.metrics +494 .magicsock +495 .send_data +496 .inc_by(transmit.contents.len() as _); +497 +498 if self.is_closed() { +499 self.metrics +500 .magicsock +501 .send_data_network_down +502 .inc_by(transmit.contents.len() as _); +503 return Err(io::Error::new( +504 io::ErrorKind::NotConnected, +505 "connection closed", +506 )); +507 } +508 +509 let mut active_paths = SmallVec::<[_; 3]>::new(); +510 +511 match MappedAddr::from(transmit.destination) { +512 MappedAddr::None(dest) => { +513 error!(%dest, "Cannot convert to a mapped address."); +514 } +515 MappedAddr::NodeId(dest) => { +516 trace!( +517 dst = %dest, +518 src = ?transmit.src_ip, +519 len = %transmit.contents.len(), +520 "sending", +521 ); +522 +523 // Get the node's relay address and best direct address, as well +524 // as any pings that need to be sent for hole-punching purposes. +525 match self.node_map.get_send_addrs( +526 dest, +527 self.ipv6_reported.load(Ordering::Relaxed), +528 &self.metrics.magicsock, +529 ) { +530 Some((node_id, udp_addr, relay_url, ping_actions)) => { +531 if !ping_actions.is_empty() { +532 self.actor_sender +533 .try_send(ActorMessage::PingActions(ping_actions)) +534 .ok(); +535 } +536 if let Some(addr) = udp_addr { +537 active_paths.push(transports::Addr::from(addr)); +538 } +539 if let Some(url) = relay_url { +540 active_paths.push(transports::Addr::Relay(url, node_id)); +541 } +542 } +543 None => { +544 error!(%dest, "no NodeState for mapped address"); +545 } +546 } +547 } +548 #[cfg(not(wasm_browser))] +549 MappedAddr::Ip(dest) => { +550 trace!( +551 dst = %dest, +552 src = ?transmit.src_ip, +553 len = %transmit.contents.len(), +554 "sending", +555 ); +556 +557 // Check if this is a known IpMappedAddr, and if so, send over UDP +558 // Get the socket addr +559 match self.ip_mapped_addrs.get_ip_addr(&dest) { +560 Some(addr) => { +561 active_paths.push(transports::Addr::from(addr)); +562 } +563 None => { +564 error!(%dest, "unknown mapped address"); +565 } +566 } +567 } +568 } +569 +570 Ok(active_paths) +571 } +572 +573 /// Process datagrams received from UDP sockets. +574 /// +575 /// All the `bufs` and `metas` should have initialized packets in them. +576 /// +577 /// This fixes up the datagrams to use the correct [`NodeIdMappedAddr`] and extracts DISCO +578 /// packets, processing them inside the magic socket. +579 fn process_datagrams( +580 &self, +581 bufs: &mut [io::IoSliceMut<'_>], +582 metas: &mut [quinn_udp::RecvMeta], +583 source_addrs: &[transports::Addr], +584 ) { +585 debug_assert_eq!(bufs.len(), metas.len(), "non matching bufs & metas"); +586 debug_assert_eq!( +587 bufs.len(), +588 source_addrs.len(), +589 "non matching bufs & source_addrs" +590 ); +591 +592 // Adding the IP address we received something on results in Quinn using this +593 // address on the send path to send from. However we let Quinn use a +594 // NodeIdMappedAddress, not a real address. So we used to substitute our bind address +595 // here so that Quinn would send on the right address. But that would sometimes +596 // result in the wrong address family and Windows trips up on that. +597 // +598 // What should be done is that this dst_ip from the RecvMeta is stored in the +599 // NodeState/PathState. Then on the send path it should be retrieved from the +600 // NodeState/PathSate together with the send address and substituted at send time. +601 // This is relevant for IPv6 link-local addresses where the OS otherwise does not +602 // know which interface to send from. +603 #[cfg(not(windows))] +604 let dst_ip = self.normalized_local_addr().ok().map(|addr| addr.ip()); +605 // Reasoning for this here: +606 // https://github.com/n0-computer/iroh/pull/2595#issuecomment-2290947319 +607 #[cfg(windows)] +608 let dst_ip = None; +609 +610 let mut quic_packets_total = 0; +611 +612 for ((quinn_meta, buf), source_addr) in metas +613 .iter_mut() +614 .zip(bufs.iter_mut()) +615 .zip(source_addrs.iter()) +616 { +617 let mut buf_contains_quic_datagrams = false; +618 let mut quic_datagram_count = 0; +619 if quinn_meta.len > quinn_meta.stride { +620 trace!(%quinn_meta.len, %quinn_meta.stride, "GRO datagram received"); +621 self.metrics.magicsock.recv_gro_datagrams.inc(); +622 } +623 +624 // Chunk through the datagrams in this GRO payload to find disco +625 // packets and forward them to the actor +626 for datagram in buf[..quinn_meta.len].chunks_mut(quinn_meta.stride) { +627 if datagram.len() < quinn_meta.stride { +628 trace!( +629 len = %datagram.len(), +630 %quinn_meta.stride, +631 "Last GRO datagram smaller than stride", +632 ); +633 } +634 +635 // Detect DISCO datagrams and process them. Overwrite the first +636 // byte of those packets with zero to make Quinn ignore the packet. This +637 // relies on quinn::EndpointConfig::grease_quic_bit being set to `false`, +638 // which we do in Endpoint::bind. +639 if let Some((sender, sealed_box)) = disco::source_and_box(datagram) { +640 trace!(src = ?source_addr, len = %quinn_meta.stride, "UDP recv: disco packet"); +641 self.handle_disco_message(sender, sealed_box, source_addr); +642 datagram[0] = 0u8; +643 } else { +644 trace!(src = ?source_addr, len = %quinn_meta.stride, "UDP recv: quic packet"); +645 match source_addr { +646 transports::Addr::Ip(SocketAddr::V4(..)) => { +647 self.metrics +648 .magicsock +649 .recv_data_ipv4 +650 .inc_by(datagram.len() as _); +651 } +652 transports::Addr::Ip(SocketAddr::V6(..)) => { +653 self.metrics +654 .magicsock +655 .recv_data_ipv6 +656 .inc_by(datagram.len() as _); +657 } +658 transports::Addr::Relay(..) => { +659 self.metrics +660 .magicsock +661 .recv_data_relay +662 .inc_by(datagram.len() as _); +663 } +664 } +665 +666 quic_datagram_count += 1; +667 buf_contains_quic_datagrams = true; +668 } +669 } +670 +671 if buf_contains_quic_datagrams { +672 match source_addr { +673 #[cfg(wasm_browser)] +674 transports::Addr::Ip(_addr) => { +675 panic!("cannot use IP based addressing in the browser"); +676 } +677 #[cfg(not(wasm_browser))] +678 transports::Addr::Ip(addr) => { +679 // UDP +680 +681 // Update the NodeMap and remap RecvMeta to the NodeIdMappedAddr. +682 match self.node_map.receive_udp(*addr) { +683 None => { +684 // Check if this address is mapped to an IpMappedAddr +685 if let Some(ip_mapped_addr) = +686 self.ip_mapped_addrs.get_mapped_addr(addr) +687 { +688 trace!( +689 src = %addr, +690 count = %quic_datagram_count, +691 len = quinn_meta.len, +692 "UDP recv QUIC address discovery packets", +693 ); +694 quic_packets_total += quic_datagram_count; +695 quinn_meta.addr = ip_mapped_addr.private_socket_addr(); +696 } else { +697 warn!( +698 src = %addr, +699 count = %quic_datagram_count, +700 len = quinn_meta.len, +701 "UDP recv quic packets: no node state found, skipping", +702 ); +703 // If we have no node state for the from addr, set len to 0 to make +704 // quinn skip the buf completely. +705 quinn_meta.len = 0; +706 } +707 } +708 Some((node_id, quic_mapped_addr)) => { +709 trace!( +710 src = %addr, +711 node = %node_id.fmt_short(), +712 count = %quic_datagram_count, +713 len = quinn_meta.len, +714 "UDP recv quic packets", +715 ); +716 quic_packets_total += quic_datagram_count; +717 quinn_meta.addr = quic_mapped_addr.private_socket_addr(); +718 } +719 } +720 } +721 transports::Addr::Relay(src_url, src_node) => { +722 // Relay +723 let quic_mapped_addr = self.node_map.receive_relay(src_url, *src_node); +724 quinn_meta.addr = quic_mapped_addr.private_socket_addr(); +725 } +726 } +727 } else { +728 // If all datagrams in this buf are DISCO, set len to zero to make +729 // Quinn skip the buf completely. +730 quinn_meta.len = 0; +731 } +732 // Normalize local_ip +733 quinn_meta.dst_ip = dst_ip; +734 } +735 +736 if quic_packets_total > 0 { +737 self.metrics +738 .magicsock +739 .recv_datagrams +740 .inc_by(quic_packets_total as _); +741 trace!("UDP recv: {} packets", quic_packets_total); +742 } +743 } +744 +745 /// Handles a discovery message. +746 #[instrument("disco_in", skip_all, fields(node = %sender.fmt_short(), ?src))] +747 fn handle_disco_message(&self, sender: PublicKey, sealed_box: &[u8], src: &transports::Addr) { +748 trace!("handle_disco_message start"); +749 if self.is_closed() { +750 return; +751 } +752 +753 if let transports::Addr::Relay(_, node_id) = src { +754 if node_id != &sender { +755 // TODO: return here? +756 warn!( +757 "Received relay disco message from connection for {}, but with message from {}", +758 node_id.fmt_short(), +759 sender.fmt_short() +760 ); +761 } +762 } +763 +764 // We're now reasonably sure we're expecting communication from +765 // this node, do the heavy crypto lifting to see what they want. +766 let dm = match self.disco.unseal_and_decode(sender, sealed_box) { +767 Ok(dm) => dm, +768 Err(DiscoBoxError::Open { source, .. }) => { +769 warn!(?source, "failed to open disco box"); +770 self.metrics.magicsock.recv_disco_bad_key.inc(); +771 return; +772 } +773 Err(DiscoBoxError::Parse { source, .. }) => { +774 // Couldn't parse it, but it was inside a correctly +775 // signed box, so just ignore it, assuming it's from a +776 // newer version of Tailscale that we don't +777 // understand. Not even worth logging about, lest it +778 // be too spammy for old clients. +779 +780 self.metrics.magicsock.recv_disco_bad_parse.inc(); +781 debug!(?source, "failed to parse disco message"); +782 return; +783 } +784 }; +785 +786 if src.is_relay() { +787 self.metrics.magicsock.recv_disco_relay.inc(); +788 } else { +789 self.metrics.magicsock.recv_disco_udp.inc(); +790 } +791 +792 let span = trace_span!("handle_disco", ?dm); +793 let _guard = span.enter(); +794 trace!("receive disco message"); +795 match dm { +796 disco::Message::Ping(ping) => { +797 self.metrics.magicsock.recv_disco_ping.inc(); +798 self.handle_ping(ping, sender, src); 799 } -800 disco::Message::CallMeMaybe(cm) => { -801 self.metrics.magicsock.recv_disco_call_me_maybe.inc(); -802 match src { -803 transports::Addr::Relay(url, _) => { -804 event!( -805 target: "iroh::_events::call-me-maybe::recv", -806 Level::DEBUG, -807 remote_node = sender.fmt_short(), -808 via = ?url, -809 their_addrs = ?cm.my_numbers, -810 ); -811 } -812 _ => { -813 warn!("call-me-maybe packets should only come via relay"); -814 return; +800 disco::Message::Pong(pong) => { +801 self.metrics.magicsock.recv_disco_pong.inc(); +802 self.node_map.handle_pong(sender, src, pong); +803 } +804 disco::Message::CallMeMaybe(cm) => { +805 self.metrics.magicsock.recv_disco_call_me_maybe.inc(); +806 match src { +807 transports::Addr::Relay(url, _) => { +808 event!( +809 target: "iroh::_events::call-me-maybe::recv", +810 Level::DEBUG, +811 remote_node = sender.fmt_short(), +812 via = ?url, +813 their_addrs = ?cm.my_numbers, +814 ); 815 } -816 } -817 let ping_actions = -818 self.node_map -819 .handle_call_me_maybe(sender, cm, &self.metrics.magicsock); -820 for action in ping_actions { -821 match action { -822 PingAction::SendCallMeMaybe { .. } => { -823 warn!("Unexpected CallMeMaybe as response of handling a CallMeMaybe"); -824 } -825 PingAction::SendPing(ping) => { -826 self.send_ping_queued(ping); -827 } -828 } -829 } -830 } -831 } -832 trace!("disco message handled"); -833 } -834 -835 /// Handle a ping message. -836 fn handle_ping(&self, dm: disco::Ping, sender: NodeId, src: &transports::Addr) { -837 // Insert the ping into the node map, and return whether a ping with this tx_id was already -838 // received. -839 let addr: SendAddr = src.clone().into(); -840 let handled = self.node_map.handle_ping(sender, addr.clone(), dm.tx_id); -841 match handled.role { -842 PingRole::Duplicate => { -843 debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: path already confirmed, skip"); -844 return; -845 } -846 PingRole::LikelyHeartbeat => {} -847 PingRole::NewPath => { -848 debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: new path"); +816 _ => { +817 warn!("call-me-maybe packets should only come via relay"); +818 return; +819 } +820 } +821 let ping_actions = +822 self.node_map +823 .handle_call_me_maybe(sender, cm, &self.metrics.magicsock); +824 for action in ping_actions { +825 match action { +826 PingAction::SendCallMeMaybe { .. } => { +827 warn!("Unexpected CallMeMaybe as response of handling a CallMeMaybe"); +828 } +829 PingAction::SendPing(ping) => { +830 self.send_ping_queued(ping); +831 } +832 } +833 } +834 } +835 } +836 trace!("disco message handled"); +837 } +838 +839 /// Handle a ping message. +840 fn handle_ping(&self, dm: disco::Ping, sender: NodeId, src: &transports::Addr) { +841 // Insert the ping into the node map, and return whether a ping with this tx_id was already +842 // received. +843 let addr: SendAddr = src.clone().into(); +844 let handled = self.node_map.handle_ping(sender, addr.clone(), dm.tx_id); +845 match handled.role { +846 PingRole::Duplicate => { +847 debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: path already confirmed, skip"); +848 return; 849 } -850 PingRole::Activate => { -851 debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: path active"); -852 } -853 } -854 -855 // Send a pong. -856 debug!(tx = %HEXLOWER.encode(&dm.tx_id), %addr, dstkey = %sender.fmt_short(), -857 "sending pong"); -858 let pong = disco::Message::Pong(disco::Pong { -859 tx_id: dm.tx_id, -860 ping_observed_addr: addr.clone(), -861 }); -862 event!( -863 target: "iroh::_events::pong::sent", -864 Level::DEBUG, -865 remote_node = %sender.fmt_short(), -866 dst = ?addr, -867 txn = ?dm.tx_id, -868 ); -869 -870 if !self.disco.try_send(addr.clone(), sender, pong) { -871 warn!(%addr, "failed to queue pong"); -872 } +850 PingRole::LikelyHeartbeat => {} +851 PingRole::NewPath => { +852 debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: new path"); +853 } +854 PingRole::Activate => { +855 debug!(?src, tx = %HEXLOWER.encode(&dm.tx_id), "received ping: path active"); +856 } +857 } +858 +859 // Send a pong. +860 debug!(tx = %HEXLOWER.encode(&dm.tx_id), %addr, dstkey = %sender.fmt_short(), +861 "sending pong"); +862 let pong = disco::Message::Pong(disco::Pong { +863 tx_id: dm.tx_id, +864 ping_observed_addr: addr.clone(), +865 }); +866 event!( +867 target: "iroh::_events::pong::sent", +868 Level::DEBUG, +869 remote_node = %sender.fmt_short(), +870 dst = ?addr, +871 txn = ?dm.tx_id, +872 ); 873 -874 if let Some(ping) = handled.needs_ping_back { -875 debug!( -876 %addr, -877 dstkey = %sender.fmt_short(), -878 "sending direct ping back", -879 ); -880 self.send_ping_queued(ping); -881 } -882 } -883 -884 fn send_ping_queued(&self, ping: SendPing) { -885 let SendPing { -886 id, -887 dst, -888 dst_node, -889 tx_id, -890 purpose, -891 } = ping; -892 let msg = disco::Message::Ping(disco::Ping { +874 if !self.disco.try_send(addr.clone(), sender, pong) { +875 warn!(%addr, "failed to queue pong"); +876 } +877 +878 if let Some(ping) = handled.needs_ping_back { +879 debug!( +880 %addr, +881 dstkey = %sender.fmt_short(), +882 "sending direct ping back", +883 ); +884 self.send_ping_queued(ping); +885 } +886 } +887 +888 fn send_ping_queued(&self, ping: SendPing) { +889 let SendPing { +890 id, +891 dst, +892 dst_node, 893 tx_id, -894 node_key: self.public_key, -895 }); -896 let sent = self.disco.try_send(dst.clone(), dst_node, msg); -897 if sent { -898 let msg_sender = self.actor_sender.clone(); -899 trace!(%dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "ping sent (queued)"); -900 self.node_map -901 .notify_ping_sent(id, dst, tx_id, purpose, msg_sender); -902 } else { -903 warn!(dst = ?dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "failed to send ping: queues full"); -904 } -905 } -906 -907 /// Send the given ping actions out. -908 async fn send_ping_actions(&self, sender: &UdpSender, msgs: Vec<PingAction>) -> io::Result<()> { -909 for msg in msgs { -910 // Abort sending as soon as we know we are shutting down. -911 if self.is_closing() || self.is_closed() { -912 return Ok(()); -913 } -914 match msg { -915 PingAction::SendCallMeMaybe { -916 relay_url, -917 dst_node, -918 } => { -919 // Sends the call-me-maybe DISCO message, queuing if addresses are too stale. -920 // -921 // To send the call-me-maybe message, we need to know our current direct addresses. If -922 // this information is too stale, the call-me-maybe is queued while a net_report run is -923 // scheduled. Once this run finishes, the call-me-maybe will be sent. -924 match self.direct_addrs.fresh_enough() { -925 Ok(()) => { -926 let msg = disco::Message::CallMeMaybe( -927 self.direct_addrs.to_call_me_maybe_message(), -928 ); -929 if !self.disco.try_send( -930 SendAddr::Relay(relay_url.clone()), -931 dst_node, -932 msg.clone(), -933 ) { -934 warn!(dstkey = %dst_node.fmt_short(), %relay_url, "relay channel full, dropping call-me-maybe"); -935 } else { -936 debug!(dstkey = %dst_node.fmt_short(), %relay_url, "call-me-maybe sent"); -937 } -938 } -939 Err(last_refresh_ago) => { -940 debug!( -941 ?last_refresh_ago, -942 "want call-me-maybe but direct addrs stale; queuing after restun", -943 ); -944 self.actor_sender -945 .try_send(ActorMessage::ScheduleDirectAddrUpdate( -946 UpdateReason::RefreshForPeering, -947 Some((dst_node, relay_url)), -948 )) -949 .ok(); -950 } -951 } -952 } -953 PingAction::SendPing(SendPing { -954 id, -955 dst, -956 dst_node, -957 tx_id, -958 purpose, -959 }) => { -960 let msg = disco::Message::Ping(disco::Ping { -961 tx_id, -962 node_key: self.public_key, -963 }); -964 -965 self.send_disco_message(sender, dst.clone(), dst_node, msg) -966 .await?; -967 debug!(%dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "ping sent"); -968 let msg_sender = self.actor_sender.clone(); -969 self.node_map -970 .notify_ping_sent(id, dst, tx_id, purpose, msg_sender); -971 } -972 } -973 } -974 Ok(()) -975 } -976 -977 /// Sends out a disco message. -978 async fn send_disco_message( -979 &self, -980 sender: &UdpSender, -981 dst: SendAddr, -982 dst_key: PublicKey, -983 msg: disco::Message, -984 ) -> io::Result<()> { -985 let dst = match dst { -986 SendAddr::Udp(addr) => transports::Addr::Ip(addr), -987 SendAddr::Relay(url) => transports::Addr::Relay(url, dst_key), -988 }; -989 -990 trace!(?dst, %msg, "send disco message (UDP)"); -991 if self.is_closed() { -992 return Err(io::Error::new( -993 io::ErrorKind::NotConnected, -994 "connection closed", -995 )); -996 } -997 -998 let pkt = self.disco.encode_and_seal(self.public_key, dst_key, &msg); -999 -1000 let transmit = transports::Transmit { -1001 contents: &pkt, -1002 ecn: None, -1003 segment_size: None, -1004 }; -1005 -1006 let dst2 = dst.clone(); -1007 match sender.send(&dst2, None, &transmit).await { -1008 Ok(()) => { -1009 trace!(?dst, %msg, "sent disco message"); -1010 self.metrics.magicsock.sent_disco_udp.inc(); -1011 disco_message_sent(&msg, &self.metrics.magicsock); -1012 Ok(()) -1013 } -1014 Err(err) => { -1015 warn!(?dst, ?msg, ?err, "failed to send disco message"); -1016 Err(err) +894 purpose, +895 } = ping; +896 let msg = disco::Message::Ping(disco::Ping { +897 tx_id, +898 node_key: self.public_key, +899 }); +900 let sent = self.disco.try_send(dst.clone(), dst_node, msg); +901 if sent { +902 let msg_sender = self.actor_sender.clone(); +903 trace!(%dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "ping sent (queued)"); +904 self.node_map +905 .notify_ping_sent(id, dst, tx_id, purpose, msg_sender); +906 } else { +907 warn!(dst = ?dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "failed to send ping: queues full"); +908 } +909 } +910 +911 /// Send the given ping actions out. +912 async fn send_ping_actions(&self, sender: &UdpSender, msgs: Vec<PingAction>) -> io::Result<()> { +913 for msg in msgs { +914 // Abort sending as soon as we know we are shutting down. +915 if self.is_closing() || self.is_closed() { +916 return Ok(()); +917 } +918 match msg { +919 PingAction::SendCallMeMaybe { +920 relay_url, +921 dst_node, +922 } => { +923 // Sends the call-me-maybe DISCO message, queuing if addresses are too stale. +924 // +925 // To send the call-me-maybe message, we need to know our current direct addresses. If +926 // this information is too stale, the call-me-maybe is queued while a net_report run is +927 // scheduled. Once this run finishes, the call-me-maybe will be sent. +928 match self.direct_addrs.fresh_enough() { +929 Ok(()) => { +930 let msg = disco::Message::CallMeMaybe( +931 self.direct_addrs.to_call_me_maybe_message(), +932 ); +933 if !self.disco.try_send( +934 SendAddr::Relay(relay_url.clone()), +935 dst_node, +936 msg.clone(), +937 ) { +938 warn!(dstkey = %dst_node.fmt_short(), %relay_url, "relay channel full, dropping call-me-maybe"); +939 } else { +940 debug!(dstkey = %dst_node.fmt_short(), %relay_url, "call-me-maybe sent"); +941 } +942 } +943 Err(last_refresh_ago) => { +944 debug!( +945 ?last_refresh_ago, +946 "want call-me-maybe but direct addrs stale; queuing after restun", +947 ); +948 self.actor_sender +949 .try_send(ActorMessage::ScheduleDirectAddrUpdate( +950 UpdateReason::RefreshForPeering, +951 Some((dst_node, relay_url)), +952 )) +953 .ok(); +954 } +955 } +956 } +957 PingAction::SendPing(SendPing { +958 id, +959 dst, +960 dst_node, +961 tx_id, +962 purpose, +963 }) => { +964 let msg = disco::Message::Ping(disco::Ping { +965 tx_id, +966 node_key: self.public_key, +967 }); +968 +969 self.send_disco_message(sender, dst.clone(), dst_node, msg) +970 .await?; +971 debug!(%dst, tx = %HEXLOWER.encode(&tx_id), ?purpose, "ping sent"); +972 let msg_sender = self.actor_sender.clone(); +973 self.node_map +974 .notify_ping_sent(id, dst, tx_id, purpose, msg_sender); +975 } +976 } +977 } +978 Ok(()) +979 } +980 +981 /// Sends out a disco message. +982 async fn send_disco_message( +983 &self, +984 sender: &UdpSender, +985 dst: SendAddr, +986 dst_key: PublicKey, +987 msg: disco::Message, +988 ) -> io::Result<()> { +989 let dst = match dst { +990 SendAddr::Udp(addr) => transports::Addr::Ip(addr), +991 SendAddr::Relay(url) => transports::Addr::Relay(url, dst_key), +992 }; +993 +994 trace!(?dst, %msg, "send disco message (UDP)"); +995 if self.is_closed() { +996 return Err(io::Error::new( +997 io::ErrorKind::NotConnected, +998 "connection closed", +999 )); +1000 } +1001 +1002 let pkt = self.disco.encode_and_seal(self.public_key, dst_key, &msg); +1003 +1004 let transmit = transports::Transmit { +1005 contents: &pkt, +1006 ecn: None, +1007 segment_size: None, +1008 }; +1009 +1010 let dst2 = dst.clone(); +1011 match sender.send(&dst2, None, &transmit).await { +1012 Ok(()) => { +1013 trace!(?dst, %msg, "sent disco message"); +1014 self.metrics.magicsock.sent_disco_udp.inc(); +1015 disco_message_sent(&msg, &self.metrics.magicsock); +1016 Ok(()) 1017 } -1018 } -1019 } -1020 -1021 /// Publishes our address to a discovery service, if configured. -1022 /// -1023 /// Called whenever our addresses or home relay node changes. -1024 fn publish_my_addr(&self) { -1025 if let Some(ref discovery) = self.discovery { -1026 let relay_url = self.my_relay(); -1027 let direct_addrs = self.direct_addrs.sockaddrs(); -1028 -1029 let user_data = self -1030 .discovery_user_data -1031 .read() -1032 .expect("lock poisened") -1033 .clone(); -1034 if relay_url.is_none() && direct_addrs.is_empty() && user_data.is_none() { -1035 // do not bother publishing if we don't have any information -1036 return; -1037 } -1038 -1039 let data = NodeData::new(relay_url, direct_addrs).with_user_data(user_data); -1040 discovery.publish(&data); -1041 } -1042 } -1043} -1044 -1045#[derive(Clone, Debug)] -1046enum MappedAddr { -1047 NodeId(NodeIdMappedAddr), -1048 #[cfg(not(wasm_browser))] -1049 Ip(IpMappedAddr), -1050 None(SocketAddr), -1051} -1052 -1053impl From<SocketAddr> for MappedAddr { -1054 fn from(value: SocketAddr) -> Self { -1055 match value.ip() { -1056 IpAddr::V4(_) => MappedAddr::None(value), -1057 IpAddr::V6(addr) => { -1058 if let Ok(node_id_mapped_addr) = NodeIdMappedAddr::try_from(addr) { -1059 return MappedAddr::NodeId(node_id_mapped_addr); -1060 } -1061 #[cfg(not(wasm_browser))] -1062 if let Ok(ip_mapped_addr) = IpMappedAddr::try_from(addr) { -1063 return MappedAddr::Ip(ip_mapped_addr); +1018 Err(err) => { +1019 warn!(?dst, ?msg, ?err, "failed to send disco message"); +1020 Err(err) +1021 } +1022 } +1023 } +1024 +1025 /// Publishes our address to a discovery service, if configured. +1026 /// +1027 /// Called whenever our addresses or home relay node changes. +1028 fn publish_my_addr(&self) { +1029 if let Some(ref discovery) = self.discovery { +1030 let relay_url = self.my_relay(); +1031 let direct_addrs = self.direct_addrs.sockaddrs(); +1032 +1033 let user_data = self +1034 .discovery_user_data +1035 .read() +1036 .expect("lock poisened") +1037 .clone(); +1038 if relay_url.is_none() && direct_addrs.is_empty() && user_data.is_none() { +1039 // do not bother publishing if we don't have any information +1040 return; +1041 } +1042 +1043 let data = NodeData::new(relay_url, direct_addrs).with_user_data(user_data); +1044 discovery.publish(&data); +1045 } +1046 } +1047} +1048 +1049#[derive(Clone, Debug)] +1050enum MappedAddr { +1051 NodeId(NodeIdMappedAddr), +1052 #[cfg(not(wasm_browser))] +1053 Ip(IpMappedAddr), +1054 None(SocketAddr), +1055} +1056 +1057impl From<SocketAddr> for MappedAddr { +1058 fn from(value: SocketAddr) -> Self { +1059 match value.ip() { +1060 IpAddr::V4(_) => MappedAddr::None(value), +1061 IpAddr::V6(addr) => { +1062 if let Ok(node_id_mapped_addr) = NodeIdMappedAddr::try_from(addr) { +1063 return MappedAddr::NodeId(node_id_mapped_addr); 1064 } -1065 MappedAddr::None(value) -1066 } -1067 } -1068 } -1069} -1070 -1071/// Manages currently running direct addr discovery, aka net_report runs. -1072/// -1073/// Invariants: -1074/// - only one direct addr update must be running at a time -1075/// - if an update is scheduled while another one is running, remember that -1076/// and start a new one when the current one has finished -1077#[derive(Debug)] -1078struct DirectAddrUpdateState { -1079 /// If set, start a new update as soon as the current one is finished. -1080 want_update: Option<UpdateReason>, -1081 msock: Arc<MagicSock>, -1082 #[cfg(not(wasm_browser))] -1083 port_mapper: portmapper::Client, -1084 /// The prober that discovers local network conditions, including the closest relay relay and NAT mappings. -1085 net_reporter: Arc<AsyncMutex<net_report::Client>>, -1086 relay_map: RelayMap, -1087 run_done: mpsc::Sender<()>, -1088} -1089 -1090#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)] -1091enum UpdateReason { -1092 /// Initial state -1093 #[default] -1094 None, -1095 RefreshForPeering, -1096 Periodic, -1097 PortmapUpdated, -1098 LinkChangeMajor, -1099 LinkChangeMinor, -1100} -1101 -1102impl UpdateReason { -1103 fn is_major(self) -> bool { -1104 matches!(self, Self::LinkChangeMajor) -1105 } -1106} -1107 -1108impl DirectAddrUpdateState { -1109 fn new( -1110 msock: Arc<MagicSock>, -1111 #[cfg(not(wasm_browser))] port_mapper: portmapper::Client, -1112 net_reporter: Arc<AsyncMutex<net_report::Client>>, -1113 relay_map: RelayMap, -1114 run_done: mpsc::Sender<()>, -1115 ) -> Self { -1116 DirectAddrUpdateState { -1117 want_update: Default::default(), -1118 #[cfg(not(wasm_browser))] -1119 port_mapper, -1120 net_reporter, -1121 msock, -1122 relay_map, -1123 run_done, -1124 } -1125 } -1126 -1127 /// Schedules a new run, either starting it immediately if none is running or -1128 /// scheduling it for later. -1129 fn schedule_run(&mut self, why: UpdateReason, if_state: IfStateDetails) { -1130 match self.net_reporter.clone().try_lock_owned() { -1131 Ok(net_reporter) => { -1132 self.run(why, if_state, net_reporter); -1133 } -1134 Err(_) => { -1135 let _ = self.want_update.insert(why); -1136 } -1137 } -1138 } -1139 -1140 /// If another run is needed, triggers this run, otherwise does nothing. -1141 fn try_run(&mut self, if_state: IfStateDetails) { -1142 match self.net_reporter.clone().try_lock_owned() { -1143 Ok(net_reporter) => { -1144 if let Some(why) = self.want_update.take() { -1145 self.run(why, if_state, net_reporter); -1146 } -1147 } -1148 Err(_) => { -1149 // do nothing -1150 } -1151 } -1152 } -1153 -1154 /// Trigger a new run. -1155 fn run( -1156 &mut self, -1157 why: UpdateReason, -1158 if_state: IfStateDetails, -1159 mut net_reporter: tokio::sync::OwnedMutexGuard<net_report::Client>, -1160 ) { -1161 debug!("starting direct addr update ({:?})", why); -1162 #[cfg(not(wasm_browser))] -1163 self.port_mapper.procure_mapping(); -1164 // Don't start a net report probe if we know -1165 // we are shutting down -1166 if self.msock.is_closing() || self.msock.is_closed() { -1167 debug!("skipping net_report, socket is shutting down"); -1168 return; -1169 } -1170 if self.relay_map.is_empty() { -1171 debug!("skipping net_report, empty RelayMap"); -1172 self.msock.net_report.set((None, why)).ok(); -1173 return; -1174 } -1175 -1176 debug!("requesting net_report report"); -1177 let msock = self.msock.clone(); -1178 -1179 let run_done = self.run_done.clone(); -1180 task::spawn(async move { -1181 let fut = time::timeout( -1182 NET_REPORT_TIMEOUT, -1183 net_reporter.get_report(if_state, why.is_major()), -1184 ); -1185 match fut.await { -1186 Ok(report) => { -1187 msock.net_report.set((Some(report), why)).ok(); -1188 } -1189 Err(time::Elapsed { .. }) => { -1190 warn!("net_report report timed out"); -1191 } -1192 } -1193 -1194 // mark run as finished -1195 debug!("direct addr update done ({:?})", why); -1196 run_done.send(()).await.ok(); -1197 }); -1198 } -1199} -1200 -1201#[allow(missing_docs)] -1202#[common_fields({ -1203 backtrace: Option<snafu::Backtrace>, -1204 #[snafu(implicit)] -1205 span_trace: n0_snafu::SpanTrace, -1206})] -1207#[derive(Debug, Snafu)] -1208#[non_exhaustive] -1209pub enum CreateHandleError { -1210 #[snafu(display("Failed to create bind sockets"))] -1211 BindSockets { source: io::Error }, -1212 #[snafu(display("Failed to create internal quinn endpoint"))] -1213 CreateQuinnEndpoint { source: io::Error }, -1214 #[snafu(display("Failed to create socket state"))] -1215 CreateSocketState { source: io::Error }, -1216 #[snafu(display("Failed to create netmon monitor"))] -1217 CreateNetmonMonitor { source: netmon::Error }, -1218 #[snafu(display("Failed to subscribe netmon monitor"))] -1219 SubscribeNetmonMonitor { source: netmon::Error }, -1220} -1221 -1222impl Handle { -1223 /// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`]. -1224 async fn new(opts: Options) -> Result<Self, CreateHandleError> { -1225 let Options { -1226 addr_v4, -1227 addr_v6, -1228 secret_key, -1229 relay_map, -1230 node_map, -1231 discovery, -1232 discovery_user_data, -1233 #[cfg(not(wasm_browser))] -1234 dns_resolver, -1235 proxy_url, -1236 server_config, -1237 #[cfg(any(test, feature = "test-utils"))] -1238 insecure_skip_relay_cert_verify, -1239 #[cfg(any(test, feature = "test-utils"))] -1240 path_selection, -1241 metrics, -1242 } = opts; -1243 -1244 let addr_v4 = addr_v4.unwrap_or_else(|| SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 0)); -1245 -1246 #[cfg(not(wasm_browser))] -1247 let (ip_transports, port_mapper) = -1248 bind_ip(addr_v4, addr_v6, &metrics).context(BindSocketsSnafu)?; +1065 #[cfg(not(wasm_browser))] +1066 if let Ok(ip_mapped_addr) = IpMappedAddr::try_from(addr) { +1067 return MappedAddr::Ip(ip_mapped_addr); +1068 } +1069 MappedAddr::None(value) +1070 } +1071 } +1072 } +1073} +1074 +1075/// Manages currently running direct addr discovery, aka net_report runs. +1076/// +1077/// Invariants: +1078/// - only one direct addr update must be running at a time +1079/// - if an update is scheduled while another one is running, remember that +1080/// and start a new one when the current one has finished +1081#[derive(Debug)] +1082struct DirectAddrUpdateState { +1083 /// If set, start a new update as soon as the current one is finished. +1084 want_update: Option<UpdateReason>, +1085 msock: Arc<MagicSock>, +1086 #[cfg(not(wasm_browser))] +1087 port_mapper: portmapper::Client, +1088 /// The prober that discovers local network conditions, including the closest relay relay and NAT mappings. +1089 net_reporter: Arc<AsyncMutex<net_report::Client>>, +1090 relay_map: RelayMap, +1091 run_done: mpsc::Sender<()>, +1092} +1093 +1094#[derive(Default, Debug, PartialEq, Eq, Clone, Copy)] +1095enum UpdateReason { +1096 /// Initial state +1097 #[default] +1098 None, +1099 RefreshForPeering, +1100 Periodic, +1101 PortmapUpdated, +1102 LinkChangeMajor, +1103 LinkChangeMinor, +1104} +1105 +1106impl UpdateReason { +1107 fn is_major(self) -> bool { +1108 matches!(self, Self::LinkChangeMajor) +1109 } +1110} +1111 +1112impl DirectAddrUpdateState { +1113 fn new( +1114 msock: Arc<MagicSock>, +1115 #[cfg(not(wasm_browser))] port_mapper: portmapper::Client, +1116 net_reporter: Arc<AsyncMutex<net_report::Client>>, +1117 relay_map: RelayMap, +1118 run_done: mpsc::Sender<()>, +1119 ) -> Self { +1120 DirectAddrUpdateState { +1121 want_update: Default::default(), +1122 #[cfg(not(wasm_browser))] +1123 port_mapper, +1124 net_reporter, +1125 msock, +1126 relay_map, +1127 run_done, +1128 } +1129 } +1130 +1131 /// Schedules a new run, either starting it immediately if none is running or +1132 /// scheduling it for later. +1133 fn schedule_run(&mut self, why: UpdateReason, if_state: IfStateDetails) { +1134 match self.net_reporter.clone().try_lock_owned() { +1135 Ok(net_reporter) => { +1136 self.run(why, if_state, net_reporter); +1137 } +1138 Err(_) => { +1139 let _ = self.want_update.insert(why); +1140 } +1141 } +1142 } +1143 +1144 /// If another run is needed, triggers this run, otherwise does nothing. +1145 fn try_run(&mut self, if_state: IfStateDetails) { +1146 match self.net_reporter.clone().try_lock_owned() { +1147 Ok(net_reporter) => { +1148 if let Some(why) = self.want_update.take() { +1149 self.run(why, if_state, net_reporter); +1150 } +1151 } +1152 Err(_) => { +1153 // do nothing +1154 } +1155 } +1156 } +1157 +1158 /// Trigger a new run. +1159 fn run( +1160 &mut self, +1161 why: UpdateReason, +1162 if_state: IfStateDetails, +1163 mut net_reporter: tokio::sync::OwnedMutexGuard<net_report::Client>, +1164 ) { +1165 debug!("starting direct addr update ({:?})", why); +1166 #[cfg(not(wasm_browser))] +1167 self.port_mapper.procure_mapping(); +1168 // Don't start a net report probe if we know +1169 // we are shutting down +1170 if self.msock.is_closing() || self.msock.is_closed() { +1171 debug!("skipping net_report, socket is shutting down"); +1172 return; +1173 } +1174 if self.relay_map.is_empty() { +1175 debug!("skipping net_report, empty RelayMap"); +1176 self.msock.net_report.set((None, why)).ok(); +1177 return; +1178 } +1179 +1180 debug!("requesting net_report report"); +1181 let msock = self.msock.clone(); +1182 +1183 let run_done = self.run_done.clone(); +1184 task::spawn(async move { +1185 let fut = time::timeout( +1186 NET_REPORT_TIMEOUT, +1187 net_reporter.get_report(if_state, why.is_major()), +1188 ); +1189 match fut.await { +1190 Ok(report) => { +1191 msock.net_report.set((Some(report), why)).ok(); +1192 } +1193 Err(time::Elapsed { .. }) => { +1194 warn!("net_report report timed out"); +1195 } +1196 } +1197 +1198 // mark run as finished +1199 debug!("direct addr update done ({:?})", why); +1200 run_done.send(()).await.ok(); +1201 }); +1202 } +1203} +1204 +1205#[allow(missing_docs)] +1206#[common_fields({ +1207 backtrace: Option<snafu::Backtrace>, +1208 #[snafu(implicit)] +1209 span_trace: n0_snafu::SpanTrace, +1210})] +1211#[derive(Debug, Snafu)] +1212#[non_exhaustive] +1213pub enum CreateHandleError { +1214 #[snafu(display("Failed to create bind sockets"))] +1215 BindSockets { source: io::Error }, +1216 #[snafu(display("Failed to create internal quinn endpoint"))] +1217 CreateQuinnEndpoint { source: io::Error }, +1218 #[snafu(display("Failed to create socket state"))] +1219 CreateSocketState { source: io::Error }, +1220 #[snafu(display("Failed to create netmon monitor"))] +1221 CreateNetmonMonitor { source: netmon::Error }, +1222 #[snafu(display("Failed to subscribe netmon monitor"))] +1223 SubscribeNetmonMonitor { source: netmon::Error }, +1224} +1225 +1226impl Handle { +1227 /// Creates a magic [`MagicSock`] listening on [`Options::addr_v4`] and [`Options::addr_v6`]. +1228 async fn new(opts: Options) -> Result<Self, CreateHandleError> { +1229 let Options { +1230 addr_v4, +1231 addr_v6, +1232 secret_key, +1233 relay_map, +1234 node_map, +1235 discovery, +1236 discovery_user_data, +1237 #[cfg(not(wasm_browser))] +1238 dns_resolver, +1239 proxy_url, +1240 server_config, +1241 #[cfg(any(test, feature = "test-utils"))] +1242 insecure_skip_relay_cert_verify, +1243 #[cfg(any(test, feature = "test-utils"))] +1244 path_selection, +1245 metrics, +1246 } = opts; +1247 +1248 let addr_v4 = addr_v4.unwrap_or_else(|| SocketAddrV4::new(Ipv4Addr::UNSPECIFIED, 0)); 1249 -1250 let ip_mapped_addrs = IpMappedAddresses::default(); -1251 -1252 let (actor_sender, actor_receiver) = mpsc::channel(256); +1250 #[cfg(not(wasm_browser))] +1251 let (ip_transports, port_mapper) = +1252 bind_ip(addr_v4, addr_v6, &metrics).context(BindSocketsSnafu)?; 1253 -1254 // load the node data -1255 let node_map = node_map.unwrap_or_default(); -1256 #[cfg(any(test, feature = "test-utils"))] -1257 let node_map = NodeMap::load_from_vec(node_map, path_selection, &metrics.magicsock); -1258 #[cfg(not(any(test, feature = "test-utils")))] -1259 let node_map = NodeMap::load_from_vec(node_map, &metrics.magicsock); -1260 -1261 let my_relay = Watchable::new(None); -1262 let ipv6_reported = Arc::new(AtomicBool::new(false)); -1263 -1264 let relay_transport = RelayTransport::new(RelayActorConfig { -1265 my_relay: my_relay.clone(), -1266 secret_key: secret_key.clone(), -1267 #[cfg(not(wasm_browser))] -1268 dns_resolver: dns_resolver.clone(), -1269 proxy_url: proxy_url.clone(), -1270 ipv6_reported: ipv6_reported.clone(), -1271 #[cfg(any(test, feature = "test-utils"))] -1272 insecure_skip_relay_cert_verify, -1273 metrics: metrics.magicsock.clone(), -1274 }); -1275 let relay_transports = vec![relay_transport]; -1276 -1277 let secret_encryption_key = secret_ed_box(secret_key.secret()); -1278 #[cfg(not(wasm_browser))] -1279 let ipv6 = ip_transports.iter().any(|t| t.bind_addr().is_ipv6()); +1254 let ip_mapped_addrs = IpMappedAddresses::default(); +1255 +1256 let (actor_sender, actor_receiver) = mpsc::channel(256); +1257 +1258 // load the node data +1259 let node_map = node_map.unwrap_or_default(); +1260 #[cfg(any(test, feature = "test-utils"))] +1261 let node_map = NodeMap::load_from_vec(node_map, path_selection, &metrics.magicsock); +1262 #[cfg(not(any(test, feature = "test-utils")))] +1263 let node_map = NodeMap::load_from_vec(node_map, &metrics.magicsock); +1264 +1265 let my_relay = Watchable::new(None); +1266 let ipv6_reported = Arc::new(AtomicBool::new(false)); +1267 +1268 let relay_transport = RelayTransport::new(RelayActorConfig { +1269 my_relay: my_relay.clone(), +1270 secret_key: secret_key.clone(), +1271 #[cfg(not(wasm_browser))] +1272 dns_resolver: dns_resolver.clone(), +1273 proxy_url: proxy_url.clone(), +1274 ipv6_reported: ipv6_reported.clone(), +1275 #[cfg(any(test, feature = "test-utils"))] +1276 insecure_skip_relay_cert_verify, +1277 metrics: metrics.magicsock.clone(), +1278 }); +1279 let relay_transports = vec![relay_transport]; 1280 -1281 #[cfg(not(wasm_browser))] -1282 let transports = Transports::new(ip_transports, relay_transports); -1283 #[cfg(wasm_browser)] -1284 let transports = Transports::new(relay_transports); -1285 -1286 let (disco, disco_receiver) = DiscoState::new(secret_encryption_key); -1287 -1288 let msock = Arc::new(MagicSock { -1289 public_key: secret_key.public(), -1290 closing: AtomicBool::new(false), -1291 closed: AtomicBool::new(false), -1292 disco, -1293 actor_sender: actor_sender.clone(), -1294 ipv6_reported, -1295 node_map, -1296 ip_mapped_addrs: ip_mapped_addrs.clone(), -1297 discovery, -1298 discovery_user_data: RwLock::new(discovery_user_data), -1299 direct_addrs: Default::default(), -1300 net_report: Watchable::new((None, UpdateReason::None)), -1301 #[cfg(not(wasm_browser))] -1302 dns_resolver: dns_resolver.clone(), -1303 discovery_subscribers: DiscoverySubscribers::new(), -1304 metrics: metrics.clone(), -1305 local_addrs_watch: transports.local_addrs_watch(), -1306 #[cfg(not(wasm_browser))] -1307 ip_bind_addrs: transports.ip_bind_addrs(), -1308 }); -1309 -1310 let mut endpoint_config = quinn::EndpointConfig::default(); -1311 // Setting this to false means that quinn will ignore packets that have the QUIC fixed bit -1312 // set to 0. The fixed bit is the 3rd bit of the first byte of a packet. -1313 // For performance reasons and to not rewrite buffers we pass non-QUIC UDP packets straight -1314 // through to quinn. We set the first byte of the packet to zero, which makes quinn ignore -1315 // the packet if grease_quic_bit is set to false. -1316 endpoint_config.grease_quic_bit(false); -1317 -1318 let sender = transports.create_sender(msock.clone()); -1319 let local_addrs_watch = transports.local_addrs_watch(); -1320 let network_change_sender = transports.create_network_change_sender(); +1281 let secret_encryption_key = secret_ed_box(secret_key.secret()); +1282 #[cfg(not(wasm_browser))] +1283 let ipv6 = ip_transports.iter().any(|t| t.bind_addr().is_ipv6()); +1284 +1285 #[cfg(not(wasm_browser))] +1286 let transports = Transports::new(ip_transports, relay_transports); +1287 #[cfg(wasm_browser)] +1288 let transports = Transports::new(relay_transports); +1289 +1290 let (disco, disco_receiver) = DiscoState::new(secret_encryption_key); +1291 +1292 let msock = Arc::new(MagicSock { +1293 public_key: secret_key.public(), +1294 closing: AtomicBool::new(false), +1295 closed: AtomicBool::new(false), +1296 disco, +1297 actor_sender: actor_sender.clone(), +1298 ipv6_reported, +1299 node_map, +1300 ip_mapped_addrs: ip_mapped_addrs.clone(), +1301 discovery, +1302 discovery_user_data: RwLock::new(discovery_user_data), +1303 direct_addrs: Default::default(), +1304 net_report: Watchable::new((None, UpdateReason::None)), +1305 #[cfg(not(wasm_browser))] +1306 dns_resolver: dns_resolver.clone(), +1307 discovery_subscribers: DiscoverySubscribers::new(), +1308 metrics: metrics.clone(), +1309 local_addrs_watch: transports.local_addrs_watch(), +1310 #[cfg(not(wasm_browser))] +1311 ip_bind_addrs: transports.ip_bind_addrs(), +1312 }); +1313 +1314 let mut endpoint_config = quinn::EndpointConfig::default(); +1315 // Setting this to false means that quinn will ignore packets that have the QUIC fixed bit +1316 // set to 0. The fixed bit is the 3rd bit of the first byte of a packet. +1317 // For performance reasons and to not rewrite buffers we pass non-QUIC UDP packets straight +1318 // through to quinn. We set the first byte of the packet to zero, which makes quinn ignore +1319 // the packet if grease_quic_bit is set to false. +1320 endpoint_config.grease_quic_bit(false); 1321 -1322 let endpoint = quinn::Endpoint::new_with_abstract_socket( -1323 endpoint_config, -1324 Some(server_config), -1325 Box::new(MagicUdpSocket { -1326 socket: msock.clone(), -1327 transports, -1328 }), -1329 #[cfg(not(wasm_browser))] -1330 Arc::new(quinn::TokioRuntime), -1331 #[cfg(wasm_browser)] -1332 Arc::new(crate::web_runtime::WebRuntime), -1333 ) -1334 .context(CreateQuinnEndpointSnafu)?; -1335 -1336 let network_monitor = netmon::Monitor::new() -1337 .await -1338 .context(CreateNetmonMonitorSnafu)?; +1322 let sender = transports.create_sender(msock.clone()); +1323 let local_addrs_watch = transports.local_addrs_watch(); +1324 let network_change_sender = transports.create_network_change_sender(); +1325 +1326 let endpoint = quinn::Endpoint::new_with_abstract_socket( +1327 endpoint_config, +1328 Some(server_config), +1329 Box::new(MagicUdpSocket { +1330 socket: msock.clone(), +1331 transports, +1332 }), +1333 #[cfg(not(wasm_browser))] +1334 Arc::new(quinn::TokioRuntime), +1335 #[cfg(wasm_browser)] +1336 Arc::new(crate::web_runtime::WebRuntime), +1337 ) +1338 .context(CreateQuinnEndpointSnafu)?; 1339 -1340 let qad_endpoint = endpoint.clone(); -1341 -1342 #[cfg(any(test, feature = "test-utils"))] -1343 let client_config = if insecure_skip_relay_cert_verify { -1344 iroh_relay::client::make_dangerous_client_config() -1345 } else { -1346 default_quic_client_config() -1347 }; -1348 #[cfg(not(any(test, feature = "test-utils")))] -1349 let client_config = default_quic_client_config(); -1350 -1351 let net_report_config = net_report::Options::default(); -1352 #[cfg(not(wasm_browser))] -1353 let net_report_config = net_report_config.quic_config(Some(QuicConfig { -1354 ep: qad_endpoint, -1355 client_config, -1356 ipv4: true, -1357 ipv6, -1358 })); -1359 -1360 #[cfg(any(test, feature = "test-utils"))] -1361 let net_report_config = -1362 net_report_config.insecure_skip_relay_cert_verify(insecure_skip_relay_cert_verify); +1340 let network_monitor = netmon::Monitor::new() +1341 .await +1342 .context(CreateNetmonMonitorSnafu)?; +1343 +1344 let qad_endpoint = endpoint.clone(); +1345 +1346 #[cfg(any(test, feature = "test-utils"))] +1347 let client_config = if insecure_skip_relay_cert_verify { +1348 iroh_relay::client::make_dangerous_client_config() +1349 } else { +1350 default_quic_client_config() +1351 }; +1352 #[cfg(not(any(test, feature = "test-utils")))] +1353 let client_config = default_quic_client_config(); +1354 +1355 let net_report_config = net_report::Options::default(); +1356 #[cfg(not(wasm_browser))] +1357 let net_report_config = net_report_config.quic_config(Some(QuicConfig { +1358 ep: qad_endpoint, +1359 client_config, +1360 ipv4: true, +1361 ipv6, +1362 })); 1363 -1364 let net_reporter = net_report::Client::new( -1365 #[cfg(not(wasm_browser))] -1366 dns_resolver, -1367 #[cfg(not(wasm_browser))] -1368 Some(ip_mapped_addrs), -1369 relay_map.clone(), -1370 net_report_config, -1371 metrics.net_report.clone(), -1372 ); -1373 -1374 let (direct_addr_done_tx, direct_addr_done_rx) = mpsc::channel(8); -1375 let direct_addr_update_state = DirectAddrUpdateState::new( -1376 msock.clone(), -1377 #[cfg(not(wasm_browser))] -1378 port_mapper, -1379 Arc::new(AsyncMutex::new(net_reporter)), -1380 relay_map, -1381 direct_addr_done_tx, -1382 ); -1383 -1384 let netmon_watcher = network_monitor.interface_state(); -1385 let actor = Actor { -1386 msg_receiver: actor_receiver, -1387 msock: msock.clone(), -1388 periodic_re_stun_timer: new_re_stun_timer(false), -1389 network_monitor, -1390 netmon_watcher, -1391 direct_addr_update_state, -1392 network_change_sender, -1393 direct_addr_done_rx, -1394 pending_call_me_maybes: Default::default(), -1395 disco_receiver, -1396 }; -1397 -1398 let actor_token = CancellationToken::new(); -1399 let token = actor_token.clone(); -1400 let actor_task = task::spawn( -1401 actor -1402 .run(token, local_addrs_watch, sender) -1403 .instrument(info_span!("actor")), -1404 ); -1405 -1406 let actor_task = Arc::new(Mutex::new(Some(AbortOnDropHandle::new(actor_task)))); -1407 -1408 Ok(Handle { -1409 msock, -1410 actor_task, -1411 endpoint, -1412 actor_token, -1413 }) -1414 } -1415 -1416 /// The underlying [`quinn::Endpoint`] -1417 pub fn endpoint(&self) -> &quinn::Endpoint { -1418 &self.endpoint -1419 } -1420 -1421 /// Closes the connection. -1422 /// -1423 /// Only the first close does anything. Any later closes return nil. -1424 /// Polling the socket ([`AsyncUdpSocket::poll_recv`]) will return [`Poll::Pending`] -1425 /// indefinitely after this call. -1426 #[instrument(skip_all)] -1427 pub(crate) async fn close(&self) { -1428 trace!(me = ?self.public_key, "magicsock closing..."); -1429 // Initiate closing all connections, and refuse future connections. -1430 self.endpoint.close(0u16.into(), b""); -1431 -1432 // In the history of this code, this call had been -1433 // - removed: https://github.com/n0-computer/iroh/pull/1753 -1434 // - then added back in: https://github.com/n0-computer/iroh/pull/2227/files#diff-ba27e40e2986a3919b20f6b412ad4fe63154af648610ea5d9ed0b5d5b0e2d780R573 -1435 // - then removed again: https://github.com/n0-computer/iroh/pull/3165 -1436 // and finally added back in together with this comment. -1437 // So before removing this call, please consider carefully. -1438 // Among other things, this call tries its best to make sure that any queued close frames -1439 // (e.g. via the call to `endpoint.close(...)` above), are flushed out to the sockets -1440 // *and acknowledged* (or time out with the "probe timeout" of usually 3 seconds). -1441 // This allows the other endpoints for these connections to be notified to release -1442 // their resources, or - depending on the protocol - that all data was received. -1443 // With the current quinn API, this is the only way to ensure protocol code can use -1444 // connection close codes, and close the endpoint properly. -1445 // If this call is skipped, then connections that protocols close just shortly before the -1446 // call to `Endpoint::close` will in most cases cause connection time-outs on remote ends. -1447 self.endpoint.wait_idle().await; -1448 -1449 if self.msock.is_closed() { -1450 return; -1451 } -1452 self.msock.closing.store(true, Ordering::Relaxed); -1453 self.actor_token.cancel(); -1454 -1455 // MutexGuard is not held across await points -1456 let task = self.actor_task.lock().expect("poisoned").take(); -1457 if let Some(task) = task { -1458 // give the tasks a moment to shutdown cleanly -1459 let shutdown_done = time::timeout(Duration::from_millis(100), async move { -1460 if let Err(err) = task.await { -1461 warn!("unexpected error in task shutdown: {:?}", err); -1462 } -1463 }) -1464 .await; -1465 match shutdown_done { -1466 Ok(_) => trace!("tasks finished in time, shutdown complete"), -1467 Err(time::Elapsed { .. }) => { -1468 // Dropping the task will abort itt -1469 warn!("tasks didn't finish in time, aborting"); -1470 } -1471 } -1472 } -1473 -1474 self.msock.closed.store(true, Ordering::SeqCst); -1475 -1476 trace!("magicsock closed"); -1477 } -1478} +1364 #[cfg(any(test, feature = "test-utils"))] +1365 let net_report_config = +1366 net_report_config.insecure_skip_relay_cert_verify(insecure_skip_relay_cert_verify); +1367 +1368 let net_reporter = net_report::Client::new( +1369 #[cfg(not(wasm_browser))] +1370 dns_resolver, +1371 #[cfg(not(wasm_browser))] +1372 Some(ip_mapped_addrs), +1373 relay_map.clone(), +1374 net_report_config, +1375 metrics.net_report.clone(), +1376 ); +1377 +1378 let (direct_addr_done_tx, direct_addr_done_rx) = mpsc::channel(8); +1379 let direct_addr_update_state = DirectAddrUpdateState::new( +1380 msock.clone(), +1381 #[cfg(not(wasm_browser))] +1382 port_mapper, +1383 Arc::new(AsyncMutex::new(net_reporter)), +1384 relay_map, +1385 direct_addr_done_tx, +1386 ); +1387 +1388 let netmon_watcher = network_monitor.interface_state(); +1389 let actor = Actor { +1390 msg_receiver: actor_receiver, +1391 msock: msock.clone(), +1392 periodic_re_stun_timer: new_re_stun_timer(false), +1393 network_monitor, +1394 netmon_watcher, +1395 direct_addr_update_state, +1396 network_change_sender, +1397 direct_addr_done_rx, +1398 pending_call_me_maybes: Default::default(), +1399 disco_receiver, +1400 }; +1401 +1402 let actor_token = CancellationToken::new(); +1403 let token = actor_token.clone(); +1404 let actor_task = task::spawn( +1405 actor +1406 .run(token, local_addrs_watch, sender) +1407 .instrument(info_span!("actor")), +1408 ); +1409 +1410 let actor_task = Arc::new(Mutex::new(Some(AbortOnDropHandle::new(actor_task)))); +1411 +1412 Ok(Handle { +1413 msock, +1414 actor_task, +1415 endpoint, +1416 actor_token, +1417 }) +1418 } +1419 +1420 /// The underlying [`quinn::Endpoint`] +1421 pub fn endpoint(&self) -> &quinn::Endpoint { +1422 &self.endpoint +1423 } +1424 +1425 /// Closes the connection. +1426 /// +1427 /// Only the first close does anything. Any later closes return nil. +1428 /// Polling the socket ([`AsyncUdpSocket::poll_recv`]) will return [`Poll::Pending`] +1429 /// indefinitely after this call. +1430 #[instrument(skip_all)] +1431 pub(crate) async fn close(&self) { +1432 trace!(me = ?self.public_key, "magicsock closing..."); +1433 // Initiate closing all connections, and refuse future connections. +1434 self.endpoint.close(0u16.into(), b""); +1435 +1436 // In the history of this code, this call had been +1437 // - removed: https://github.com/n0-computer/iroh/pull/1753 +1438 // - then added back in: https://github.com/n0-computer/iroh/pull/2227/files#diff-ba27e40e2986a3919b20f6b412ad4fe63154af648610ea5d9ed0b5d5b0e2d780R573 +1439 // - then removed again: https://github.com/n0-computer/iroh/pull/3165 +1440 // and finally added back in together with this comment. +1441 // So before removing this call, please consider carefully. +1442 // Among other things, this call tries its best to make sure that any queued close frames +1443 // (e.g. via the call to `endpoint.close(...)` above), are flushed out to the sockets +1444 // *and acknowledged* (or time out with the "probe timeout" of usually 3 seconds). +1445 // This allows the other endpoints for these connections to be notified to release +1446 // their resources, or - depending on the protocol - that all data was received. +1447 // With the current quinn API, this is the only way to ensure protocol code can use +1448 // connection close codes, and close the endpoint properly. +1449 // If this call is skipped, then connections that protocols close just shortly before the +1450 // call to `Endpoint::close` will in most cases cause connection time-outs on remote ends. +1451 self.endpoint.wait_idle().await; +1452 +1453 if self.msock.is_closed() { +1454 return; +1455 } +1456 self.msock.closing.store(true, Ordering::Relaxed); +1457 self.actor_token.cancel(); +1458 +1459 // MutexGuard is not held across await points +1460 let task = self.actor_task.lock().expect("poisoned").take(); +1461 if let Some(task) = task { +1462 // give the tasks a moment to shutdown cleanly +1463 let shutdown_done = time::timeout(Duration::from_millis(100), async move { +1464 if let Err(err) = task.await { +1465 warn!("unexpected error in task shutdown: {:?}", err); +1466 } +1467 }) +1468 .await; +1469 match shutdown_done { +1470 Ok(_) => trace!("tasks finished in time, shutdown complete"), +1471 Err(time::Elapsed { .. }) => { +1472 // Dropping the task will abort itt +1473 warn!("tasks didn't finish in time, aborting"); +1474 } +1475 } +1476 } +1477 +1478 self.msock.closed.store(true, Ordering::SeqCst); 1479 -1480fn default_quic_client_config() -> rustls::ClientConfig { -1481 // create a client config for the endpoint to use for QUIC address discovery -1482 let root_store = -1483 rustls::RootCertStore::from_iter(webpki_roots::TLS_SERVER_ROOTS.iter().cloned()); -1484 rustls::client::ClientConfig::builder_with_provider(Arc::new( -1485 rustls::crypto::ring::default_provider(), -1486 )) -1487 .with_safe_default_protocol_versions() -1488 .expect("ring supports these") -1489 .with_root_certificates(root_store) -1490 .with_no_client_auth() -1491} -1492 -1493#[derive(Debug)] -1494struct DiscoState { -1495 /// Encryption key for this node. -1496 secret_encryption_key: crypto_box::SecretKey, -1497 /// The state for an active DiscoKey. -1498 secrets: Mutex<HashMap<PublicKey, SharedSecret>>, -1499 /// Disco (ping) queue -1500 sender: mpsc::Sender<(SendAddr, PublicKey, disco::Message)>, -1501} -1502 -1503impl DiscoState { -1504 fn new( -1505 secret_encryption_key: crypto_box::SecretKey, -1506 ) -> (Self, mpsc::Receiver<(SendAddr, PublicKey, disco::Message)>) { -1507 let (disco_sender, disco_receiver) = mpsc::channel(256); -1508 -1509 ( -1510 Self { -1511 secret_encryption_key, -1512 secrets: Default::default(), -1513 sender: disco_sender, -1514 }, -1515 disco_receiver, -1516 ) -1517 } -1518 -1519 fn try_send(&self, dst: SendAddr, node_id: PublicKey, msg: disco::Message) -> bool { -1520 self.sender.try_send((dst, node_id, msg)).is_ok() +1480 trace!("magicsock closed"); +1481 } +1482} +1483 +1484fn default_quic_client_config() -> rustls::ClientConfig { +1485 // create a client config for the endpoint to use for QUIC address discovery +1486 let root_store = +1487 rustls::RootCertStore::from_iter(webpki_roots::TLS_SERVER_ROOTS.iter().cloned()); +1488 rustls::client::ClientConfig::builder_with_provider(Arc::new( +1489 rustls::crypto::ring::default_provider(), +1490 )) +1491 .with_safe_default_protocol_versions() +1492 .expect("ring supports these") +1493 .with_root_certificates(root_store) +1494 .with_no_client_auth() +1495} +1496 +1497#[derive(Debug)] +1498struct DiscoState { +1499 /// Encryption key for this node. +1500 secret_encryption_key: crypto_box::SecretKey, +1501 /// The state for an active DiscoKey. +1502 secrets: Mutex<HashMap<PublicKey, SharedSecret>>, +1503 /// Disco (ping) queue +1504 sender: mpsc::Sender<(SendAddr, PublicKey, disco::Message)>, +1505} +1506 +1507impl DiscoState { +1508 fn new( +1509 secret_encryption_key: crypto_box::SecretKey, +1510 ) -> (Self, mpsc::Receiver<(SendAddr, PublicKey, disco::Message)>) { +1511 let (disco_sender, disco_receiver) = mpsc::channel(256); +1512 +1513 ( +1514 Self { +1515 secret_encryption_key, +1516 secrets: Default::default(), +1517 sender: disco_sender, +1518 }, +1519 disco_receiver, +1520 ) 1521 } 1522 -1523 fn encode_and_seal( -1524 &self, -1525 this_node_id: NodeId, -1526 other_node_id: NodeId, -1527 msg: &disco::Message, -1528 ) -> Bytes { -1529 let mut seal = msg.as_bytes(); -1530 self.get_secret(other_node_id, |secret| secret.seal(&mut seal)); -1531 disco::encode_message(&this_node_id, seal).into() -1532 } -1533 -1534 fn unseal_and_decode( -1535 &self, -1536 node_id: PublicKey, -1537 sealed_box: &[u8], -1538 ) -> Result<disco::Message, DiscoBoxError> { -1539 let mut sealed_box = sealed_box.to_vec(); -1540 self.get_secret(node_id, |secret| secret.open(&mut sealed_box)) -1541 .context(OpenSnafu)?; -1542 disco::Message::from_bytes(&sealed_box).context(ParseSnafu) -1543 } -1544 -1545 fn get_secret<F, T>(&self, node_id: PublicKey, cb: F) -> T -1546 where -1547 F: FnOnce(&mut SharedSecret) -> T, -1548 { -1549 let mut inner = self.secrets.lock().expect("poisoned"); -1550 let x = inner.entry(node_id).or_insert_with(|| { -1551 let public_key = public_ed_box(&node_id.public()); -1552 SharedSecret::new(&self.secret_encryption_key, &public_key) -1553 }); -1554 cb(x) -1555 } -1556} -1557 -1558#[allow(missing_docs)] -1559#[common_fields({ -1560 backtrace: Option<snafu::Backtrace>, -1561 #[snafu(implicit)] -1562 span_trace: n0_snafu::SpanTrace, -1563})] -1564#[derive(Debug, Snafu)] -1565#[non_exhaustive] -1566enum DiscoBoxError { -1567 #[snafu(display("Failed to open crypto box"))] -1568 Open { -1569 #[snafu(source(from(DecryptionError, Box::new)))] -1570 source: Box<DecryptionError>, -1571 }, -1572 #[snafu(display("Failed to parse disco message"))] -1573 Parse { -1574 #[snafu(source(from(disco::ParseError, Box::new)))] -1575 source: Box<disco::ParseError>, -1576 }, -1577} -1578 -1579#[derive(Debug)] -1580struct MagicUdpSocket { -1581 socket: Arc<MagicSock>, -1582 transports: Transports, -1583} -1584 -1585impl AsyncUdpSocket for MagicUdpSocket { -1586 fn create_sender(&self) -> Pin<Box<dyn quinn::UdpSender>> { -1587 Box::pin(self.transports.create_sender(self.socket.clone())) -1588 } -1589 -1590 /// NOTE: Receiving on a closed socket will return [`Poll::Pending`] indefinitely. -1591 fn poll_recv( -1592 &mut self, -1593 cx: &mut Context, -1594 bufs: &mut [io::IoSliceMut<'_>], -1595 metas: &mut [quinn_udp::RecvMeta], -1596 ) -> Poll<io::Result<usize>> { -1597 self.transports.poll_recv(cx, bufs, metas, &self.socket) -1598 } -1599 -1600 #[cfg(not(wasm_browser))] -1601 fn local_addr(&self) -> io::Result<SocketAddr> { -1602 let addrs: Vec<_> = self -1603 .transports -1604 .local_addrs() -1605 .into_iter() -1606 .filter_map(|addr| { -1607 let addr: SocketAddr = addr.into_socket_addr()?; -1608 Some(addr) -1609 }) -1610 .collect(); -1611 -1612 if let Some(addr) = addrs.iter().find(|addr| addr.is_ipv6()) { -1613 return Ok(*addr); -1614 } -1615 if let Some(SocketAddr::V4(addr)) = addrs.first() { -1616 // Pretend to be IPv6, because our `MappedAddr`s need to be IPv6. -1617 let ip = addr.ip().to_ipv6_mapped().into(); -1618 return Ok(SocketAddr::new(ip, addr.port())); -1619 } -1620 -1621 Err(io::Error::other("no valid address available")) -1622 } -1623 -1624 #[cfg(wasm_browser)] -1625 fn local_addr(&self) -> io::Result<SocketAddr> { -1626 // Again, we need to pretend we're IPv6, because of our `MappedAddr`s. -1627 Ok(SocketAddr::new(std::net::Ipv6Addr::LOCALHOST.into(), 0)) -1628 } -1629 -1630 fn max_receive_segments(&self) -> usize { -1631 self.transports.max_receive_segments() +1523 fn try_send(&self, dst: SendAddr, node_id: PublicKey, msg: disco::Message) -> bool { +1524 self.sender.try_send((dst, node_id, msg)).is_ok() +1525 } +1526 +1527 fn encode_and_seal( +1528 &self, +1529 this_node_id: NodeId, +1530 other_node_id: NodeId, +1531 msg: &disco::Message, +1532 ) -> Bytes { +1533 let mut seal = msg.as_bytes(); +1534 self.get_secret(other_node_id, |secret| secret.seal(&mut seal)); +1535 disco::encode_message(&this_node_id, seal).into() +1536 } +1537 +1538 fn unseal_and_decode( +1539 &self, +1540 node_id: PublicKey, +1541 sealed_box: &[u8], +1542 ) -> Result<disco::Message, DiscoBoxError> { +1543 let mut sealed_box = sealed_box.to_vec(); +1544 self.get_secret(node_id, |secret| secret.open(&mut sealed_box)) +1545 .context(OpenSnafu)?; +1546 disco::Message::from_bytes(&sealed_box).context(ParseSnafu) +1547 } +1548 +1549 fn get_secret<F, T>(&self, node_id: PublicKey, cb: F) -> T +1550 where +1551 F: FnOnce(&mut SharedSecret) -> T, +1552 { +1553 let mut inner = self.secrets.lock().expect("poisoned"); +1554 let x = inner.entry(node_id).or_insert_with(|| { +1555 let public_key = public_ed_box(&node_id.public()); +1556 SharedSecret::new(&self.secret_encryption_key, &public_key) +1557 }); +1558 cb(x) +1559 } +1560} +1561 +1562#[allow(missing_docs)] +1563#[common_fields({ +1564 backtrace: Option<snafu::Backtrace>, +1565 #[snafu(implicit)] +1566 span_trace: n0_snafu::SpanTrace, +1567})] +1568#[derive(Debug, Snafu)] +1569#[non_exhaustive] +1570enum DiscoBoxError { +1571 #[snafu(display("Failed to open crypto box"))] +1572 Open { +1573 #[snafu(source(from(DecryptionError, Box::new)))] +1574 source: Box<DecryptionError>, +1575 }, +1576 #[snafu(display("Failed to parse disco message"))] +1577 Parse { +1578 #[snafu(source(from(disco::ParseError, Box::new)))] +1579 source: Box<disco::ParseError>, +1580 }, +1581} +1582 +1583#[derive(Debug)] +1584struct MagicUdpSocket { +1585 socket: Arc<MagicSock>, +1586 transports: Transports, +1587} +1588 +1589impl AsyncUdpSocket for MagicUdpSocket { +1590 fn create_sender(&self) -> Pin<Box<dyn quinn::UdpSender>> { +1591 Box::pin(self.transports.create_sender(self.socket.clone())) +1592 } +1593 +1594 /// NOTE: Receiving on a closed socket will return [`Poll::Pending`] indefinitely. +1595 fn poll_recv( +1596 &mut self, +1597 cx: &mut Context, +1598 bufs: &mut [io::IoSliceMut<'_>], +1599 metas: &mut [quinn_udp::RecvMeta], +1600 ) -> Poll<io::Result<usize>> { +1601 self.transports.poll_recv(cx, bufs, metas, &self.socket) +1602 } +1603 +1604 #[cfg(not(wasm_browser))] +1605 fn local_addr(&self) -> io::Result<SocketAddr> { +1606 let addrs: Vec<_> = self +1607 .transports +1608 .local_addrs() +1609 .into_iter() +1610 .filter_map(|addr| { +1611 let addr: SocketAddr = addr.into_socket_addr()?; +1612 Some(addr) +1613 }) +1614 .collect(); +1615 +1616 if let Some(addr) = addrs.iter().find(|addr| addr.is_ipv6()) { +1617 return Ok(*addr); +1618 } +1619 if let Some(SocketAddr::V4(addr)) = addrs.first() { +1620 // Pretend to be IPv6, because our `MappedAddr`s need to be IPv6. +1621 let ip = addr.ip().to_ipv6_mapped().into(); +1622 return Ok(SocketAddr::new(ip, addr.port())); +1623 } +1624 +1625 Err(io::Error::other("no valid address available")) +1626 } +1627 +1628 #[cfg(wasm_browser)] +1629 fn local_addr(&self) -> io::Result<SocketAddr> { +1630 // Again, we need to pretend we're IPv6, because of our `MappedAddr`s. +1631 Ok(SocketAddr::new(std::net::Ipv6Addr::LOCALHOST.into(), 0)) 1632 } 1633 -1634 fn may_fragment(&self) -> bool { -1635 self.transports.may_fragment() +1634 fn max_receive_segments(&self) -> usize { +1635 self.transports.max_receive_segments() 1636 } -1637} -1638 -1639#[derive(Debug)] -1640enum ActorMessage { -1641 PingActions(Vec<PingAction>), -1642 EndpointPingExpired(usize, stun_rs::TransactionId), -1643 NetworkChange, -1644 ScheduleDirectAddrUpdate(UpdateReason, Option<(NodeId, RelayUrl)>), -1645 #[cfg(test)] -1646 ForceNetworkChange(bool), -1647} -1648 -1649struct Actor { -1650 msock: Arc<MagicSock>, -1651 msg_receiver: mpsc::Receiver<ActorMessage>, -1652 /// When set, is an AfterFunc timer that will call MagicSock::do_periodic_stun. -1653 periodic_re_stun_timer: time::Interval, -1654 -1655 network_monitor: netmon::Monitor, -1656 netmon_watcher: n0_watcher::Direct<netmon::State>, -1657 network_change_sender: transports::NetworkChangeSender, -1658 /// Indicates the direct addr update state. -1659 direct_addr_update_state: DirectAddrUpdateState, -1660 direct_addr_done_rx: mpsc::Receiver<()>, -1661 -1662 /// List of CallMeMaybe disco messages that should be sent out after -1663 /// the next endpoint update completes -1664 pending_call_me_maybes: HashMap<PublicKey, RelayUrl>, -1665 disco_receiver: mpsc::Receiver<(SendAddr, PublicKey, disco::Message)>, -1666} -1667 -1668#[cfg(not(wasm_browser))] -1669fn bind_ip( -1670 addr_v4: SocketAddrV4, -1671 addr_v6: Option<SocketAddrV6>, -1672 metrics: &EndpointMetrics, -1673) -> io::Result<(Vec<IpTransport>, portmapper::Client)> { -1674 let port_mapper = -1675 portmapper::Client::with_metrics(Default::default(), metrics.portmapper.clone()); -1676 -1677 let v4 = Arc::new(bind_with_fallback(SocketAddr::V4(addr_v4))?); -1678 let ip4_port = v4.local_addr()?.port(); -1679 let ip6_port = ip4_port.checked_add(1).unwrap_or(ip4_port - 1); +1637 +1638 fn may_fragment(&self) -> bool { +1639 self.transports.may_fragment() +1640 } +1641} +1642 +1643#[derive(Debug)] +1644enum ActorMessage { +1645 PingActions(Vec<PingAction>), +1646 EndpointPingExpired(usize, stun_rs::TransactionId), +1647 NetworkChange, +1648 ScheduleDirectAddrUpdate(UpdateReason, Option<(NodeId, RelayUrl)>), +1649 #[cfg(test)] +1650 ForceNetworkChange(bool), +1651} +1652 +1653struct Actor { +1654 msock: Arc<MagicSock>, +1655 msg_receiver: mpsc::Receiver<ActorMessage>, +1656 /// When set, is an AfterFunc timer that will call MagicSock::do_periodic_stun. +1657 periodic_re_stun_timer: time::Interval, +1658 +1659 network_monitor: netmon::Monitor, +1660 netmon_watcher: n0_watcher::Direct<netmon::State>, +1661 network_change_sender: transports::NetworkChangeSender, +1662 /// Indicates the direct addr update state. +1663 direct_addr_update_state: DirectAddrUpdateState, +1664 direct_addr_done_rx: mpsc::Receiver<()>, +1665 +1666 /// List of CallMeMaybe disco messages that should be sent out after +1667 /// the next endpoint update completes +1668 pending_call_me_maybes: HashMap<PublicKey, RelayUrl>, +1669 disco_receiver: mpsc::Receiver<(SendAddr, PublicKey, disco::Message)>, +1670} +1671 +1672#[cfg(not(wasm_browser))] +1673fn bind_ip( +1674 addr_v4: SocketAddrV4, +1675 addr_v6: Option<SocketAddrV6>, +1676 metrics: &EndpointMetrics, +1677) -> io::Result<(Vec<IpTransport>, portmapper::Client)> { +1678 let port_mapper = +1679 portmapper::Client::with_metrics(Default::default(), metrics.portmapper.clone()); 1680 -1681 let addr_v6 = -1682 addr_v6.unwrap_or_else(|| SocketAddrV6::new(Ipv6Addr::UNSPECIFIED, ip6_port, 0, 0)); -1683 -1684 let v6 = match bind_with_fallback(SocketAddr::V6(addr_v6)) { -1685 Ok(sock) => Some(Arc::new(sock)), -1686 Err(err) => { -1687 info!("bind ignoring IPv6 bind failure: {:?}", err); -1688 None -1689 } -1690 }; -1691 -1692 let port = v4.local_addr().map_or(0, |p| p.port()); -1693 -1694 let mut ip = vec![IpTransport::new( -1695 addr_v4.into(), -1696 v4, -1697 metrics.magicsock.clone(), -1698 )]; -1699 if let Some(v6) = v6 { -1700 ip.push(IpTransport::new( -1701 addr_v6.into(), -1702 v6, -1703 metrics.magicsock.clone(), -1704 )) -1705 } -1706 -1707 // NOTE: we can end up with a zero port if `netwatch::UdpSocket::socket_addr` fails -1708 match port.try_into() { -1709 Ok(non_zero_port) => { -1710 port_mapper.update_local_port(non_zero_port); -1711 } -1712 Err(_zero_port) => debug!("Skipping port mapping with zero local port"), -1713 } -1714 -1715 Ok((ip, port_mapper)) -1716} -1717 -1718impl Actor { -1719 async fn run( -1720 mut self, -1721 shutdown_token: CancellationToken, -1722 mut watcher: impl Watcher<Value = Vec<transports::Addr>> + Send + Sync, -1723 sender: UdpSender, -1724 ) { -1725 // Initialize addresses -1726 #[cfg(not(wasm_browser))] -1727 self.update_direct_addresses(None); -1728 -1729 // Setup network monitoring -1730 let mut current_netmon_state = self.netmon_watcher.get().expect("missing network state"); -1731 -1732 #[cfg(not(wasm_browser))] -1733 let mut direct_addr_heartbeat_timer = time::interval(HEARTBEAT_INTERVAL); -1734 -1735 #[cfg(not(wasm_browser))] -1736 let mut portmap_watcher = self -1737 .direct_addr_update_state -1738 .port_mapper -1739 .watch_external_address(); -1740 -1741 let mut discovery_events: BoxStream<DiscoveryItem> = Box::pin(n0_future::stream::empty()); -1742 if let Some(d) = self.msock.discovery() { -1743 if let Some(events) = d.subscribe() { -1744 discovery_events = events; -1745 } -1746 } -1747 -1748 let mut receiver_closed = false; -1749 #[cfg_attr(wasm_browser, allow(unused_mut))] -1750 let mut portmap_watcher_closed = false; +1681 let v4 = Arc::new(bind_with_fallback(SocketAddr::V4(addr_v4))?); +1682 let ip4_port = v4.local_addr()?.port(); +1683 let ip6_port = ip4_port.checked_add(1).unwrap_or(ip4_port - 1); +1684 +1685 let addr_v6 = +1686 addr_v6.unwrap_or_else(|| SocketAddrV6::new(Ipv6Addr::UNSPECIFIED, ip6_port, 0, 0)); +1687 +1688 let v6 = match bind_with_fallback(SocketAddr::V6(addr_v6)) { +1689 Ok(sock) => Some(Arc::new(sock)), +1690 Err(err) => { +1691 info!("bind ignoring IPv6 bind failure: {:?}", err); +1692 None +1693 } +1694 }; +1695 +1696 let port = v4.local_addr().map_or(0, |p| p.port()); +1697 +1698 let mut ip = vec![IpTransport::new( +1699 addr_v4.into(), +1700 v4, +1701 metrics.magicsock.clone(), +1702 )]; +1703 if let Some(v6) = v6 { +1704 ip.push(IpTransport::new( +1705 addr_v6.into(), +1706 v6, +1707 metrics.magicsock.clone(), +1708 )) +1709 } +1710 +1711 // NOTE: we can end up with a zero port if `netwatch::UdpSocket::socket_addr` fails +1712 match port.try_into() { +1713 Ok(non_zero_port) => { +1714 port_mapper.update_local_port(non_zero_port); +1715 } +1716 Err(_zero_port) => debug!("Skipping port mapping with zero local port"), +1717 } +1718 +1719 Ok((ip, port_mapper)) +1720} +1721 +1722impl Actor { +1723 async fn run( +1724 mut self, +1725 shutdown_token: CancellationToken, +1726 mut watcher: impl Watcher<Value = Vec<transports::Addr>> + Send + Sync, +1727 sender: UdpSender, +1728 ) { +1729 // Initialize addresses +1730 #[cfg(not(wasm_browser))] +1731 self.update_direct_addresses(None); +1732 +1733 // Setup network monitoring +1734 let mut current_netmon_state = self.netmon_watcher.get().expect("missing network state"); +1735 +1736 #[cfg(not(wasm_browser))] +1737 let mut direct_addr_heartbeat_timer = time::interval(HEARTBEAT_INTERVAL); +1738 +1739 #[cfg(not(wasm_browser))] +1740 let mut portmap_watcher = self +1741 .direct_addr_update_state +1742 .port_mapper +1743 .watch_external_address(); +1744 +1745 let mut discovery_events: BoxStream<DiscoveryItem> = Box::pin(n0_future::stream::empty()); +1746 if let Some(d) = self.msock.discovery() { +1747 if let Some(events) = d.subscribe() { +1748 discovery_events = events; +1749 } +1750 } 1751 -1752 let mut net_report_watcher = self.msock.net_report.watch(); -1753 -1754 loop { -1755 self.msock.metrics.magicsock.actor_tick_main.inc(); -1756 #[cfg(not(wasm_browser))] -1757 let portmap_watcher_changed = portmap_watcher.changed(); -1758 #[cfg(wasm_browser)] -1759 let portmap_watcher_changed = n0_future::future::pending(); -1760 -1761 #[cfg(not(wasm_browser))] -1762 let direct_addr_heartbeat_timer_tick = direct_addr_heartbeat_timer.tick(); -1763 #[cfg(wasm_browser)] -1764 let direct_addr_heartbeat_timer_tick = n0_future::future::pending(); -1765 -1766 tokio::select! { -1767 _ = shutdown_token.cancelled() => { -1768 debug!("shutting down"); -1769 return; -1770 } -1771 msg = self.msg_receiver.recv(), if !receiver_closed => { -1772 let Some(msg) = msg else { -1773 trace!("tick: magicsock receiver closed"); -1774 self.msock.metrics.magicsock.actor_tick_other.inc(); -1775 -1776 receiver_closed = true; -1777 continue; -1778 }; +1752 let mut receiver_closed = false; +1753 #[cfg_attr(wasm_browser, allow(unused_mut))] +1754 let mut portmap_watcher_closed = false; +1755 +1756 let mut net_report_watcher = self.msock.net_report.watch(); +1757 +1758 loop { +1759 self.msock.metrics.magicsock.actor_tick_main.inc(); +1760 #[cfg(not(wasm_browser))] +1761 let portmap_watcher_changed = portmap_watcher.changed(); +1762 #[cfg(wasm_browser)] +1763 let portmap_watcher_changed = n0_future::future::pending(); +1764 +1765 #[cfg(not(wasm_browser))] +1766 let direct_addr_heartbeat_timer_tick = direct_addr_heartbeat_timer.tick(); +1767 #[cfg(wasm_browser)] +1768 let direct_addr_heartbeat_timer_tick = n0_future::future::pending(); +1769 +1770 tokio::select! { +1771 _ = shutdown_token.cancelled() => { +1772 debug!("shutting down"); +1773 return; +1774 } +1775 msg = self.msg_receiver.recv(), if !receiver_closed => { +1776 let Some(msg) = msg else { +1777 trace!("tick: magicsock receiver closed"); +1778 self.msock.metrics.magicsock.actor_tick_other.inc(); 1779 -1780 trace!(?msg, "tick: msg"); -1781 self.msock.metrics.magicsock.actor_tick_msg.inc(); -1782 self.handle_actor_message(msg, &sender).await; -1783 } -1784 tick = self.periodic_re_stun_timer.tick() => { -1785 trace!("tick: re_stun {:?}", tick); -1786 self.msock.metrics.magicsock.actor_tick_re_stun.inc(); -1787 self.re_stun(UpdateReason::Periodic); -1788 } -1789 new_addr = watcher.updated() => { -1790 match new_addr { -1791 Ok(addrs) => { -1792 if !addrs.is_empty() { -1793 trace!(?addrs, "local addrs"); -1794 self.msock.publish_my_addr(); -1795 } -1796 } -1797 Err(_) => { -1798 warn!("local addr watcher stopped"); -1799 } -1800 } -1801 } -1802 report = net_report_watcher.updated() => { -1803 match report { -1804 Ok((report, _)) => { -1805 self.handle_net_report_report(report); -1806 #[cfg(not(wasm_browser))] -1807 { -1808 self.periodic_re_stun_timer = new_re_stun_timer(true); -1809 } -1810 } -1811 Err(_) => { -1812 warn!("net report watcher stopped"); -1813 } -1814 } -1815 } -1816 reason = self.direct_addr_done_rx.recv() => { -1817 match reason { -1818 Some(()) => { -1819 // check if a new run needs to be scheduled -1820 let state = self.netmon_watcher.get().expect("disconnected"); -1821 self.direct_addr_update_state.try_run(state.into()); -1822 } -1823 None => { -1824 warn!("direct addr watcher died"); -1825 } -1826 } -1827 } -1828 change = portmap_watcher_changed, if !portmap_watcher_closed => { -1829 #[cfg(not(wasm_browser))] -1830 { -1831 if change.is_err() { -1832 trace!("tick: portmap watcher closed"); -1833 self.msock.metrics.magicsock.actor_tick_other.inc(); -1834 -1835 portmap_watcher_closed = true; -1836 continue; -1837 } +1780 receiver_closed = true; +1781 continue; +1782 }; +1783 +1784 trace!(?msg, "tick: msg"); +1785 self.msock.metrics.magicsock.actor_tick_msg.inc(); +1786 self.handle_actor_message(msg, &sender).await; +1787 } +1788 tick = self.periodic_re_stun_timer.tick() => { +1789 trace!("tick: re_stun {:?}", tick); +1790 self.msock.metrics.magicsock.actor_tick_re_stun.inc(); +1791 self.re_stun(UpdateReason::Periodic); +1792 } +1793 new_addr = watcher.updated() => { +1794 match new_addr { +1795 Ok(addrs) => { +1796 if !addrs.is_empty() { +1797 trace!(?addrs, "local addrs"); +1798 self.msock.publish_my_addr(); +1799 } +1800 } +1801 Err(_) => { +1802 warn!("local addr watcher stopped"); +1803 } +1804 } +1805 } +1806 report = net_report_watcher.updated() => { +1807 match report { +1808 Ok((report, _)) => { +1809 self.handle_net_report_report(report); +1810 #[cfg(not(wasm_browser))] +1811 { +1812 self.periodic_re_stun_timer = new_re_stun_timer(true); +1813 } +1814 } +1815 Err(_) => { +1816 warn!("net report watcher stopped"); +1817 } +1818 } +1819 } +1820 reason = self.direct_addr_done_rx.recv() => { +1821 match reason { +1822 Some(()) => { +1823 // check if a new run needs to be scheduled +1824 let state = self.netmon_watcher.get().expect("disconnected"); +1825 self.direct_addr_update_state.try_run(state.into()); +1826 } +1827 None => { +1828 warn!("direct addr watcher died"); +1829 } +1830 } +1831 } +1832 change = portmap_watcher_changed, if !portmap_watcher_closed => { +1833 #[cfg(not(wasm_browser))] +1834 { +1835 if change.is_err() { +1836 trace!("tick: portmap watcher closed"); +1837 self.msock.metrics.magicsock.actor_tick_other.inc(); 1838 -1839 trace!("tick: portmap changed"); -1840 self.msock.metrics.magicsock.actor_tick_portmap_changed.inc(); -1841 let new_external_address = *portmap_watcher.borrow(); -1842 debug!("external address updated: {new_external_address:?}"); -1843 self.re_stun(UpdateReason::PortmapUpdated); -1844 } -1845 #[cfg(wasm_browser)] -1846 let _unused_in_browsers = change; -1847 }, -1848 _ = direct_addr_heartbeat_timer_tick => { -1849 #[cfg(not(wasm_browser))] -1850 { -1851 trace!( -1852 "tick: direct addr heartbeat {} direct addrs", -1853 self.msock.node_map.node_count(), -1854 ); -1855 self.msock.metrics.magicsock.actor_tick_direct_addr_heartbeat.inc(); -1856 // TODO: this might trigger too many packets at once, pace this -1857 -1858 self.msock.node_map.prune_inactive(); -1859 let msgs = self.msock.node_map.nodes_stayin_alive(); -1860 self.handle_ping_actions(&sender, msgs).await; -1861 } -1862 } -1863 state = self.netmon_watcher.updated() => { -1864 let Ok(state) = state else { -1865 trace!("tick: link change receiver closed"); -1866 self.msock.metrics.magicsock.actor_tick_other.inc(); -1867 continue; -1868 }; -1869 let is_major = state.is_major_change(&current_netmon_state); -1870 current_netmon_state = state; -1871 trace!("tick: link change {}", is_major); -1872 self.msock.metrics.magicsock.actor_link_change.inc(); -1873 self.handle_network_change(is_major).await; -1874 } -1875 // Even if `discovery_events` yields `None`, it could begin to yield -1876 // `Some` again in the future, so we don't want to disable this branch -1877 // forever like we do with the other branches that yield `Option`s -1878 Some(discovery_item) = discovery_events.next() => { -1879 trace!("tick: discovery event, address discovered: {discovery_item:?}"); -1880 let provenance = discovery_item.provenance(); -1881 let node_addr = discovery_item.to_node_addr(); -1882 if let Err(e) = self.msock.add_node_addr( -1883 node_addr, -1884 Source::Discovery { -1885 name: provenance.to_string() -1886 }) { -1887 let node_addr = discovery_item.to_node_addr(); -1888 warn!(?node_addr, "unable to add discovered node address to the node map: {e:?}"); -1889 } -1890 // Send the discovery item to the subscribers of the discovery broadcast stream. -1891 self.msock.discovery_subscribers.send(discovery_item); -1892 } -1893 Some((dst, dst_key, msg)) = self.disco_receiver.recv() => { -1894 if let Err(err) = self.msock.send_disco_message(&sender, dst.clone(), dst_key, msg).await { -1895 warn!(%dst, node = %dst_key.fmt_short(), ?err, "failed to send disco message (UDP)"); -1896 } -1897 } -1898 } -1899 } -1900 } -1901 -1902 async fn handle_network_change(&mut self, is_major: bool) { -1903 debug!("link change detected: major? {}", is_major); -1904 -1905 if is_major { -1906 if let Err(err) = self.network_change_sender.rebind() { -1907 warn!("failed to rebind transports: {:?}", err); -1908 } -1909 -1910 #[cfg(not(wasm_browser))] -1911 self.msock.dns_resolver.reset().await; -1912 self.re_stun(UpdateReason::LinkChangeMajor); -1913 self.reset_endpoint_states(); -1914 } else { -1915 self.re_stun(UpdateReason::LinkChangeMinor); -1916 } -1917 } -1918 -1919 fn re_stun(&mut self, why: UpdateReason) { -1920 let state = self.netmon_watcher.get().expect("disconnected"); -1921 self.direct_addr_update_state -1922 .schedule_run(why, state.into()); -1923 } -1924 -1925 #[instrument(skip_all)] -1926 async fn handle_ping_actions(&mut self, sender: &UdpSender, msgs: Vec<PingAction>) { -1927 if let Err(err) = self.msock.send_ping_actions(sender, msgs).await { -1928 warn!("Failed to send ping actions: {err:#}"); -1929 } -1930 } -1931 -1932 /// Processes an incoming actor message. -1933 /// -1934 /// Returns `true` if it was a shutdown. -1935 async fn handle_actor_message(&mut self, msg: ActorMessage, sender: &UdpSender) { -1936 match msg { -1937 ActorMessage::EndpointPingExpired(id, txid) => { -1938 self.msock.node_map.notify_ping_timeout(id, txid); -1939 } -1940 ActorMessage::NetworkChange => { -1941 self.network_monitor.network_change().await.ok(); -1942 } -1943 ActorMessage::ScheduleDirectAddrUpdate(why, data) => { -1944 if let Some((node, url)) = data { -1945 self.pending_call_me_maybes.insert(node, url); -1946 } -1947 let state = self.netmon_watcher.get().expect("disconnected"); -1948 self.direct_addr_update_state -1949 .schedule_run(why, state.into()); -1950 } -1951 #[cfg(test)] -1952 ActorMessage::ForceNetworkChange(is_major) => { -1953 self.handle_network_change(is_major).await; +1839 portmap_watcher_closed = true; +1840 continue; +1841 } +1842 +1843 trace!("tick: portmap changed"); +1844 self.msock.metrics.magicsock.actor_tick_portmap_changed.inc(); +1845 let new_external_address = *portmap_watcher.borrow(); +1846 debug!("external address updated: {new_external_address:?}"); +1847 self.re_stun(UpdateReason::PortmapUpdated); +1848 } +1849 #[cfg(wasm_browser)] +1850 let _unused_in_browsers = change; +1851 }, +1852 _ = direct_addr_heartbeat_timer_tick => { +1853 #[cfg(not(wasm_browser))] +1854 { +1855 trace!( +1856 "tick: direct addr heartbeat {} direct addrs", +1857 self.msock.node_map.node_count(), +1858 ); +1859 self.msock.metrics.magicsock.actor_tick_direct_addr_heartbeat.inc(); +1860 // TODO: this might trigger too many packets at once, pace this +1861 +1862 self.msock.node_map.prune_inactive(); +1863 let msgs = self.msock.node_map.nodes_stayin_alive(); +1864 self.handle_ping_actions(&sender, msgs).await; +1865 } +1866 } +1867 state = self.netmon_watcher.updated() => { +1868 let Ok(state) = state else { +1869 trace!("tick: link change receiver closed"); +1870 self.msock.metrics.magicsock.actor_tick_other.inc(); +1871 continue; +1872 }; +1873 let is_major = state.is_major_change(&current_netmon_state); +1874 current_netmon_state = state; +1875 trace!("tick: link change {}", is_major); +1876 self.msock.metrics.magicsock.actor_link_change.inc(); +1877 self.handle_network_change(is_major).await; +1878 } +1879 // Even if `discovery_events` yields `None`, it could begin to yield +1880 // `Some` again in the future, so we don't want to disable this branch +1881 // forever like we do with the other branches that yield `Option`s +1882 Some(discovery_item) = discovery_events.next() => { +1883 trace!("tick: discovery event, address discovered: {discovery_item:?}"); +1884 let provenance = discovery_item.provenance(); +1885 let node_addr = discovery_item.to_node_addr(); +1886 if let Err(e) = self.msock.add_node_addr( +1887 node_addr, +1888 Source::Discovery { +1889 name: provenance.to_string() +1890 }) { +1891 let node_addr = discovery_item.to_node_addr(); +1892 warn!(?node_addr, "unable to add discovered node address to the node map: {e:?}"); +1893 } +1894 // Send the discovery item to the subscribers of the discovery broadcast stream. +1895 self.msock.discovery_subscribers.send(discovery_item); +1896 } +1897 Some((dst, dst_key, msg)) = self.disco_receiver.recv() => { +1898 if let Err(err) = self.msock.send_disco_message(&sender, dst.clone(), dst_key, msg).await { +1899 warn!(%dst, node = %dst_key.fmt_short(), ?err, "failed to send disco message (UDP)"); +1900 } +1901 } +1902 } +1903 } +1904 } +1905 +1906 async fn handle_network_change(&mut self, is_major: bool) { +1907 debug!("link change detected: major? {}", is_major); +1908 +1909 if is_major { +1910 if let Err(err) = self.network_change_sender.rebind() { +1911 warn!("failed to rebind transports: {:?}", err); +1912 } +1913 +1914 #[cfg(not(wasm_browser))] +1915 self.msock.dns_resolver.reset().await; +1916 self.re_stun(UpdateReason::LinkChangeMajor); +1917 self.reset_endpoint_states(); +1918 } else { +1919 self.re_stun(UpdateReason::LinkChangeMinor); +1920 } +1921 } +1922 +1923 fn re_stun(&mut self, why: UpdateReason) { +1924 let state = self.netmon_watcher.get().expect("disconnected"); +1925 self.direct_addr_update_state +1926 .schedule_run(why, state.into()); +1927 } +1928 +1929 #[instrument(skip_all)] +1930 async fn handle_ping_actions(&mut self, sender: &UdpSender, msgs: Vec<PingAction>) { +1931 if let Err(err) = self.msock.send_ping_actions(sender, msgs).await { +1932 warn!("Failed to send ping actions: {err:#}"); +1933 } +1934 } +1935 +1936 /// Processes an incoming actor message. +1937 /// +1938 /// Returns `true` if it was a shutdown. +1939 async fn handle_actor_message(&mut self, msg: ActorMessage, sender: &UdpSender) { +1940 match msg { +1941 ActorMessage::EndpointPingExpired(id, txid) => { +1942 self.msock.node_map.notify_ping_timeout(id, txid); +1943 } +1944 ActorMessage::NetworkChange => { +1945 self.network_monitor.network_change().await.ok(); +1946 } +1947 ActorMessage::ScheduleDirectAddrUpdate(why, data) => { +1948 if let Some((node, url)) = data { +1949 self.pending_call_me_maybes.insert(node, url); +1950 } +1951 let state = self.netmon_watcher.get().expect("disconnected"); +1952 self.direct_addr_update_state +1953 .schedule_run(why, state.into()); 1954 } -1955 ActorMessage::PingActions(ping_actions) => { -1956 self.handle_ping_actions(sender, ping_actions).await; -1957 } -1958 } -1959 } -1960 -1961 /// Updates the direct addresses of this magic socket. -1962 /// -1963 /// Updates the [`DiscoveredDirectAddrs`] of this [`MagicSock`] with the current set of -1964 /// direct addresses from: -1965 /// -1966 /// - The portmapper. -1967 /// - A net_report report. -1968 /// - The local interfaces IP addresses. -1969 #[cfg(not(wasm_browser))] -1970 fn update_direct_addresses(&mut self, net_report_report: Option<&net_report::Report>) { -1971 let portmap_watcher = self -1972 .direct_addr_update_state -1973 .port_mapper -1974 .watch_external_address(); -1975 -1976 // We only want to have one DirectAddr for each SocketAddr we have. So we store -1977 // this as a map of SocketAddr -> DirectAddrType. At the end we will construct a -1978 // DirectAddr from each entry. -1979 let mut addrs: BTreeMap<SocketAddr, DirectAddrType> = BTreeMap::new(); -1980 -1981 // First add PortMapper provided addresses. -1982 let maybe_port_mapped = *portmap_watcher.borrow(); -1983 if let Some(portmap_ext) = maybe_port_mapped.map(SocketAddr::V4) { -1984 addrs -1985 .entry(portmap_ext) -1986 .or_insert(DirectAddrType::Portmapped); -1987 } -1988 -1989 // Next add STUN addresses from the net_report report. -1990 if let Some(net_report_report) = net_report_report { -1991 if let Some(global_v4) = net_report_report.global_v4 { -1992 addrs.entry(global_v4.into()).or_insert(DirectAddrType::Qad); -1993 -1994 // If they're behind a hard NAT and are using a fixed -1995 // port locally, assume they might've added a static -1996 // port mapping on their router to the same explicit -1997 // port that we are running with. Worst case it's an invalid candidate mapping. -1998 let port = self.msock.ip_bind_addrs().iter().find_map(|addr| { -1999 if addr.port() != 0 { -2000 Some(addr.port()) -2001 } else { -2002 None -2003 } -2004 }); -2005 -2006 if let Some(port) = port { -2007 if net_report_report -2008 .mapping_varies_by_dest() -2009 .unwrap_or_default() -2010 { -2011 let mut addr = global_v4; -2012 addr.set_port(port); -2013 addrs -2014 .entry(addr.into()) -2015 .or_insert(DirectAddrType::Qad4LocalPort); -2016 } -2017 } -2018 } -2019 if let Some(global_v6) = net_report_report.global_v6 { -2020 addrs.entry(global_v6.into()).or_insert(DirectAddrType::Qad); -2021 } -2022 } -2023 -2024 let local_addrs: Vec<(SocketAddr, SocketAddr)> = self -2025 .msock -2026 .ip_bind_addrs() -2027 .iter() -2028 .copied() -2029 .zip(self.msock.ip_local_addrs()) -2030 .collect(); -2031 -2032 let has_ipv4_unspecified = local_addrs.iter().find_map(|(_, a)| { -2033 if a.is_ipv4() && a.ip().is_unspecified() { -2034 Some(a.port()) -2035 } else { -2036 None -2037 } -2038 }); -2039 let has_ipv6_unspecified = local_addrs.iter().find_map(|(_, a)| { -2040 if a.is_ipv6() && a.ip().is_unspecified() { -2041 Some(a.port()) -2042 } else { -2043 None -2044 } -2045 }); -2046 -2047 // If a socket is bound to the unspecified address, create SocketAddrs for -2048 // each local IP address by pairing it with the port the socket is bound on. -2049 if local_addrs -2050 .iter() -2051 .any(|(_, local)| local.ip().is_unspecified()) -2052 { -2053 let LocalAddresses { -2054 regular: mut ips, -2055 loopback, -2056 } = self -2057 .netmon_watcher -2058 .get() -2059 .expect("netmon disconnected") -2060 .local_addresses; -2061 if ips.is_empty() && addrs.is_empty() { -2062 // Include loopback addresses only if there are no other interfaces -2063 // or public addresses, this allows testing offline. -2064 ips = loopback; -2065 } -2066 -2067 for ip in ips { -2068 let port_if_unspecified = match ip { -2069 IpAddr::V4(_) => has_ipv4_unspecified, -2070 IpAddr::V6(_) => has_ipv6_unspecified, -2071 }; -2072 if let Some(port) = port_if_unspecified { -2073 let addr = SocketAddr::new(ip, port); -2074 addrs.entry(addr).or_insert(DirectAddrType::Local); -2075 } -2076 } -2077 } -2078 -2079 // If a socket is bound to a specific address, add it. -2080 for (bound, local) in local_addrs { -2081 if !bound.ip().is_unspecified() { -2082 addrs.entry(local).or_insert(DirectAddrType::Local); -2083 } -2084 } -2085 -2086 // Finally create and store store all these direct addresses and send any -2087 // queued call-me-maybe messages. -2088 self.msock.store_direct_addresses( -2089 addrs -2090 .iter() -2091 .map(|(addr, typ)| DirectAddr { -2092 addr: *addr, -2093 typ: *typ, -2094 }) -2095 .collect(), -2096 ); -2097 self.send_queued_call_me_maybes(); -2098 } -2099 -2100 fn send_queued_call_me_maybes(&mut self) { -2101 let msg = self.msock.direct_addrs.to_call_me_maybe_message(); -2102 let msg = disco::Message::CallMeMaybe(msg); -2103 // allocate, to minimize locking duration -2104 -2105 for (public_key, url) in self.pending_call_me_maybes.drain() { -2106 if !self -2107 .msock -2108 .disco -2109 .try_send(SendAddr::Relay(url), public_key, msg.clone()) -2110 { -2111 warn!(node = %public_key.fmt_short(), "relay channel full, dropping call-me-maybe"); -2112 } -2113 } -2114 } -2115 -2116 fn handle_net_report_report(&mut self, mut report: Option<net_report::Report>) { -2117 if let Some(ref mut r) = report { -2118 self.msock.ipv6_reported.store(r.udp_v6, Ordering::Relaxed); -2119 if r.preferred_relay.is_none() { -2120 if let Some(my_relay) = self.msock.my_relay() { -2121 r.preferred_relay.replace(my_relay); -2122 } -2123 } -2124 -2125 // Notify all transports -2126 self.network_change_sender.on_network_change(r); -2127 } +1955 #[cfg(test)] +1956 ActorMessage::ForceNetworkChange(is_major) => { +1957 self.handle_network_change(is_major).await; +1958 } +1959 ActorMessage::PingActions(ping_actions) => { +1960 self.handle_ping_actions(sender, ping_actions).await; +1961 } +1962 } +1963 } +1964 +1965 /// Updates the direct addresses of this magic socket. +1966 /// +1967 /// Updates the [`DiscoveredDirectAddrs`] of this [`MagicSock`] with the current set of +1968 /// direct addresses from: +1969 /// +1970 /// - The portmapper. +1971 /// - A net_report report. +1972 /// - The local interfaces IP addresses. +1973 #[cfg(not(wasm_browser))] +1974 fn update_direct_addresses(&mut self, net_report_report: Option<&net_report::Report>) { +1975 let portmap_watcher = self +1976 .direct_addr_update_state +1977 .port_mapper +1978 .watch_external_address(); +1979 +1980 // We only want to have one DirectAddr for each SocketAddr we have. So we store +1981 // this as a map of SocketAddr -> DirectAddrType. At the end we will construct a +1982 // DirectAddr from each entry. +1983 let mut addrs: BTreeMap<SocketAddr, DirectAddrType> = BTreeMap::new(); +1984 +1985 // First add PortMapper provided addresses. +1986 let maybe_port_mapped = *portmap_watcher.borrow(); +1987 if let Some(portmap_ext) = maybe_port_mapped.map(SocketAddr::V4) { +1988 addrs +1989 .entry(portmap_ext) +1990 .or_insert(DirectAddrType::Portmapped); +1991 } +1992 +1993 // Next add STUN addresses from the net_report report. +1994 if let Some(net_report_report) = net_report_report { +1995 if let Some(global_v4) = net_report_report.global_v4 { +1996 addrs.entry(global_v4.into()).or_insert(DirectAddrType::Qad); +1997 +1998 // If they're behind a hard NAT and are using a fixed +1999 // port locally, assume they might've added a static +2000 // port mapping on their router to the same explicit +2001 // port that we are running with. Worst case it's an invalid candidate mapping. +2002 let port = self.msock.ip_bind_addrs().iter().find_map(|addr| { +2003 if addr.port() != 0 { +2004 Some(addr.port()) +2005 } else { +2006 None +2007 } +2008 }); +2009 +2010 if let Some(port) = port { +2011 if net_report_report +2012 .mapping_varies_by_dest() +2013 .unwrap_or_default() +2014 { +2015 let mut addr = global_v4; +2016 addr.set_port(port); +2017 addrs +2018 .entry(addr.into()) +2019 .or_insert(DirectAddrType::Qad4LocalPort); +2020 } +2021 } +2022 } +2023 if let Some(global_v6) = net_report_report.global_v6 { +2024 addrs.entry(global_v6.into()).or_insert(DirectAddrType::Qad); +2025 } +2026 } +2027 +2028 let local_addrs: Vec<(SocketAddr, SocketAddr)> = self +2029 .msock +2030 .ip_bind_addrs() +2031 .iter() +2032 .copied() +2033 .zip(self.msock.ip_local_addrs()) +2034 .collect(); +2035 +2036 let has_ipv4_unspecified = local_addrs.iter().find_map(|(_, a)| { +2037 if a.is_ipv4() && a.ip().is_unspecified() { +2038 Some(a.port()) +2039 } else { +2040 None +2041 } +2042 }); +2043 let has_ipv6_unspecified = local_addrs.iter().find_map(|(_, a)| { +2044 if a.is_ipv6() && a.ip().is_unspecified() { +2045 Some(a.port()) +2046 } else { +2047 None +2048 } +2049 }); +2050 +2051 // If a socket is bound to the unspecified address, create SocketAddrs for +2052 // each local IP address by pairing it with the port the socket is bound on. +2053 if local_addrs +2054 .iter() +2055 .any(|(_, local)| local.ip().is_unspecified()) +2056 { +2057 let LocalAddresses { +2058 regular: mut ips, +2059 loopback, +2060 } = self +2061 .netmon_watcher +2062 .get() +2063 .expect("netmon disconnected") +2064 .local_addresses; +2065 if ips.is_empty() && addrs.is_empty() { +2066 // Include loopback addresses only if there are no other interfaces +2067 // or public addresses, this allows testing offline. +2068 ips = loopback; +2069 } +2070 +2071 for ip in ips { +2072 let port_if_unspecified = match ip { +2073 IpAddr::V4(_) => has_ipv4_unspecified, +2074 IpAddr::V6(_) => has_ipv6_unspecified, +2075 }; +2076 if let Some(port) = port_if_unspecified { +2077 let addr = SocketAddr::new(ip, port); +2078 addrs.entry(addr).or_insert(DirectAddrType::Local); +2079 } +2080 } +2081 } +2082 +2083 // If a socket is bound to a specific address, add it. +2084 for (bound, local) in local_addrs { +2085 if !bound.ip().is_unspecified() { +2086 addrs.entry(local).or_insert(DirectAddrType::Local); +2087 } +2088 } +2089 +2090 // Finally create and store store all these direct addresses and send any +2091 // queued call-me-maybe messages. +2092 self.msock.store_direct_addresses( +2093 addrs +2094 .iter() +2095 .map(|(addr, typ)| DirectAddr { +2096 addr: *addr, +2097 typ: *typ, +2098 }) +2099 .collect(), +2100 ); +2101 self.send_queued_call_me_maybes(); +2102 } +2103 +2104 fn send_queued_call_me_maybes(&mut self) { +2105 let msg = self.msock.direct_addrs.to_call_me_maybe_message(); +2106 let msg = disco::Message::CallMeMaybe(msg); +2107 // allocate, to minimize locking duration +2108 +2109 for (public_key, url) in self.pending_call_me_maybes.drain() { +2110 if !self +2111 .msock +2112 .disco +2113 .try_send(SendAddr::Relay(url), public_key, msg.clone()) +2114 { +2115 warn!(node = %public_key.fmt_short(), "relay channel full, dropping call-me-maybe"); +2116 } +2117 } +2118 } +2119 +2120 fn handle_net_report_report(&mut self, mut report: Option<net_report::Report>) { +2121 if let Some(ref mut r) = report { +2122 self.msock.ipv6_reported.store(r.udp_v6, Ordering::Relaxed); +2123 if r.preferred_relay.is_none() { +2124 if let Some(my_relay) = self.msock.my_relay() { +2125 r.preferred_relay.replace(my_relay); +2126 } +2127 } 2128 -2129 #[cfg(not(wasm_browser))] -2130 self.update_direct_addresses(report.as_ref()); -2131 } +2129 // Notify all transports +2130 self.network_change_sender.on_network_change(r); +2131 } 2132 -2133 /// Resets the preferred address for all nodes. -2134 /// This is called when connectivity changes enough that we no longer trust the old routes. -2135 #[instrument(skip_all)] -2136 fn reset_endpoint_states(&mut self) { -2137 self.msock.node_map.reset_node_states() -2138 } -2139} -2140 -2141fn new_re_stun_timer(initial_delay: bool) -> time::Interval { -2142 // Pick a random duration between 20 and 26 seconds (just under 30s, -2143 // a common UDP NAT timeout on Linux,etc) -2144 let mut rng = rand::thread_rng(); -2145 let d: Duration = rng.gen_range(Duration::from_secs(20)..=Duration::from_secs(26)); -2146 if initial_delay { -2147 debug!("scheduling periodic_stun to run in {}s", d.as_secs()); -2148 time::interval_at(time::Instant::now() + d, d) -2149 } else { -2150 debug!( -2151 "scheduling periodic_stun to run immediately and in {}s", -2152 d.as_secs() -2153 ); -2154 time::interval(d) -2155 } -2156} -2157 -2158#[cfg(not(wasm_browser))] -2159fn bind_with_fallback(mut addr: SocketAddr) -> io::Result<UdpSocket> { -2160 debug!(%addr, "binding"); +2133 #[cfg(not(wasm_browser))] +2134 self.update_direct_addresses(report.as_ref()); +2135 } +2136 +2137 /// Resets the preferred address for all nodes. +2138 /// This is called when connectivity changes enough that we no longer trust the old routes. +2139 #[instrument(skip_all)] +2140 fn reset_endpoint_states(&mut self) { +2141 self.msock.node_map.reset_node_states() +2142 } +2143} +2144 +2145fn new_re_stun_timer(initial_delay: bool) -> time::Interval { +2146 // Pick a random duration between 20 and 26 seconds (just under 30s, +2147 // a common UDP NAT timeout on Linux,etc) +2148 let mut rng = rand::thread_rng(); +2149 let d: Duration = rng.gen_range(Duration::from_secs(20)..=Duration::from_secs(26)); +2150 if initial_delay { +2151 debug!("scheduling periodic_stun to run in {}s", d.as_secs()); +2152 time::interval_at(time::Instant::now() + d, d) +2153 } else { +2154 debug!( +2155 "scheduling periodic_stun to run immediately and in {}s", +2156 d.as_secs() +2157 ); +2158 time::interval(d) +2159 } +2160} 2161 -2162 // First try binding a preferred port, if specified -2163 match UdpSocket::bind_full(addr) { -2164 Ok(socket) => { -2165 let local_addr = socket.local_addr()?; -2166 debug!(%addr, %local_addr, "successfully bound"); -2167 return Ok(socket); -2168 } -2169 Err(err) => { -2170 debug!(%addr, "failed to bind: {err:#}"); -2171 // If that was already the fallback port, then error out -2172 if addr.port() == 0 { -2173 return Err(err); -2174 } -2175 } -2176 } -2177 -2178 // Otherwise, try binding with port 0 -2179 addr.set_port(0); -2180 UdpSocket::bind_full(addr) -2181} -2182 -2183/// The discovered direct addresses of this [`MagicSock`]. -2184/// -2185/// These are all the [`DirectAddr`]s that this [`MagicSock`] is aware of for itself. -2186/// They include all locally bound ones as well as those discovered by other mechanisms like -2187/// QAD. -2188#[derive(derive_more::Debug, Default, Clone)] -2189struct DiscoveredDirectAddrs { -2190 /// The last set of discovered direct addresses. -2191 addrs: Watchable<Option<BTreeSet<DirectAddr>>>, -2192 -2193 /// The last time the direct addresses were updated, even if there was no change. -2194 /// -2195 /// This is only ever None at startup. -2196 updated_at: Arc<RwLock<Option<Instant>>>, -2197} -2198 -2199impl DiscoveredDirectAddrs { -2200 /// Updates the direct addresses, returns `true` if they changed, `false` if not. -2201 fn update(&self, addrs: BTreeSet<DirectAddr>) -> bool { -2202 *self.updated_at.write().expect("poisoned") = Some(Instant::now()); -2203 let updated = self.addrs.set(Some(addrs)).is_ok(); -2204 if updated { -2205 event!( -2206 target: "iroh::_events::direct_addrs", -2207 Level::DEBUG, -2208 addrs = ?self.addrs.get(), -2209 ); -2210 } -2211 updated -2212 } -2213 -2214 fn sockaddrs(&self) -> BTreeSet<SocketAddr> { -2215 self.addrs -2216 .get() -2217 .unwrap_or_default() -2218 .into_iter() -2219 .map(|da| da.addr) -2220 .collect() -2221 } -2222 -2223 /// Whether the direct addr information is considered "fresh". -2224 /// -2225 /// If not fresh you should probably update the direct addresses before using this info. -2226 /// -2227 /// Returns `Ok(())` if fresh enough and `Err(elapsed)` if not fresh enough. -2228 /// `elapsed` is the time elapsed since the direct addresses were last updated. -2229 /// -2230 /// If there is no direct address information `Err(Duration::ZERO)` is returned. -2231 fn fresh_enough(&self) -> Result<(), Duration> { -2232 match *self.updated_at.read().expect("poisoned") { -2233 None => Err(Duration::ZERO), -2234 Some(time) => { -2235 let elapsed = time.elapsed(); -2236 if elapsed <= ENDPOINTS_FRESH_ENOUGH_DURATION { -2237 Ok(()) -2238 } else { -2239 Err(elapsed) -2240 } -2241 } -2242 } -2243 } -2244 -2245 fn to_call_me_maybe_message(&self) -> disco::CallMeMaybe { -2246 let my_numbers = self -2247 .addrs -2248 .get() -2249 .unwrap_or_default() -2250 .into_iter() -2251 .map(|da| da.addr) -2252 .collect(); -2253 disco::CallMeMaybe { my_numbers } -2254 } -2255} -2256 -2257/// The fake address used by the QUIC layer to address a node. -2258/// -2259/// You can consider this as nothing more than a lookup key for a node the [`MagicSock`] knows -2260/// about. -2261/// -2262/// [`MagicSock`] can reach a node by several real socket addresses, or maybe even via the relay -2263/// node. The QUIC layer however needs to address a node by a stable [`SocketAddr`] so -2264/// that normal socket APIs can function. Thus when a new node is introduced to a [`MagicSock`] -2265/// it is given a new fake address. This is the type of that address. -2266/// -2267/// It is but a newtype. And in our QUIC-facing socket APIs like [`AsyncUdpSocket`] it -2268/// comes in as the inner [`Ipv6Addr`], in those interfaces we have to be careful to do -2269/// the conversion to this type. -2270#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] -2271pub(crate) struct NodeIdMappedAddr(Ipv6Addr); -2272 -2273/// Can occur when converting a [`SocketAddr`] to an [`NodeIdMappedAddr`] -2274#[derive(Debug, Snafu)] -2275#[snafu(display("Failed to convert"))] -2276pub struct NodeIdMappedAddrError; -2277 -2278/// Counter to always generate unique addresses for [`NodeIdMappedAddr`]. -2279static NODE_ID_ADDR_COUNTER: AtomicU64 = AtomicU64::new(1); -2280 -2281impl NodeIdMappedAddr { -2282 /// The Prefix/L of our Unique Local Addresses. -2283 const ADDR_PREFIXL: u8 = 0xfd; -2284 /// The Global ID used in our Unique Local Addresses. -2285 const ADDR_GLOBAL_ID: [u8; 5] = [21, 7, 10, 81, 11]; -2286 /// The Subnet ID used in our Unique Local Addresses. -2287 const ADDR_SUBNET: [u8; 2] = [0; 2]; -2288 -2289 /// The dummy port used for all [`NodeIdMappedAddr`]s. -2290 const NODE_ID_MAPPED_PORT: u16 = 12345; -2291 -2292 /// Generates a globally unique fake UDP address. -2293 /// -2294 /// This generates and IPv6 Unique Local Address according to RFC 4193. -2295 pub(crate) fn generate() -> Self { -2296 let mut addr = [0u8; 16]; -2297 addr[0] = Self::ADDR_PREFIXL; -2298 addr[1..6].copy_from_slice(&Self::ADDR_GLOBAL_ID); -2299 addr[6..8].copy_from_slice(&Self::ADDR_SUBNET); -2300 -2301 let counter = NODE_ID_ADDR_COUNTER.fetch_add(1, Ordering::Relaxed); -2302 addr[8..16].copy_from_slice(&counter.to_be_bytes()); -2303 -2304 Self(Ipv6Addr::from(addr)) -2305 } -2306 -2307 /// Returns a consistent [`SocketAddr`] for the [`NodeIdMappedAddr`]. -2308 /// -2309 /// This socket address does not have a routable IP address. -2310 /// -2311 /// This uses a made-up port number, since the port does not play a role in looking up -2312 /// the node in the [`NodeMap`]. This socket address is only to be used to pass into -2313 /// Quinn. -2314 pub(crate) fn private_socket_addr(&self) -> SocketAddr { -2315 SocketAddr::new(IpAddr::from(self.0), Self::NODE_ID_MAPPED_PORT) -2316 } -2317} -2318 -2319impl TryFrom<Ipv6Addr> for NodeIdMappedAddr { -2320 type Error = NodeIdMappedAddrError; -2321 -2322 fn try_from(value: Ipv6Addr) -> Result<Self, Self::Error> { -2323 let octets = value.octets(); -2324 if octets[0] == Self::ADDR_PREFIXL -2325 && octets[1..6] == Self::ADDR_GLOBAL_ID -2326 && octets[6..8] == Self::ADDR_SUBNET -2327 { -2328 return Ok(Self(value)); -2329 } -2330 Err(NodeIdMappedAddrError) -2331 } -2332} -2333 -2334impl std::fmt::Display for NodeIdMappedAddr { -2335 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { -2336 write!(f, "NodeIdMappedAddr({})", self.0) -2337 } -2338} -2339 -2340fn disco_message_sent(msg: &disco::Message, metrics: &MagicsockMetrics) { -2341 match msg { -2342 disco::Message::Ping(_) => { -2343 metrics.sent_disco_ping.inc(); -2344 } -2345 disco::Message::Pong(_) => { -2346 metrics.sent_disco_pong.inc(); -2347 } -2348 disco::Message::CallMeMaybe(_) => { -2349 metrics.sent_disco_call_me_maybe.inc(); -2350 } -2351 } -2352} -2353 -2354/// A *direct address* on which an iroh-node might be contactable. -2355/// -2356/// Direct addresses are UDP socket addresses on which an iroh node could potentially be -2357/// contacted. These can come from various sources depending on the network topology of the -2358/// iroh node, see [`DirectAddrType`] for the several kinds of sources. -2359#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] -2360pub struct DirectAddr { -2361 /// The address. -2362 pub addr: SocketAddr, -2363 /// The origin of this direct address. -2364 pub typ: DirectAddrType, -2365} -2366 -2367/// The type of direct address. -2368/// -2369/// These are the various sources or origins from which an iroh node might have found a -2370/// possible [`DirectAddr`]. -2371#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] -2372pub enum DirectAddrType { -2373 /// Not yet determined.. -2374 Unknown, -2375 /// A locally bound socket address. -2376 Local, -2377 /// Public internet address discovered via QAD. -2378 /// -2379 /// When possible an iroh node will perform QAD to discover which is the address -2380 /// from which it sends data on the public internet. This can be different from locally -2381 /// bound addresses when the node is on a local network which performs NAT or similar. -2382 Qad, -2383 /// An address assigned by the router using port mapping. -2384 /// -2385 /// When possible an iroh node will request a port mapping from the local router to -2386 /// get a publicly routable direct address. -2387 Portmapped, -2388 /// Hard NAT: QAD'ed IPv4 address + local fixed port. -2389 /// -2390 /// It is possible to configure iroh to bound to a specific port and independently -2391 /// configure the router to forward this port to the iroh node. This indicates a -2392 /// situation like this, which still uses QAD to discover the public address. -2393 Qad4LocalPort, -2394} -2395 -2396impl Display for DirectAddrType { -2397 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { -2398 match self { -2399 DirectAddrType::Unknown => write!(f, "?"), -2400 DirectAddrType::Local => write!(f, "local"), -2401 DirectAddrType::Qad => write!(f, "qad"), -2402 DirectAddrType::Portmapped => write!(f, "portmap"), -2403 DirectAddrType::Qad4LocalPort => write!(f, "qad4localport"), -2404 } -2405 } -2406} -2407 -2408#[cfg(test)] -2409mod tests { -2410 use std::{collections::BTreeSet, sync::Arc, time::Duration}; +2162#[cfg(not(wasm_browser))] +2163fn bind_with_fallback(mut addr: SocketAddr) -> io::Result<UdpSocket> { +2164 debug!(%addr, "binding"); +2165 +2166 // First try binding a preferred port, if specified +2167 match UdpSocket::bind_full(addr) { +2168 Ok(socket) => { +2169 let local_addr = socket.local_addr()?; +2170 debug!(%addr, %local_addr, "successfully bound"); +2171 return Ok(socket); +2172 } +2173 Err(err) => { +2174 debug!(%addr, "failed to bind: {err:#}"); +2175 // If that was already the fallback port, then error out +2176 if addr.port() == 0 { +2177 return Err(err); +2178 } +2179 } +2180 } +2181 +2182 // Otherwise, try binding with port 0 +2183 addr.set_port(0); +2184 UdpSocket::bind_full(addr) +2185} +2186 +2187/// The discovered direct addresses of this [`MagicSock`]. +2188/// +2189/// These are all the [`DirectAddr`]s that this [`MagicSock`] is aware of for itself. +2190/// They include all locally bound ones as well as those discovered by other mechanisms like +2191/// QAD. +2192#[derive(derive_more::Debug, Default, Clone)] +2193struct DiscoveredDirectAddrs { +2194 /// The last set of discovered direct addresses. +2195 addrs: Watchable<Option<BTreeSet<DirectAddr>>>, +2196 +2197 /// The last time the direct addresses were updated, even if there was no change. +2198 /// +2199 /// This is only ever None at startup. +2200 updated_at: Arc<RwLock<Option<Instant>>>, +2201} +2202 +2203impl DiscoveredDirectAddrs { +2204 /// Updates the direct addresses, returns `true` if they changed, `false` if not. +2205 fn update(&self, addrs: BTreeSet<DirectAddr>) -> bool { +2206 *self.updated_at.write().expect("poisoned") = Some(Instant::now()); +2207 let updated = self.addrs.set(Some(addrs)).is_ok(); +2208 if updated { +2209 event!( +2210 target: "iroh::_events::direct_addrs", +2211 Level::DEBUG, +2212 addrs = ?self.addrs.get(), +2213 ); +2214 } +2215 updated +2216 } +2217 +2218 fn sockaddrs(&self) -> BTreeSet<SocketAddr> { +2219 self.addrs +2220 .get() +2221 .unwrap_or_default() +2222 .into_iter() +2223 .map(|da| da.addr) +2224 .collect() +2225 } +2226 +2227 /// Whether the direct addr information is considered "fresh". +2228 /// +2229 /// If not fresh you should probably update the direct addresses before using this info. +2230 /// +2231 /// Returns `Ok(())` if fresh enough and `Err(elapsed)` if not fresh enough. +2232 /// `elapsed` is the time elapsed since the direct addresses were last updated. +2233 /// +2234 /// If there is no direct address information `Err(Duration::ZERO)` is returned. +2235 fn fresh_enough(&self) -> Result<(), Duration> { +2236 match *self.updated_at.read().expect("poisoned") { +2237 None => Err(Duration::ZERO), +2238 Some(time) => { +2239 let elapsed = time.elapsed(); +2240 if elapsed <= ENDPOINTS_FRESH_ENOUGH_DURATION { +2241 Ok(()) +2242 } else { +2243 Err(elapsed) +2244 } +2245 } +2246 } +2247 } +2248 +2249 fn to_call_me_maybe_message(&self) -> disco::CallMeMaybe { +2250 let my_numbers = self +2251 .addrs +2252 .get() +2253 .unwrap_or_default() +2254 .into_iter() +2255 .map(|da| da.addr) +2256 .collect(); +2257 disco::CallMeMaybe { my_numbers } +2258 } +2259} +2260 +2261/// The fake address used by the QUIC layer to address a node. +2262/// +2263/// You can consider this as nothing more than a lookup key for a node the [`MagicSock`] knows +2264/// about. +2265/// +2266/// [`MagicSock`] can reach a node by several real socket addresses, or maybe even via the relay +2267/// node. The QUIC layer however needs to address a node by a stable [`SocketAddr`] so +2268/// that normal socket APIs can function. Thus when a new node is introduced to a [`MagicSock`] +2269/// it is given a new fake address. This is the type of that address. +2270/// +2271/// It is but a newtype. And in our QUIC-facing socket APIs like [`AsyncUdpSocket`] it +2272/// comes in as the inner [`Ipv6Addr`], in those interfaces we have to be careful to do +2273/// the conversion to this type. +2274#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] +2275pub(crate) struct NodeIdMappedAddr(Ipv6Addr); +2276 +2277/// Can occur when converting a [`SocketAddr`] to an [`NodeIdMappedAddr`] +2278#[derive(Debug, Snafu)] +2279#[snafu(display("Failed to convert"))] +2280pub struct NodeIdMappedAddrError; +2281 +2282/// Counter to always generate unique addresses for [`NodeIdMappedAddr`]. +2283static NODE_ID_ADDR_COUNTER: AtomicU64 = AtomicU64::new(1); +2284 +2285impl NodeIdMappedAddr { +2286 /// The Prefix/L of our Unique Local Addresses. +2287 const ADDR_PREFIXL: u8 = 0xfd; +2288 /// The Global ID used in our Unique Local Addresses. +2289 const ADDR_GLOBAL_ID: [u8; 5] = [21, 7, 10, 81, 11]; +2290 /// The Subnet ID used in our Unique Local Addresses. +2291 const ADDR_SUBNET: [u8; 2] = [0; 2]; +2292 +2293 /// The dummy port used for all [`NodeIdMappedAddr`]s. +2294 const NODE_ID_MAPPED_PORT: u16 = 12345; +2295 +2296 /// Generates a globally unique fake UDP address. +2297 /// +2298 /// This generates and IPv6 Unique Local Address according to RFC 4193. +2299 pub(crate) fn generate() -> Self { +2300 let mut addr = [0u8; 16]; +2301 addr[0] = Self::ADDR_PREFIXL; +2302 addr[1..6].copy_from_slice(&Self::ADDR_GLOBAL_ID); +2303 addr[6..8].copy_from_slice(&Self::ADDR_SUBNET); +2304 +2305 let counter = NODE_ID_ADDR_COUNTER.fetch_add(1, Ordering::Relaxed); +2306 addr[8..16].copy_from_slice(&counter.to_be_bytes()); +2307 +2308 Self(Ipv6Addr::from(addr)) +2309 } +2310 +2311 /// Returns a consistent [`SocketAddr`] for the [`NodeIdMappedAddr`]. +2312 /// +2313 /// This socket address does not have a routable IP address. +2314 /// +2315 /// This uses a made-up port number, since the port does not play a role in looking up +2316 /// the node in the [`NodeMap`]. This socket address is only to be used to pass into +2317 /// Quinn. +2318 pub(crate) fn private_socket_addr(&self) -> SocketAddr { +2319 SocketAddr::new(IpAddr::from(self.0), Self::NODE_ID_MAPPED_PORT) +2320 } +2321} +2322 +2323impl TryFrom<Ipv6Addr> for NodeIdMappedAddr { +2324 type Error = NodeIdMappedAddrError; +2325 +2326 fn try_from(value: Ipv6Addr) -> Result<Self, Self::Error> { +2327 let octets = value.octets(); +2328 if octets[0] == Self::ADDR_PREFIXL +2329 && octets[1..6] == Self::ADDR_GLOBAL_ID +2330 && octets[6..8] == Self::ADDR_SUBNET +2331 { +2332 return Ok(Self(value)); +2333 } +2334 Err(NodeIdMappedAddrError) +2335 } +2336} +2337 +2338impl std::fmt::Display for NodeIdMappedAddr { +2339 fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +2340 write!(f, "NodeIdMappedAddr({})", self.0) +2341 } +2342} +2343 +2344fn disco_message_sent(msg: &disco::Message, metrics: &MagicsockMetrics) { +2345 match msg { +2346 disco::Message::Ping(_) => { +2347 metrics.sent_disco_ping.inc(); +2348 } +2349 disco::Message::Pong(_) => { +2350 metrics.sent_disco_pong.inc(); +2351 } +2352 disco::Message::CallMeMaybe(_) => { +2353 metrics.sent_disco_call_me_maybe.inc(); +2354 } +2355 } +2356} +2357 +2358/// A *direct address* on which an iroh-node might be contactable. +2359/// +2360/// Direct addresses are UDP socket addresses on which an iroh node could potentially be +2361/// contacted. These can come from various sources depending on the network topology of the +2362/// iroh node, see [`DirectAddrType`] for the several kinds of sources. +2363#[derive(Debug, Clone, PartialEq, Eq, Hash, PartialOrd, Ord)] +2364pub struct DirectAddr { +2365 /// The address. +2366 pub addr: SocketAddr, +2367 /// The origin of this direct address. +2368 pub typ: DirectAddrType, +2369} +2370 +2371/// The type of direct address. +2372/// +2373/// These are the various sources or origins from which an iroh node might have found a +2374/// possible [`DirectAddr`]. +2375#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] +2376pub enum DirectAddrType { +2377 /// Not yet determined.. +2378 Unknown, +2379 /// A locally bound socket address. +2380 Local, +2381 /// Public internet address discovered via QAD. +2382 /// +2383 /// When possible an iroh node will perform QAD to discover which is the address +2384 /// from which it sends data on the public internet. This can be different from locally +2385 /// bound addresses when the node is on a local network which performs NAT or similar. +2386 Qad, +2387 /// An address assigned by the router using port mapping. +2388 /// +2389 /// When possible an iroh node will request a port mapping from the local router to +2390 /// get a publicly routable direct address. +2391 Portmapped, +2392 /// Hard NAT: QAD'ed IPv4 address + local fixed port. +2393 /// +2394 /// It is possible to configure iroh to bound to a specific port and independently +2395 /// configure the router to forward this port to the iroh node. This indicates a +2396 /// situation like this, which still uses QAD to discover the public address. +2397 Qad4LocalPort, +2398} +2399 +2400impl Display for DirectAddrType { +2401 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +2402 match self { +2403 DirectAddrType::Unknown => write!(f, "?"), +2404 DirectAddrType::Local => write!(f, "local"), +2405 DirectAddrType::Qad => write!(f, "qad"), +2406 DirectAddrType::Portmapped => write!(f, "portmap"), +2407 DirectAddrType::Qad4LocalPort => write!(f, "qad4localport"), +2408 } +2409 } +2410} 2411 -2412 use data_encoding::HEXLOWER; -2413 use iroh_base::{NodeAddr, NodeId, PublicKey}; -2414 use n0_future::{time, StreamExt}; -2415 use n0_snafu::{Result, ResultExt}; -2416 use n0_watcher::Watcher; -2417 use quinn::ServerConfig; -2418 use rand::{Rng, RngCore}; -2419 use tokio::task::JoinSet; -2420 use tokio_util::task::AbortOnDropHandle; -2421 use tracing::{error, info, info_span, instrument, Instrument}; -2422 use tracing_test::traced_test; -2423 -2424 use super::{NodeIdMappedAddr, Options}; -2425 use crate::{ -2426 dns::DnsResolver, -2427 endpoint::{DirectAddr, PathSelection, Source}, -2428 magicsock::{node_map, Handle, MagicSock}, -2429 tls, Endpoint, RelayMap, RelayMode, SecretKey, -2430 }; -2431 -2432 const ALPN: &[u8] = b"n0/test/1"; -2433 -2434 impl Default for Options { -2435 fn default() -> Self { -2436 let secret_key = SecretKey::generate(rand::rngs::OsRng); -2437 let server_config = make_default_server_config(&secret_key); -2438 Options { -2439 addr_v4: None, -2440 addr_v6: None, -2441 secret_key, -2442 relay_map: RelayMap::empty(), -2443 node_map: None, -2444 discovery: None, -2445 proxy_url: None, -2446 dns_resolver: DnsResolver::new(), -2447 server_config, -2448 #[cfg(any(test, feature = "test-utils"))] -2449 insecure_skip_relay_cert_verify: false, -2450 #[cfg(any(test, feature = "test-utils"))] -2451 path_selection: PathSelection::default(), -2452 discovery_user_data: None, -2453 metrics: Default::default(), -2454 } -2455 } -2456 } -2457 -2458 /// Generate a server config with no ALPNS and a default transport configuration -2459 fn make_default_server_config(secret_key: &SecretKey) -> ServerConfig { -2460 let quic_server_config = -2461 crate::tls::TlsConfig::new(secret_key.clone()).make_server_config(vec![], false); -2462 let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config)); -2463 server_config.transport_config(Arc::new(quinn::TransportConfig::default())); -2464 server_config -2465 } -2466 -2467 impl MagicSock { -2468 #[track_caller] -2469 pub fn add_test_addr(&self, node_addr: NodeAddr) { -2470 self.add_node_addr( -2471 node_addr, -2472 Source::NamedApp { -2473 name: "test".into(), -2474 }, -2475 ) -2476 .unwrap() -2477 } -2478 } -2479 -2480 /// Magicsock plus wrappers for sending packets -2481 #[derive(Clone)] -2482 struct MagicStack { -2483 secret_key: SecretKey, -2484 endpoint: Endpoint, -2485 } -2486 -2487 impl MagicStack { -2488 async fn new(relay_mode: RelayMode) -> Self { -2489 let secret_key = SecretKey::generate(rand::thread_rng()); +2412#[cfg(test)] +2413mod tests { +2414 use std::{collections::BTreeSet, sync::Arc, time::Duration}; +2415 +2416 use data_encoding::HEXLOWER; +2417 use iroh_base::{NodeAddr, NodeId, PublicKey}; +2418 use n0_future::{time, StreamExt}; +2419 use n0_snafu::{Result, ResultExt}; +2420 use n0_watcher::Watcher; +2421 use quinn::ServerConfig; +2422 use rand::{Rng, RngCore}; +2423 use tokio::task::JoinSet; +2424 use tokio_util::task::AbortOnDropHandle; +2425 use tracing::{error, info, info_span, instrument, Instrument}; +2426 use tracing_test::traced_test; +2427 +2428 use super::{NodeIdMappedAddr, Options}; +2429 use crate::{ +2430 dns::DnsResolver, +2431 endpoint::{DirectAddr, PathSelection, Source}, +2432 magicsock::{node_map, Handle, MagicSock}, +2433 tls, Endpoint, RelayMap, RelayMode, SecretKey, +2434 }; +2435 +2436 const ALPN: &[u8] = b"n0/test/1"; +2437 +2438 impl Default for Options { +2439 fn default() -> Self { +2440 let secret_key = SecretKey::generate(rand::rngs::OsRng); +2441 let server_config = make_default_server_config(&secret_key); +2442 Options { +2443 addr_v4: None, +2444 addr_v6: None, +2445 secret_key, +2446 relay_map: RelayMap::empty(), +2447 node_map: None, +2448 discovery: None, +2449 proxy_url: None, +2450 dns_resolver: DnsResolver::new(), +2451 server_config, +2452 #[cfg(any(test, feature = "test-utils"))] +2453 insecure_skip_relay_cert_verify: false, +2454 #[cfg(any(test, feature = "test-utils"))] +2455 path_selection: PathSelection::default(), +2456 discovery_user_data: None, +2457 metrics: Default::default(), +2458 } +2459 } +2460 } +2461 +2462 /// Generate a server config with no ALPNS and a default transport configuration +2463 fn make_default_server_config(secret_key: &SecretKey) -> ServerConfig { +2464 let quic_server_config = +2465 crate::tls::TlsConfig::new(secret_key.clone()).make_server_config(vec![], false); +2466 let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config)); +2467 server_config.transport_config(Arc::new(quinn::TransportConfig::default())); +2468 server_config +2469 } +2470 +2471 impl MagicSock { +2472 #[track_caller] +2473 pub fn add_test_addr(&self, node_addr: NodeAddr) { +2474 self.add_node_addr( +2475 node_addr, +2476 Source::NamedApp { +2477 name: "test".into(), +2478 }, +2479 ) +2480 .unwrap() +2481 } +2482 } +2483 +2484 /// Magicsock plus wrappers for sending packets +2485 #[derive(Clone)] +2486 struct MagicStack { +2487 secret_key: SecretKey, +2488 endpoint: Endpoint, +2489 } 2490 -2491 let mut transport_config = quinn::TransportConfig::default(); -2492 transport_config.max_idle_timeout(Some(Duration::from_secs(10).try_into().unwrap())); -2493 -2494 let endpoint = Endpoint::builder() -2495 .secret_key(secret_key.clone()) -2496 .transport_config(transport_config) -2497 .relay_mode(relay_mode) -2498 .alpns(vec![ALPN.to_vec()]) -2499 .bind() -2500 .await -2501 .unwrap(); -2502 -2503 Self { -2504 secret_key, -2505 endpoint, -2506 } -2507 } -2508 -2509 fn tracked_endpoints(&self) -> Vec<PublicKey> { -2510 self.endpoint -2511 .magic_sock() -2512 .list_remote_infos() -2513 .into_iter() -2514 .map(|ep| ep.node_id) -2515 .collect() -2516 } -2517 -2518 fn public(&self) -> PublicKey { -2519 self.secret_key.public() +2491 impl MagicStack { +2492 async fn new(relay_mode: RelayMode) -> Self { +2493 let secret_key = SecretKey::generate(rand::thread_rng()); +2494 +2495 let mut transport_config = quinn::TransportConfig::default(); +2496 transport_config.max_idle_timeout(Some(Duration::from_secs(10).try_into().unwrap())); +2497 +2498 let endpoint = Endpoint::builder() +2499 .secret_key(secret_key.clone()) +2500 .transport_config(transport_config) +2501 .relay_mode(relay_mode) +2502 .alpns(vec![ALPN.to_vec()]) +2503 .bind() +2504 .await +2505 .unwrap(); +2506 +2507 Self { +2508 secret_key, +2509 endpoint, +2510 } +2511 } +2512 +2513 fn tracked_endpoints(&self) -> Vec<PublicKey> { +2514 self.endpoint +2515 .magic_sock() +2516 .list_remote_infos() +2517 .into_iter() +2518 .map(|ep| ep.node_id) +2519 .collect() 2520 } -2521 } -2522 -2523 /// Monitors endpoint changes and plumbs things together. -2524 /// -2525 /// This is a way of connecting endpoints without a relay server. Whenever the local -2526 /// endpoints of a magic endpoint change this address is added to the other magic -2527 /// sockets. This function will await until the endpoints are connected the first time -2528 /// before returning. -2529 /// -2530 /// When the returned drop guard is dropped, the tasks doing this updating are stopped. -2531 #[instrument(skip_all)] -2532 async fn mesh_stacks(stacks: Vec<MagicStack>) -> Result<JoinSet<()>> { -2533 /// Registers endpoint addresses of a node to all other nodes. -2534 fn update_direct_addrs( -2535 stacks: &[MagicStack], -2536 my_idx: usize, -2537 new_addrs: BTreeSet<DirectAddr>, -2538 ) { -2539 let me = &stacks[my_idx]; -2540 for (i, m) in stacks.iter().enumerate() { -2541 if i == my_idx { -2542 continue; -2543 } -2544 -2545 let addr = NodeAddr { -2546 node_id: me.public(), -2547 relay_url: None, -2548 direct_addresses: new_addrs.iter().map(|ep| ep.addr).collect(), -2549 }; -2550 m.endpoint.magic_sock().add_test_addr(addr); -2551 } -2552 } -2553 -2554 // For each node, start a task which monitors its local endpoints and registers them -2555 // with the other nodes as local endpoints become known. -2556 let mut tasks = JoinSet::new(); -2557 for (my_idx, m) in stacks.iter().enumerate() { -2558 let m = m.clone(); -2559 let stacks = stacks.clone(); -2560 tasks.spawn(async move { -2561 let me = m.endpoint.node_id().fmt_short(); -2562 let mut stream = m.endpoint.direct_addresses().stream().filter_map(|i| i); -2563 while let Some(new_eps) = stream.next().await { -2564 info!(%me, "conn{} endpoints update: {:?}", my_idx + 1, new_eps); -2565 update_direct_addrs(&stacks, my_idx, new_eps); -2566 } -2567 }); -2568 } -2569 -2570 // Wait for all nodes to be registered with each other. -2571 time::timeout(Duration::from_secs(10), async move { -2572 let all_node_ids: Vec<_> = stacks.iter().map(|ms| ms.endpoint.node_id()).collect(); -2573 loop { -2574 let mut ready = Vec::with_capacity(stacks.len()); -2575 for ms in stacks.iter() { -2576 let endpoints = ms.tracked_endpoints(); -2577 let my_node_id = ms.endpoint.node_id(); -2578 let all_nodes_meshed = all_node_ids -2579 .iter() -2580 .filter(|node_id| **node_id != my_node_id) -2581 .all(|node_id| endpoints.contains(node_id)); -2582 ready.push(all_nodes_meshed); -2583 } -2584 if ready.iter().all(|meshed| *meshed) { -2585 break; -2586 } -2587 time::sleep(Duration::from_millis(200)).await; -2588 } -2589 }) -2590 .await -2591 .context("timeout")?; -2592 info!("all nodes meshed"); -2593 Ok(tasks) -2594 } -2595 -2596 #[instrument(skip_all, fields(me = %ep.endpoint.node_id().fmt_short()))] -2597 async fn echo_receiver(ep: MagicStack, loss: ExpectedLoss) -> Result { -2598 info!("accepting conn"); -2599 let conn = ep.endpoint.accept().await.expect("no conn"); -2600 -2601 info!("connecting"); -2602 let conn = conn.await.context("connecting")?; -2603 info!("accepting bi"); -2604 let (mut send_bi, mut recv_bi) = conn.accept_bi().await.context("accept bi")?; -2605 -2606 info!("reading"); -2607 let val = recv_bi -2608 .read_to_end(usize::MAX) -2609 .await -2610 .context("read to end")?; -2611 -2612 info!("replying"); -2613 for chunk in val.chunks(12) { -2614 send_bi.write_all(chunk).await.context("write all")?; -2615 } -2616 -2617 info!("finishing"); -2618 send_bi.finish().context("finish")?; -2619 send_bi.stopped().await.context("stopped")?; +2521 +2522 fn public(&self) -> PublicKey { +2523 self.secret_key.public() +2524 } +2525 } +2526 +2527 /// Monitors endpoint changes and plumbs things together. +2528 /// +2529 /// This is a way of connecting endpoints without a relay server. Whenever the local +2530 /// endpoints of a magic endpoint change this address is added to the other magic +2531 /// sockets. This function will await until the endpoints are connected the first time +2532 /// before returning. +2533 /// +2534 /// When the returned drop guard is dropped, the tasks doing this updating are stopped. +2535 #[instrument(skip_all)] +2536 async fn mesh_stacks(stacks: Vec<MagicStack>) -> Result<JoinSet<()>> { +2537 /// Registers endpoint addresses of a node to all other nodes. +2538 fn update_direct_addrs( +2539 stacks: &[MagicStack], +2540 my_idx: usize, +2541 new_addrs: BTreeSet<DirectAddr>, +2542 ) { +2543 let me = &stacks[my_idx]; +2544 for (i, m) in stacks.iter().enumerate() { +2545 if i == my_idx { +2546 continue; +2547 } +2548 +2549 let addr = NodeAddr { +2550 node_id: me.public(), +2551 relay_url: None, +2552 direct_addresses: new_addrs.iter().map(|ep| ep.addr).collect(), +2553 }; +2554 m.endpoint.magic_sock().add_test_addr(addr); +2555 } +2556 } +2557 +2558 // For each node, start a task which monitors its local endpoints and registers them +2559 // with the other nodes as local endpoints become known. +2560 let mut tasks = JoinSet::new(); +2561 for (my_idx, m) in stacks.iter().enumerate() { +2562 let m = m.clone(); +2563 let stacks = stacks.clone(); +2564 tasks.spawn(async move { +2565 let me = m.endpoint.node_id().fmt_short(); +2566 let mut stream = m.endpoint.direct_addresses().stream().filter_map(|i| i); +2567 while let Some(new_eps) = stream.next().await { +2568 info!(%me, "conn{} endpoints update: {:?}", my_idx + 1, new_eps); +2569 update_direct_addrs(&stacks, my_idx, new_eps); +2570 } +2571 }); +2572 } +2573 +2574 // Wait for all nodes to be registered with each other. +2575 time::timeout(Duration::from_secs(10), async move { +2576 let all_node_ids: Vec<_> = stacks.iter().map(|ms| ms.endpoint.node_id()).collect(); +2577 loop { +2578 let mut ready = Vec::with_capacity(stacks.len()); +2579 for ms in stacks.iter() { +2580 let endpoints = ms.tracked_endpoints(); +2581 let my_node_id = ms.endpoint.node_id(); +2582 let all_nodes_meshed = all_node_ids +2583 .iter() +2584 .filter(|node_id| **node_id != my_node_id) +2585 .all(|node_id| endpoints.contains(node_id)); +2586 ready.push(all_nodes_meshed); +2587 } +2588 if ready.iter().all(|meshed| *meshed) { +2589 break; +2590 } +2591 time::sleep(Duration::from_millis(200)).await; +2592 } +2593 }) +2594 .await +2595 .context("timeout")?; +2596 info!("all nodes meshed"); +2597 Ok(tasks) +2598 } +2599 +2600 #[instrument(skip_all, fields(me = %ep.endpoint.node_id().fmt_short()))] +2601 async fn echo_receiver(ep: MagicStack, loss: ExpectedLoss) -> Result { +2602 info!("accepting conn"); +2603 let conn = ep.endpoint.accept().await.expect("no conn"); +2604 +2605 info!("connecting"); +2606 let conn = conn.await.context("connecting")?; +2607 info!("accepting bi"); +2608 let (mut send_bi, mut recv_bi) = conn.accept_bi().await.context("accept bi")?; +2609 +2610 info!("reading"); +2611 let val = recv_bi +2612 .read_to_end(usize::MAX) +2613 .await +2614 .context("read to end")?; +2615 +2616 info!("replying"); +2617 for chunk in val.chunks(12) { +2618 send_bi.write_all(chunk).await.context("write all")?; +2619 } 2620 -2621 let stats = conn.stats(); -2622 info!("stats: {:#?}", stats); -2623 // TODO: ensure panics in this function are reported ok -2624 if matches!(loss, ExpectedLoss::AlmostNone) { -2625 assert!( -2626 stats.path.lost_packets < 10, -2627 "[receiver] should not loose many packets", -2628 ); -2629 } -2630 -2631 info!("close"); -2632 conn.close(0u32.into(), b"done"); -2633 info!("wait idle"); -2634 ep.endpoint.endpoint().wait_idle().await; -2635 -2636 Ok(()) -2637 } -2638 -2639 #[instrument(skip_all, fields(me = %ep.endpoint.node_id().fmt_short()))] -2640 async fn echo_sender( -2641 ep: MagicStack, -2642 dest_id: PublicKey, -2643 msg: &[u8], -2644 loss: ExpectedLoss, -2645 ) -> Result { -2646 info!("connecting to {}", dest_id.fmt_short()); -2647 let dest = NodeAddr::new(dest_id); -2648 let conn = ep.endpoint.connect(dest, ALPN).await?; -2649 -2650 info!("opening bi"); -2651 let (mut send_bi, mut recv_bi) = conn.open_bi().await.context("open bi")?; -2652 -2653 info!("writing message"); -2654 send_bi.write_all(msg).await.context("write all")?; -2655 -2656 info!("finishing"); -2657 send_bi.finish().context("finish")?; -2658 send_bi.stopped().await.context("stopped")?; +2621 info!("finishing"); +2622 send_bi.finish().context("finish")?; +2623 send_bi.stopped().await.context("stopped")?; +2624 +2625 let stats = conn.stats(); +2626 info!("stats: {:#?}", stats); +2627 // TODO: ensure panics in this function are reported ok +2628 if matches!(loss, ExpectedLoss::AlmostNone) { +2629 assert!( +2630 stats.path.lost_packets < 10, +2631 "[receiver] should not loose many packets", +2632 ); +2633 } +2634 +2635 info!("close"); +2636 conn.close(0u32.into(), b"done"); +2637 info!("wait idle"); +2638 ep.endpoint.endpoint().wait_idle().await; +2639 +2640 Ok(()) +2641 } +2642 +2643 #[instrument(skip_all, fields(me = %ep.endpoint.node_id().fmt_short()))] +2644 async fn echo_sender( +2645 ep: MagicStack, +2646 dest_id: PublicKey, +2647 msg: &[u8], +2648 loss: ExpectedLoss, +2649 ) -> Result { +2650 info!("connecting to {}", dest_id.fmt_short()); +2651 let dest = NodeAddr::new(dest_id); +2652 let conn = ep.endpoint.connect(dest, ALPN).await?; +2653 +2654 info!("opening bi"); +2655 let (mut send_bi, mut recv_bi) = conn.open_bi().await.context("open bi")?; +2656 +2657 info!("writing message"); +2658 send_bi.write_all(msg).await.context("write all")?; 2659 -2660 info!("reading_to_end"); -2661 let val = recv_bi -2662 .read_to_end(usize::MAX) -2663 .await -2664 .context("read to end")?; -2665 assert_eq!( -2666 val, -2667 msg, -2668 "[sender] expected {}, got {}", -2669 HEXLOWER.encode(msg), -2670 HEXLOWER.encode(&val) -2671 ); -2672 -2673 let stats = conn.stats(); -2674 info!("stats: {:#?}", stats); -2675 if matches!(loss, ExpectedLoss::AlmostNone) { -2676 assert!( -2677 stats.path.lost_packets < 10, -2678 "[sender] should not loose many packets", -2679 ); -2680 } -2681 -2682 info!("close"); -2683 conn.close(0u32.into(), b"done"); -2684 info!("wait idle"); -2685 ep.endpoint.endpoint().wait_idle().await; -2686 Ok(()) -2687 } -2688 -2689 #[derive(Debug, Copy, Clone)] -2690 enum ExpectedLoss { -2691 AlmostNone, -2692 YeahSure, -2693 } -2694 -2695 /// Runs a roundtrip between the [`echo_sender`] and [`echo_receiver`]. -2696 async fn run_roundtrip( -2697 sender: MagicStack, -2698 receiver: MagicStack, -2699 payload: &[u8], -2700 loss: ExpectedLoss, -2701 ) { -2702 let send_node_id = sender.endpoint.node_id(); -2703 let recv_node_id = receiver.endpoint.node_id(); -2704 info!("\nroundtrip: {send_node_id:#} -> {recv_node_id:#}"); -2705 -2706 let receiver_task = tokio::spawn(echo_receiver(receiver, loss)); -2707 let sender_res = echo_sender(sender, recv_node_id, payload, loss).await; -2708 let sender_is_err = match sender_res { -2709 Ok(()) => false, -2710 Err(err) => { -2711 eprintln!("[sender] Error:\n{err:#?}"); -2712 true -2713 } -2714 }; -2715 let receiver_is_err = match receiver_task.await { -2716 Ok(Ok(())) => false, -2717 Ok(Err(err)) => { -2718 eprintln!("[receiver] Error:\n{err:#?}"); -2719 true -2720 } -2721 Err(joinerr) => { -2722 if joinerr.is_panic() { -2723 std::panic::resume_unwind(joinerr.into_panic()); -2724 } else { -2725 eprintln!("[receiver] Error:\n{joinerr:#?}"); -2726 } -2727 true -2728 } -2729 }; -2730 if sender_is_err || receiver_is_err { -2731 panic!("Sender or receiver errored"); -2732 } -2733 } -2734 -2735 #[tokio::test(flavor = "multi_thread")] -2736 #[traced_test] -2737 async fn test_two_devices_roundtrip_quinn_magic() -> Result { -2738 let m1 = MagicStack::new(RelayMode::Disabled).await; -2739 let m2 = MagicStack::new(RelayMode::Disabled).await; -2740 -2741 let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?; -2742 -2743 for i in 0..5 { -2744 info!("\n-- round {i}"); -2745 run_roundtrip( -2746 m1.clone(), -2747 m2.clone(), -2748 b"hello m1", -2749 ExpectedLoss::AlmostNone, -2750 ) -2751 .await; -2752 run_roundtrip( -2753 m2.clone(), -2754 m1.clone(), -2755 b"hello m2", -2756 ExpectedLoss::AlmostNone, -2757 ) -2758 .await; -2759 -2760 info!("\n-- larger data"); -2761 let mut data = vec![0u8; 10 * 1024]; -2762 rand::thread_rng().fill_bytes(&mut data); -2763 run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::AlmostNone).await; -2764 run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::AlmostNone).await; -2765 } -2766 -2767 Ok(()) -2768 } -2769 -2770 #[tokio::test] -2771 #[traced_test] -2772 async fn test_regression_network_change_rebind_wakes_connection_driver() -> n0_snafu::Result { -2773 let m1 = MagicStack::new(RelayMode::Disabled).await; -2774 let m2 = MagicStack::new(RelayMode::Disabled).await; -2775 -2776 println!("Net change"); -2777 m1.endpoint.magic_sock().force_network_change(true).await; -2778 tokio::time::sleep(Duration::from_secs(1)).await; // wait for socket rebinding +2660 info!("finishing"); +2661 send_bi.finish().context("finish")?; +2662 send_bi.stopped().await.context("stopped")?; +2663 +2664 info!("reading_to_end"); +2665 let val = recv_bi +2666 .read_to_end(usize::MAX) +2667 .await +2668 .context("read to end")?; +2669 assert_eq!( +2670 val, +2671 msg, +2672 "[sender] expected {}, got {}", +2673 HEXLOWER.encode(msg), +2674 HEXLOWER.encode(&val) +2675 ); +2676 +2677 let stats = conn.stats(); +2678 info!("stats: {:#?}", stats); +2679 if matches!(loss, ExpectedLoss::AlmostNone) { +2680 assert!( +2681 stats.path.lost_packets < 10, +2682 "[sender] should not loose many packets", +2683 ); +2684 } +2685 +2686 info!("close"); +2687 conn.close(0u32.into(), b"done"); +2688 info!("wait idle"); +2689 ep.endpoint.endpoint().wait_idle().await; +2690 Ok(()) +2691 } +2692 +2693 #[derive(Debug, Copy, Clone)] +2694 enum ExpectedLoss { +2695 AlmostNone, +2696 YeahSure, +2697 } +2698 +2699 /// Runs a roundtrip between the [`echo_sender`] and [`echo_receiver`]. +2700 async fn run_roundtrip( +2701 sender: MagicStack, +2702 receiver: MagicStack, +2703 payload: &[u8], +2704 loss: ExpectedLoss, +2705 ) { +2706 let send_node_id = sender.endpoint.node_id(); +2707 let recv_node_id = receiver.endpoint.node_id(); +2708 info!("\nroundtrip: {send_node_id:#} -> {recv_node_id:#}"); +2709 +2710 let receiver_task = tokio::spawn(echo_receiver(receiver, loss)); +2711 let sender_res = echo_sender(sender, recv_node_id, payload, loss).await; +2712 let sender_is_err = match sender_res { +2713 Ok(()) => false, +2714 Err(err) => { +2715 eprintln!("[sender] Error:\n{err:#?}"); +2716 true +2717 } +2718 }; +2719 let receiver_is_err = match receiver_task.await { +2720 Ok(Ok(())) => false, +2721 Ok(Err(err)) => { +2722 eprintln!("[receiver] Error:\n{err:#?}"); +2723 true +2724 } +2725 Err(joinerr) => { +2726 if joinerr.is_panic() { +2727 std::panic::resume_unwind(joinerr.into_panic()); +2728 } else { +2729 eprintln!("[receiver] Error:\n{joinerr:#?}"); +2730 } +2731 true +2732 } +2733 }; +2734 if sender_is_err || receiver_is_err { +2735 panic!("Sender or receiver errored"); +2736 } +2737 } +2738 +2739 #[tokio::test(flavor = "multi_thread")] +2740 #[traced_test] +2741 async fn test_two_devices_roundtrip_quinn_magic() -> Result { +2742 let m1 = MagicStack::new(RelayMode::Disabled).await; +2743 let m2 = MagicStack::new(RelayMode::Disabled).await; +2744 +2745 let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?; +2746 +2747 for i in 0..5 { +2748 info!("\n-- round {i}"); +2749 run_roundtrip( +2750 m1.clone(), +2751 m2.clone(), +2752 b"hello m1", +2753 ExpectedLoss::AlmostNone, +2754 ) +2755 .await; +2756 run_roundtrip( +2757 m2.clone(), +2758 m1.clone(), +2759 b"hello m2", +2760 ExpectedLoss::AlmostNone, +2761 ) +2762 .await; +2763 +2764 info!("\n-- larger data"); +2765 let mut data = vec![0u8; 10 * 1024]; +2766 rand::thread_rng().fill_bytes(&mut data); +2767 run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::AlmostNone).await; +2768 run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::AlmostNone).await; +2769 } +2770 +2771 Ok(()) +2772 } +2773 +2774 #[tokio::test] +2775 #[traced_test] +2776 async fn test_regression_network_change_rebind_wakes_connection_driver() -> n0_snafu::Result { +2777 let m1 = MagicStack::new(RelayMode::Disabled).await; +2778 let m2 = MagicStack::new(RelayMode::Disabled).await; 2779 -2780 let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?; -2781 -2782 let _handle = AbortOnDropHandle::new(tokio::spawn({ -2783 let endpoint = m2.endpoint.clone(); -2784 async move { -2785 while let Some(incoming) = endpoint.accept().await { -2786 println!("Incoming first conn!"); -2787 let conn = incoming.await.e()?; -2788 conn.closed().await; -2789 } -2790 -2791 Ok::<_, n0_snafu::Error>(()) -2792 } -2793 })); +2780 println!("Net change"); +2781 m1.endpoint.magic_sock().force_network_change(true).await; +2782 tokio::time::sleep(Duration::from_secs(1)).await; // wait for socket rebinding +2783 +2784 let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?; +2785 +2786 let _handle = AbortOnDropHandle::new(tokio::spawn({ +2787 let endpoint = m2.endpoint.clone(); +2788 async move { +2789 while let Some(incoming) = endpoint.accept().await { +2790 println!("Incoming first conn!"); +2791 let conn = incoming.await.e()?; +2792 conn.closed().await; +2793 } 2794 -2795 println!("first conn!"); -2796 let conn = m1 -2797 .endpoint -2798 .connect(m2.endpoint.node_addr().initialized().await?, ALPN) -2799 .await?; -2800 println!("Closing first conn"); -2801 conn.close(0u32.into(), b"bye lolz"); -2802 conn.closed().await; -2803 println!("Closed first conn"); -2804 -2805 Ok(()) -2806 } -2807 -2808 #[tokio::test(flavor = "multi_thread")] -2809 #[traced_test] -2810 async fn test_two_devices_roundtrip_network_change() -> Result { -2811 time::timeout( -2812 Duration::from_secs(90), -2813 test_two_devices_roundtrip_network_change_impl(), -2814 ) -2815 .await -2816 .context("timeout")? -2817 } -2818 -2819 /// Same structure as `test_two_devices_roundtrip_quinn_magic`, but interrupts regularly -2820 /// with (simulated) network changes. -2821 async fn test_two_devices_roundtrip_network_change_impl() -> Result { -2822 let m1 = MagicStack::new(RelayMode::Disabled).await; -2823 let m2 = MagicStack::new(RelayMode::Disabled).await; -2824 -2825 let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?; -2826 -2827 let offset = || { -2828 let delay = rand::thread_rng().gen_range(10..=500); -2829 Duration::from_millis(delay) -2830 }; -2831 let rounds = 5; -2832 -2833 // Regular network changes to m1 only. -2834 let m1_network_change_guard = { -2835 let m1 = m1.clone(); -2836 let task = tokio::spawn(async move { -2837 loop { -2838 println!("[m1] network change"); -2839 m1.endpoint.magic_sock().force_network_change(true).await; -2840 time::sleep(offset()).await; -2841 } -2842 }); -2843 AbortOnDropHandle::new(task) -2844 }; -2845 -2846 for i in 0..rounds { -2847 println!("-- [m1 changes] round {}", i + 1); -2848 run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await; -2849 run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await; -2850 -2851 println!("-- [m1 changes] larger data"); -2852 let mut data = vec![0u8; 10 * 1024]; -2853 rand::thread_rng().fill_bytes(&mut data); -2854 run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await; -2855 run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await; -2856 } -2857 -2858 std::mem::drop(m1_network_change_guard); -2859 -2860 // Regular network changes to m2 only. -2861 let m2_network_change_guard = { -2862 let m2 = m2.clone(); -2863 let task = tokio::spawn(async move { -2864 loop { -2865 println!("[m2] network change"); -2866 m2.endpoint.magic_sock().force_network_change(true).await; -2867 time::sleep(offset()).await; -2868 } -2869 }); -2870 AbortOnDropHandle::new(task) -2871 }; -2872 -2873 for i in 0..rounds { -2874 println!("-- [m2 changes] round {}", i + 1); -2875 run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await; -2876 run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await; -2877 -2878 println!("-- [m2 changes] larger data"); -2879 let mut data = vec![0u8; 10 * 1024]; -2880 rand::thread_rng().fill_bytes(&mut data); -2881 run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await; -2882 run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await; -2883 } -2884 -2885 std::mem::drop(m2_network_change_guard); -2886 -2887 // Regular network changes to both m1 and m2 only. -2888 let m1_m2_network_change_guard = { -2889 let m1 = m1.clone(); -2890 let m2 = m2.clone(); -2891 let task = tokio::spawn(async move { -2892 println!("-- [m1] network change"); -2893 m1.endpoint.magic_sock().force_network_change(true).await; -2894 println!("-- [m2] network change"); -2895 m2.endpoint.magic_sock().force_network_change(true).await; -2896 time::sleep(offset()).await; -2897 }); -2898 AbortOnDropHandle::new(task) -2899 }; -2900 -2901 for i in 0..rounds { -2902 println!("-- [m1 & m2 changes] round {}", i + 1); -2903 run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await; -2904 run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await; -2905 -2906 println!("-- [m1 & m2 changes] larger data"); -2907 let mut data = vec![0u8; 10 * 1024]; -2908 rand::thread_rng().fill_bytes(&mut data); -2909 run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await; -2910 run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await; -2911 } -2912 -2913 std::mem::drop(m1_m2_network_change_guard); -2914 Ok(()) -2915 } +2795 Ok::<_, n0_snafu::Error>(()) +2796 } +2797 })); +2798 +2799 println!("first conn!"); +2800 let conn = m1 +2801 .endpoint +2802 .connect(m2.endpoint.node_addr().initialized().await?, ALPN) +2803 .await?; +2804 println!("Closing first conn"); +2805 conn.close(0u32.into(), b"bye lolz"); +2806 conn.closed().await; +2807 println!("Closed first conn"); +2808 +2809 Ok(()) +2810 } +2811 +2812 #[tokio::test(flavor = "multi_thread")] +2813 #[traced_test] +2814 async fn test_two_devices_roundtrip_network_change() -> Result { +2815 time::timeout( +2816 Duration::from_secs(90), +2817 test_two_devices_roundtrip_network_change_impl(), +2818 ) +2819 .await +2820 .context("timeout")? +2821 } +2822 +2823 /// Same structure as `test_two_devices_roundtrip_quinn_magic`, but interrupts regularly +2824 /// with (simulated) network changes. +2825 async fn test_two_devices_roundtrip_network_change_impl() -> Result { +2826 let m1 = MagicStack::new(RelayMode::Disabled).await; +2827 let m2 = MagicStack::new(RelayMode::Disabled).await; +2828 +2829 let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?; +2830 +2831 let offset = || { +2832 let delay = rand::thread_rng().gen_range(10..=500); +2833 Duration::from_millis(delay) +2834 }; +2835 let rounds = 5; +2836 +2837 // Regular network changes to m1 only. +2838 let m1_network_change_guard = { +2839 let m1 = m1.clone(); +2840 let task = tokio::spawn(async move { +2841 loop { +2842 println!("[m1] network change"); +2843 m1.endpoint.magic_sock().force_network_change(true).await; +2844 time::sleep(offset()).await; +2845 } +2846 }); +2847 AbortOnDropHandle::new(task) +2848 }; +2849 +2850 for i in 0..rounds { +2851 println!("-- [m1 changes] round {}", i + 1); +2852 run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await; +2853 run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await; +2854 +2855 println!("-- [m1 changes] larger data"); +2856 let mut data = vec![0u8; 10 * 1024]; +2857 rand::thread_rng().fill_bytes(&mut data); +2858 run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await; +2859 run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await; +2860 } +2861 +2862 std::mem::drop(m1_network_change_guard); +2863 +2864 // Regular network changes to m2 only. +2865 let m2_network_change_guard = { +2866 let m2 = m2.clone(); +2867 let task = tokio::spawn(async move { +2868 loop { +2869 println!("[m2] network change"); +2870 m2.endpoint.magic_sock().force_network_change(true).await; +2871 time::sleep(offset()).await; +2872 } +2873 }); +2874 AbortOnDropHandle::new(task) +2875 }; +2876 +2877 for i in 0..rounds { +2878 println!("-- [m2 changes] round {}", i + 1); +2879 run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await; +2880 run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await; +2881 +2882 println!("-- [m2 changes] larger data"); +2883 let mut data = vec![0u8; 10 * 1024]; +2884 rand::thread_rng().fill_bytes(&mut data); +2885 run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await; +2886 run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await; +2887 } +2888 +2889 std::mem::drop(m2_network_change_guard); +2890 +2891 // Regular network changes to both m1 and m2 only. +2892 let m1_m2_network_change_guard = { +2893 let m1 = m1.clone(); +2894 let m2 = m2.clone(); +2895 let task = tokio::spawn(async move { +2896 println!("-- [m1] network change"); +2897 m1.endpoint.magic_sock().force_network_change(true).await; +2898 println!("-- [m2] network change"); +2899 m2.endpoint.magic_sock().force_network_change(true).await; +2900 time::sleep(offset()).await; +2901 }); +2902 AbortOnDropHandle::new(task) +2903 }; +2904 +2905 for i in 0..rounds { +2906 println!("-- [m1 & m2 changes] round {}", i + 1); +2907 run_roundtrip(m1.clone(), m2.clone(), b"hello m1", ExpectedLoss::YeahSure).await; +2908 run_roundtrip(m2.clone(), m1.clone(), b"hello m2", ExpectedLoss::YeahSure).await; +2909 +2910 println!("-- [m1 & m2 changes] larger data"); +2911 let mut data = vec![0u8; 10 * 1024]; +2912 rand::thread_rng().fill_bytes(&mut data); +2913 run_roundtrip(m1.clone(), m2.clone(), &data, ExpectedLoss::YeahSure).await; +2914 run_roundtrip(m2.clone(), m1.clone(), &data, ExpectedLoss::YeahSure).await; +2915 } 2916 -2917 #[tokio::test(flavor = "multi_thread")] -2918 #[traced_test] -2919 async fn test_two_devices_setup_teardown() -> Result { -2920 for i in 0..10 { -2921 println!("-- round {i}"); -2922 println!("setting up magic stack"); -2923 let m1 = MagicStack::new(RelayMode::Disabled).await; -2924 let m2 = MagicStack::new(RelayMode::Disabled).await; -2925 -2926 let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?; -2927 -2928 println!("closing endpoints"); -2929 let msock1 = m1.endpoint.magic_sock(); -2930 let msock2 = m2.endpoint.magic_sock(); -2931 m1.endpoint.close().await; -2932 m2.endpoint.close().await; -2933 -2934 assert!(msock1.msock.is_closed()); -2935 assert!(msock2.msock.is_closed()); -2936 } -2937 Ok(()) -2938 } -2939 -2940 #[tokio::test] -2941 #[traced_test] -2942 async fn test_local_endpoints() { -2943 let ms = Handle::new(Default::default()).await.unwrap(); -2944 -2945 // See if we can get endpoints. -2946 let eps0 = ms.direct_addresses().initialized().await.unwrap(); -2947 println!("{eps0:?}"); -2948 assert!(!eps0.is_empty()); -2949 -2950 // Getting the endpoints again immediately should give the same results. -2951 let eps1 = ms.direct_addresses().initialized().await.unwrap(); -2952 println!("{eps1:?}"); -2953 assert_eq!(eps0, eps1); -2954 } -2955 -2956 /// Creates a new [`quinn::Endpoint`] hooked up to a [`MagicSock`]. -2957 /// -2958 /// This is without involving [`crate::endpoint::Endpoint`]. The socket will accept -2959 /// connections using [`ALPN`]. -2960 /// -2961 /// Use [`magicsock_connect`] to establish connections. -2962 #[instrument(name = "ep", skip_all, fields(me = secret_key.public().fmt_short()))] -2963 async fn magicsock_ep(secret_key: SecretKey) -> Result<Handle> { -2964 let quic_server_config = -2965 tls::TlsConfig::new(secret_key.clone()).make_server_config(vec![ALPN.to_vec()], true); -2966 let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config)); -2967 server_config.transport_config(Arc::new(quinn::TransportConfig::default())); -2968 -2969 let dns_resolver = DnsResolver::new(); -2970 let opts = Options { -2971 addr_v4: None, -2972 addr_v6: None, -2973 secret_key: secret_key.clone(), -2974 relay_map: RelayMap::empty(), -2975 node_map: None, -2976 discovery: None, -2977 discovery_user_data: None, -2978 dns_resolver, -2979 proxy_url: None, -2980 server_config, -2981 insecure_skip_relay_cert_verify: false, -2982 path_selection: PathSelection::default(), -2983 metrics: Default::default(), -2984 }; -2985 let msock = MagicSock::spawn(opts).await?; -2986 Ok(msock) -2987 } -2988 -2989 /// Connects from `ep` returned by [`magicsock_ep`] to the `node_id`. -2990 /// -2991 /// Uses [`ALPN`], `node_id`, must match `addr`. -2992 #[instrument(name = "connect", skip_all, fields(me = ep_secret_key.public().fmt_short()))] -2993 async fn magicsock_connect( -2994 ep: &quinn::Endpoint, -2995 ep_secret_key: SecretKey, -2996 addr: NodeIdMappedAddr, -2997 node_id: NodeId, -2998 ) -> Result<quinn::Connection> { -2999 // Endpoint::connect sets this, do the same to have similar behaviour. -3000 let mut transport_config = quinn::TransportConfig::default(); -3001 transport_config.keep_alive_interval(Some(Duration::from_secs(1))); -3002 -3003 magicsock_connect_with_transport_config( -3004 ep, -3005 ep_secret_key, -3006 addr, -3007 node_id, -3008 Arc::new(transport_config), -3009 ) -3010 .await -3011 } -3012 -3013 /// Connects from `ep` returned by [`magicsock_ep`] to the `node_id`. -3014 /// -3015 /// This version allows customising the transport config. -3016 /// -3017 /// Uses [`ALPN`], `node_id`, must match `addr`. -3018 #[instrument(name = "connect", skip_all, fields(me = ep_secret_key.public().fmt_short()))] -3019 async fn magicsock_connect_with_transport_config( -3020 ep: &quinn::Endpoint, -3021 ep_secret_key: SecretKey, -3022 mapped_addr: NodeIdMappedAddr, -3023 node_id: NodeId, -3024 transport_config: Arc<quinn::TransportConfig>, -3025 ) -> Result<quinn::Connection> { -3026 let alpns = vec![ALPN.to_vec()]; -3027 let quic_client_config = -3028 tls::TlsConfig::new(ep_secret_key.clone()).make_client_config(alpns, true); -3029 let mut client_config = quinn::ClientConfig::new(Arc::new(quic_client_config)); -3030 client_config.transport_config(transport_config); -3031 let connect = ep -3032 .connect_with( -3033 client_config, -3034 mapped_addr.private_socket_addr(), -3035 &tls::name::encode(node_id), -3036 ) -3037 .context("connect")?; -3038 let connection = connect.await.e()?; -3039 Ok(connection) -3040 } -3041 -3042 #[tokio::test] -3043 #[traced_test] -3044 async fn test_try_send_no_send_addr() { -3045 // Regression test: if there is no send_addr we should keep being able to use the -3046 // Endpoint. -3047 -3048 let secret_key_1 = SecretKey::from_bytes(&[1u8; 32]); -3049 let secret_key_2 = SecretKey::from_bytes(&[2u8; 32]); -3050 let node_id_2 = secret_key_2.public(); -3051 let secret_key_missing_node = SecretKey::from_bytes(&[255u8; 32]); -3052 let node_id_missing_node = secret_key_missing_node.public(); -3053 -3054 let msock_1 = magicsock_ep(secret_key_1.clone()).await.unwrap(); -3055 -3056 // Generate an address not present in the NodeMap. -3057 let bad_addr = NodeIdMappedAddr::generate(); -3058 -3059 // 500ms is rather fast here. Running this locally it should always be the correct -3060 // timeout. If this is too slow however the test will not become flaky as we are -3061 // expecting the timeout, we might just get the timeout for the wrong reason. But -3062 // this speeds up the test. -3063 let res = tokio::time::timeout( -3064 Duration::from_millis(500), -3065 magicsock_connect( -3066 msock_1.endpoint(), -3067 secret_key_1.clone(), -3068 bad_addr, -3069 node_id_missing_node, -3070 ), -3071 ) -3072 .await; -3073 assert!(res.is_err(), "expecting timeout"); -3074 -3075 // Now check we can still create another connection with this endpoint. -3076 let msock_2 = magicsock_ep(secret_key_2.clone()).await.unwrap(); -3077 -3078 // This needs an accept task -3079 let accept_task = tokio::spawn({ -3080 async fn accept(ep: quinn::Endpoint) -> Result<()> { -3081 let incoming = ep.accept().await.context("no incoming")?; -3082 let _conn = incoming -3083 .accept() -3084 .context("accept")? -3085 .await -3086 .context("connecting")?; -3087 -3088 // Keep this connection alive for a while -3089 tokio::time::sleep(Duration::from_secs(10)).await; -3090 info!("accept finished"); -3091 Ok(()) -3092 } -3093 let ep = msock_2.endpoint().clone(); -3094 async move { -3095 if let Err(err) = accept(ep).await { -3096 error!("{err:#}"); -3097 } -3098 } -3099 .instrument(info_span!("ep2.accept, me = node_id_2.fmt_short()")) -3100 }); -3101 let _accept_task = AbortOnDropHandle::new(accept_task); -3102 -3103 let node_addr_2 = NodeAddr { -3104 node_id: node_id_2, -3105 relay_url: None, -3106 direct_addresses: msock_2 -3107 .direct_addresses() -3108 .initialized() -3109 .await -3110 .expect("no direct addrs") -3111 .into_iter() -3112 .map(|x| x.addr) -3113 .collect(), -3114 }; -3115 msock_1 -3116 .add_node_addr( -3117 node_addr_2, -3118 Source::NamedApp { -3119 name: "test".into(), -3120 }, -3121 ) -3122 .unwrap(); -3123 let addr = msock_1.get_mapping_addr(node_id_2).unwrap(); -3124 let res = tokio::time::timeout( -3125 Duration::from_secs(10), -3126 magicsock_connect(msock_1.endpoint(), secret_key_1.clone(), addr, node_id_2), -3127 ) -3128 .await -3129 .expect("timeout while connecting"); -3130 -3131 // aka assert!(res.is_ok()) but with nicer error reporting. -3132 res.unwrap(); -3133 -3134 // TODO: Now check if we can connect to a repaired ep_3, but we can't modify that -3135 // much internal state for now. -3136 } +2917 std::mem::drop(m1_m2_network_change_guard); +2918 Ok(()) +2919 } +2920 +2921 #[tokio::test(flavor = "multi_thread")] +2922 #[traced_test] +2923 async fn test_two_devices_setup_teardown() -> Result { +2924 for i in 0..10 { +2925 println!("-- round {i}"); +2926 println!("setting up magic stack"); +2927 let m1 = MagicStack::new(RelayMode::Disabled).await; +2928 let m2 = MagicStack::new(RelayMode::Disabled).await; +2929 +2930 let _guard = mesh_stacks(vec![m1.clone(), m2.clone()]).await?; +2931 +2932 println!("closing endpoints"); +2933 let msock1 = m1.endpoint.magic_sock(); +2934 let msock2 = m2.endpoint.magic_sock(); +2935 m1.endpoint.close().await; +2936 m2.endpoint.close().await; +2937 +2938 assert!(msock1.msock.is_closed()); +2939 assert!(msock2.msock.is_closed()); +2940 } +2941 Ok(()) +2942 } +2943 +2944 #[tokio::test] +2945 #[traced_test] +2946 async fn test_local_endpoints() { +2947 let ms = Handle::new(Default::default()).await.unwrap(); +2948 +2949 // See if we can get endpoints. +2950 let eps0 = ms.direct_addresses().initialized().await.unwrap(); +2951 println!("{eps0:?}"); +2952 assert!(!eps0.is_empty()); +2953 +2954 // Getting the endpoints again immediately should give the same results. +2955 let eps1 = ms.direct_addresses().initialized().await.unwrap(); +2956 println!("{eps1:?}"); +2957 assert_eq!(eps0, eps1); +2958 } +2959 +2960 /// Creates a new [`quinn::Endpoint`] hooked up to a [`MagicSock`]. +2961 /// +2962 /// This is without involving [`crate::endpoint::Endpoint`]. The socket will accept +2963 /// connections using [`ALPN`]. +2964 /// +2965 /// Use [`magicsock_connect`] to establish connections. +2966 #[instrument(name = "ep", skip_all, fields(me = secret_key.public().fmt_short()))] +2967 async fn magicsock_ep(secret_key: SecretKey) -> Result<Handle> { +2968 let quic_server_config = +2969 tls::TlsConfig::new(secret_key.clone()).make_server_config(vec![ALPN.to_vec()], true); +2970 let mut server_config = ServerConfig::with_crypto(Arc::new(quic_server_config)); +2971 server_config.transport_config(Arc::new(quinn::TransportConfig::default())); +2972 +2973 let dns_resolver = DnsResolver::new(); +2974 let opts = Options { +2975 addr_v4: None, +2976 addr_v6: None, +2977 secret_key: secret_key.clone(), +2978 relay_map: RelayMap::empty(), +2979 node_map: None, +2980 discovery: None, +2981 discovery_user_data: None, +2982 dns_resolver, +2983 proxy_url: None, +2984 server_config, +2985 insecure_skip_relay_cert_verify: false, +2986 path_selection: PathSelection::default(), +2987 metrics: Default::default(), +2988 }; +2989 let msock = MagicSock::spawn(opts).await?; +2990 Ok(msock) +2991 } +2992 +2993 /// Connects from `ep` returned by [`magicsock_ep`] to the `node_id`. +2994 /// +2995 /// Uses [`ALPN`], `node_id`, must match `addr`. +2996 #[instrument(name = "connect", skip_all, fields(me = ep_secret_key.public().fmt_short()))] +2997 async fn magicsock_connect( +2998 ep: &quinn::Endpoint, +2999 ep_secret_key: SecretKey, +3000 addr: NodeIdMappedAddr, +3001 node_id: NodeId, +3002 ) -> Result<quinn::Connection> { +3003 // Endpoint::connect sets this, do the same to have similar behaviour. +3004 let mut transport_config = quinn::TransportConfig::default(); +3005 transport_config.keep_alive_interval(Some(Duration::from_secs(1))); +3006 +3007 magicsock_connect_with_transport_config( +3008 ep, +3009 ep_secret_key, +3010 addr, +3011 node_id, +3012 Arc::new(transport_config), +3013 ) +3014 .await +3015 } +3016 +3017 /// Connects from `ep` returned by [`magicsock_ep`] to the `node_id`. +3018 /// +3019 /// This version allows customising the transport config. +3020 /// +3021 /// Uses [`ALPN`], `node_id`, must match `addr`. +3022 #[instrument(name = "connect", skip_all, fields(me = ep_secret_key.public().fmt_short()))] +3023 async fn magicsock_connect_with_transport_config( +3024 ep: &quinn::Endpoint, +3025 ep_secret_key: SecretKey, +3026 mapped_addr: NodeIdMappedAddr, +3027 node_id: NodeId, +3028 transport_config: Arc<quinn::TransportConfig>, +3029 ) -> Result<quinn::Connection> { +3030 let alpns = vec![ALPN.to_vec()]; +3031 let quic_client_config = +3032 tls::TlsConfig::new(ep_secret_key.clone()).make_client_config(alpns, true); +3033 let mut client_config = quinn::ClientConfig::new(Arc::new(quic_client_config)); +3034 client_config.transport_config(transport_config); +3035 let connect = ep +3036 .connect_with( +3037 client_config, +3038 mapped_addr.private_socket_addr(), +3039 &tls::name::encode(node_id), +3040 ) +3041 .context("connect")?; +3042 let connection = connect.await.e()?; +3043 Ok(connection) +3044 } +3045 +3046 #[tokio::test] +3047 #[traced_test] +3048 async fn test_try_send_no_send_addr() { +3049 // Regression test: if there is no send_addr we should keep being able to use the +3050 // Endpoint. +3051 +3052 let secret_key_1 = SecretKey::from_bytes(&[1u8; 32]); +3053 let secret_key_2 = SecretKey::from_bytes(&[2u8; 32]); +3054 let node_id_2 = secret_key_2.public(); +3055 let secret_key_missing_node = SecretKey::from_bytes(&[255u8; 32]); +3056 let node_id_missing_node = secret_key_missing_node.public(); +3057 +3058 let msock_1 = magicsock_ep(secret_key_1.clone()).await.unwrap(); +3059 +3060 // Generate an address not present in the NodeMap. +3061 let bad_addr = NodeIdMappedAddr::generate(); +3062 +3063 // 500ms is rather fast here. Running this locally it should always be the correct +3064 // timeout. If this is too slow however the test will not become flaky as we are +3065 // expecting the timeout, we might just get the timeout for the wrong reason. But +3066 // this speeds up the test. +3067 let res = tokio::time::timeout( +3068 Duration::from_millis(500), +3069 magicsock_connect( +3070 msock_1.endpoint(), +3071 secret_key_1.clone(), +3072 bad_addr, +3073 node_id_missing_node, +3074 ), +3075 ) +3076 .await; +3077 assert!(res.is_err(), "expecting timeout"); +3078 +3079 // Now check we can still create another connection with this endpoint. +3080 let msock_2 = magicsock_ep(secret_key_2.clone()).await.unwrap(); +3081 +3082 // This needs an accept task +3083 let accept_task = tokio::spawn({ +3084 async fn accept(ep: quinn::Endpoint) -> Result<()> { +3085 let incoming = ep.accept().await.context("no incoming")?; +3086 let _conn = incoming +3087 .accept() +3088 .context("accept")? +3089 .await +3090 .context("connecting")?; +3091 +3092 // Keep this connection alive for a while +3093 tokio::time::sleep(Duration::from_secs(10)).await; +3094 info!("accept finished"); +3095 Ok(()) +3096 } +3097 let ep = msock_2.endpoint().clone(); +3098 async move { +3099 if let Err(err) = accept(ep).await { +3100 error!("{err:#}"); +3101 } +3102 } +3103 .instrument(info_span!("ep2.accept, me = node_id_2.fmt_short()")) +3104 }); +3105 let _accept_task = AbortOnDropHandle::new(accept_task); +3106 +3107 let node_addr_2 = NodeAddr { +3108 node_id: node_id_2, +3109 relay_url: None, +3110 direct_addresses: msock_2 +3111 .direct_addresses() +3112 .initialized() +3113 .await +3114 .expect("no direct addrs") +3115 .into_iter() +3116 .map(|x| x.addr) +3117 .collect(), +3118 }; +3119 msock_1 +3120 .add_node_addr( +3121 node_addr_2, +3122 Source::NamedApp { +3123 name: "test".into(), +3124 }, +3125 ) +3126 .unwrap(); +3127 let addr = msock_1.get_mapping_addr(node_id_2).unwrap(); +3128 let res = tokio::time::timeout( +3129 Duration::from_secs(10), +3130 magicsock_connect(msock_1.endpoint(), secret_key_1.clone(), addr, node_id_2), +3131 ) +3132 .await +3133 .expect("timeout while connecting"); +3134 +3135 // aka assert!(res.is_ok()) but with nicer error reporting. +3136 res.unwrap(); 3137 -3138 #[tokio::test] -3139 #[traced_test] -3140 async fn test_try_send_no_udp_addr_or_relay_url() { -3141 // This specifically tests the `if udp_addr.is_none() && relay_url.is_none()` -3142 // behaviour of MagicSock::try_send. -3143 -3144 let secret_key_1 = SecretKey::from_bytes(&[1u8; 32]); -3145 let secret_key_2 = SecretKey::from_bytes(&[2u8; 32]); -3146 let node_id_2 = secret_key_2.public(); +3138 // TODO: Now check if we can connect to a repaired ep_3, but we can't modify that +3139 // much internal state for now. +3140 } +3141 +3142 #[tokio::test] +3143 #[traced_test] +3144 async fn test_try_send_no_udp_addr_or_relay_url() { +3145 // This specifically tests the `if udp_addr.is_none() && relay_url.is_none()` +3146 // behaviour of MagicSock::try_send. 3147 -3148 let msock_1 = magicsock_ep(secret_key_1.clone()).await.unwrap(); -3149 let msock_2 = magicsock_ep(secret_key_2.clone()).await.unwrap(); -3150 let ep_2 = msock_2.endpoint().clone(); +3148 let secret_key_1 = SecretKey::from_bytes(&[1u8; 32]); +3149 let secret_key_2 = SecretKey::from_bytes(&[2u8; 32]); +3150 let node_id_2 = secret_key_2.public(); 3151 -3152 // We need a task to accept the connection. -3153 let accept_task = tokio::spawn({ -3154 async fn accept(ep: quinn::Endpoint) -> Result<()> { -3155 let incoming = ep.accept().await.context("no incoming")?; -3156 let conn = incoming -3157 .accept() -3158 .context("accept")? -3159 .await -3160 .context("connecting")?; -3161 let mut stream = conn.accept_uni().await.context("accept uni")?; -3162 stream.read_to_end(1 << 16).await.context("read to end")?; -3163 info!("accept finished"); -3164 Ok(()) -3165 } -3166 async move { -3167 if let Err(err) = accept(ep_2).await { -3168 error!("{err:#}"); -3169 } -3170 } -3171 .instrument(info_span!("ep2.accept", me = node_id_2.fmt_short())) -3172 }); -3173 let _accept_task = AbortOnDropHandle::new(accept_task); -3174 -3175 // Add an empty entry in the NodeMap of ep_1 -3176 msock_1.node_map.add_node_addr( -3177 NodeAddr { -3178 node_id: node_id_2, -3179 relay_url: None, -3180 direct_addresses: Default::default(), -3181 }, -3182 Source::NamedApp { -3183 name: "test".into(), -3184 }, -3185 &msock_1.metrics.magicsock, -3186 ); -3187 let addr_2 = msock_1.get_mapping_addr(node_id_2).unwrap(); -3188 -3189 // Set a low max_idle_timeout so quinn gives up on this quickly and our test does -3190 // not take forever. You need to check the log output to verify this is really -3191 // triggering the correct error. -3192 // In test_try_send_no_send_addr() above you may have noticed we used -3193 // tokio::time::timeout() on the connection attempt instead. Here however we want -3194 // Quinn itself to have fully given up on the connection attempt because we will -3195 // later connect to **the same** node. If Quinn did not give up on the connection -3196 // we'd close it on drop, and the retransmits of the close packets would interfere -3197 // with the next handshake, closing it during the handshake. This makes the test a -3198 // little slower though. -3199 let mut transport_config = quinn::TransportConfig::default(); -3200 transport_config.max_idle_timeout(Some(Duration::from_millis(200).try_into().unwrap())); -3201 let res = magicsock_connect_with_transport_config( -3202 msock_1.endpoint(), -3203 secret_key_1.clone(), -3204 addr_2, -3205 node_id_2, -3206 Arc::new(transport_config), -3207 ) -3208 .await; -3209 assert!(res.is_err(), "expected timeout"); -3210 info!("first connect timed out as expected"); -3211 -3212 // Provide correct addressing information -3213 msock_1.node_map.add_node_addr( -3214 NodeAddr { -3215 node_id: node_id_2, -3216 relay_url: None, -3217 direct_addresses: msock_2 -3218 .direct_addresses() -3219 .initialized() -3220 .await -3221 .expect("no direct addrs") -3222 .into_iter() -3223 .map(|x| x.addr) -3224 .collect(), -3225 }, -3226 Source::NamedApp { -3227 name: "test".into(), -3228 }, -3229 &msock_1.metrics.magicsock, -3230 ); -3231 -3232 // We can now connect -3233 tokio::time::timeout(Duration::from_secs(10), async move { -3234 info!("establishing new connection"); -3235 let conn = -3236 magicsock_connect(msock_1.endpoint(), secret_key_1.clone(), addr_2, node_id_2) -3237 .await -3238 .unwrap(); -3239 info!("have connection"); -3240 let mut stream = conn.open_uni().await.unwrap(); -3241 stream.write_all(b"hello").await.unwrap(); -3242 stream.finish().unwrap(); -3243 stream.stopped().await.unwrap(); -3244 info!("finished stream"); -3245 }) -3246 .await -3247 .expect("connection timed out"); -3248 -3249 // TODO: could remove the addresses again, send, add it back and see it recover. -3250 // But we don't have that much private access to the NodeMap. This will do for now. -3251 } +3152 let msock_1 = magicsock_ep(secret_key_1.clone()).await.unwrap(); +3153 let msock_2 = magicsock_ep(secret_key_2.clone()).await.unwrap(); +3154 let ep_2 = msock_2.endpoint().clone(); +3155 +3156 // We need a task to accept the connection. +3157 let accept_task = tokio::spawn({ +3158 async fn accept(ep: quinn::Endpoint) -> Result<()> { +3159 let incoming = ep.accept().await.context("no incoming")?; +3160 let conn = incoming +3161 .accept() +3162 .context("accept")? +3163 .await +3164 .context("connecting")?; +3165 let mut stream = conn.accept_uni().await.context("accept uni")?; +3166 stream.read_to_end(1 << 16).await.context("read to end")?; +3167 info!("accept finished"); +3168 Ok(()) +3169 } +3170 async move { +3171 if let Err(err) = accept(ep_2).await { +3172 error!("{err:#}"); +3173 } +3174 } +3175 .instrument(info_span!("ep2.accept", me = node_id_2.fmt_short())) +3176 }); +3177 let _accept_task = AbortOnDropHandle::new(accept_task); +3178 +3179 // Add an empty entry in the NodeMap of ep_1 +3180 msock_1.node_map.add_node_addr( +3181 NodeAddr { +3182 node_id: node_id_2, +3183 relay_url: None, +3184 direct_addresses: Default::default(), +3185 }, +3186 Source::NamedApp { +3187 name: "test".into(), +3188 }, +3189 &msock_1.metrics.magicsock, +3190 ); +3191 let addr_2 = msock_1.get_mapping_addr(node_id_2).unwrap(); +3192 +3193 // Set a low max_idle_timeout so quinn gives up on this quickly and our test does +3194 // not take forever. You need to check the log output to verify this is really +3195 // triggering the correct error. +3196 // In test_try_send_no_send_addr() above you may have noticed we used +3197 // tokio::time::timeout() on the connection attempt instead. Here however we want +3198 // Quinn itself to have fully given up on the connection attempt because we will +3199 // later connect to **the same** node. If Quinn did not give up on the connection +3200 // we'd close it on drop, and the retransmits of the close packets would interfere +3201 // with the next handshake, closing it during the handshake. This makes the test a +3202 // little slower though. +3203 let mut transport_config = quinn::TransportConfig::default(); +3204 transport_config.max_idle_timeout(Some(Duration::from_millis(200).try_into().unwrap())); +3205 let res = magicsock_connect_with_transport_config( +3206 msock_1.endpoint(), +3207 secret_key_1.clone(), +3208 addr_2, +3209 node_id_2, +3210 Arc::new(transport_config), +3211 ) +3212 .await; +3213 assert!(res.is_err(), "expected timeout"); +3214 info!("first connect timed out as expected"); +3215 +3216 // Provide correct addressing information +3217 msock_1.node_map.add_node_addr( +3218 NodeAddr { +3219 node_id: node_id_2, +3220 relay_url: None, +3221 direct_addresses: msock_2 +3222 .direct_addresses() +3223 .initialized() +3224 .await +3225 .expect("no direct addrs") +3226 .into_iter() +3227 .map(|x| x.addr) +3228 .collect(), +3229 }, +3230 Source::NamedApp { +3231 name: "test".into(), +3232 }, +3233 &msock_1.metrics.magicsock, +3234 ); +3235 +3236 // We can now connect +3237 tokio::time::timeout(Duration::from_secs(10), async move { +3238 info!("establishing new connection"); +3239 let conn = +3240 magicsock_connect(msock_1.endpoint(), secret_key_1.clone(), addr_2, node_id_2) +3241 .await +3242 .unwrap(); +3243 info!("have connection"); +3244 let mut stream = conn.open_uni().await.unwrap(); +3245 stream.write_all(b"hello").await.unwrap(); +3246 stream.finish().unwrap(); +3247 stream.stopped().await.unwrap(); +3248 info!("finished stream"); +3249 }) +3250 .await +3251 .expect("connection timed out"); 3252 -3253 #[tokio::test] -3254 async fn test_add_node_addr() -> Result { -3255 let stack = MagicStack::new(RelayMode::Default).await; -3256 let mut rng = rand::thread_rng(); -3257 -3258 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 0); -3259 -3260 // Empty -3261 let empty_addr = NodeAddr { -3262 node_id: SecretKey::generate(&mut rng).public(), -3263 relay_url: None, -3264 direct_addresses: Default::default(), -3265 }; -3266 let err = stack -3267 .endpoint -3268 .magic_sock() -3269 .add_node_addr(empty_addr, node_map::Source::App) -3270 .unwrap_err(); -3271 assert!(err -3272 .to_string() -3273 .to_lowercase() -3274 .contains("empty addressing info")); -3275 -3276 // relay url only -3277 let addr = NodeAddr { -3278 node_id: SecretKey::generate(&mut rng).public(), -3279 relay_url: Some("http://my-relay.com".parse().unwrap()), -3280 direct_addresses: Default::default(), -3281 }; -3282 stack -3283 .endpoint -3284 .magic_sock() -3285 .add_node_addr(addr, node_map::Source::App)?; -3286 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 1); -3287 -3288 // addrs only -3289 let addr = NodeAddr { -3290 node_id: SecretKey::generate(&mut rng).public(), -3291 relay_url: None, -3292 direct_addresses: ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(), -3293 }; -3294 stack -3295 .endpoint -3296 .magic_sock() -3297 .add_node_addr(addr, node_map::Source::App)?; -3298 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 2); -3299 -3300 // both -3301 let addr = NodeAddr { -3302 node_id: SecretKey::generate(&mut rng).public(), -3303 relay_url: Some("http://my-relay.com".parse().unwrap()), -3304 direct_addresses: ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(), -3305 }; -3306 stack -3307 .endpoint -3308 .magic_sock() -3309 .add_node_addr(addr, node_map::Source::App)?; -3310 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 3); -3311 -3312 Ok(()) -3313 } -3314}

\ No newline at end of file +3253 // TODO: could remove the addresses again, send, add it back and see it recover. +3254 // But we don't have that much private access to the NodeMap. This will do for now. +3255 } +3256 +3257 #[tokio::test] +3258 async fn test_add_node_addr() -> Result { +3259 let stack = MagicStack::new(RelayMode::Default).await; +3260 let mut rng = rand::thread_rng(); +3261 +3262 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 0); +3263 +3264 // Empty +3265 let empty_addr = NodeAddr { +3266 node_id: SecretKey::generate(&mut rng).public(), +3267 relay_url: None, +3268 direct_addresses: Default::default(), +3269 }; +3270 let err = stack +3271 .endpoint +3272 .magic_sock() +3273 .add_node_addr(empty_addr, node_map::Source::App) +3274 .unwrap_err(); +3275 assert!(err +3276 .to_string() +3277 .to_lowercase() +3278 .contains("empty addressing info")); +3279 +3280 // relay url only +3281 let addr = NodeAddr { +3282 node_id: SecretKey::generate(&mut rng).public(), +3283 relay_url: Some("http://my-relay.com".parse().unwrap()), +3284 direct_addresses: Default::default(), +3285 }; +3286 stack +3287 .endpoint +3288 .magic_sock() +3289 .add_node_addr(addr, node_map::Source::App)?; +3290 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 1); +3291 +3292 // addrs only +3293 let addr = NodeAddr { +3294 node_id: SecretKey::generate(&mut rng).public(), +3295 relay_url: None, +3296 direct_addresses: ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(), +3297 }; +3298 stack +3299 .endpoint +3300 .magic_sock() +3301 .add_node_addr(addr, node_map::Source::App)?; +3302 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 2); +3303 +3304 // both +3305 let addr = NodeAddr { +3306 node_id: SecretKey::generate(&mut rng).public(), +3307 relay_url: Some("http://my-relay.com".parse().unwrap()), +3308 direct_addresses: ["127.0.0.1:1234".parse().unwrap()].into_iter().collect(), +3309 }; +3310 stack +3311 .endpoint +3312 .magic_sock() +3313 .add_node_addr(addr, node_map::Source::App)?; +3314 assert_eq!(stack.endpoint.magic_sock().node_map.node_count(), 3); +3315 +3316 Ok(()) +3317 } +3318}
\ No newline at end of file diff --git a/pr/3331/docs/src/iroh/magicsock/transports/relay.rs.html b/pr/3331/docs/src/iroh/magicsock/transports/relay.rs.html index aa67417596..8b917e6b66 100644 --- a/pr/3331/docs/src/iroh/magicsock/transports/relay.rs.html +++ b/pr/3331/docs/src/iroh/magicsock/transports/relay.rs.html @@ -5,379 +5,384 @@ 5 6use bytes::Bytes; 7use iroh_base::{NodeId, RelayUrl}; -8use iroh_relay::protos::relay::Datagrams; -9use n0_future::{ -10 ready, -11 task::{self, AbortOnDropHandle}, -12}; -13use n0_watcher::{Watchable, Watcher as _}; +8use n0_future::{ +9 ready, +10 task::{self, AbortOnDropHandle}, +11}; +12use n0_watcher::{Watchable, Watcher as _}; +13use smallvec::SmallVec; 14use tokio::sync::mpsc; 15use tokio_util::sync::PollSender; 16use tracing::{error, info_span, trace, warn, Instrument}; 17 18use super::{Addr, Transmit}; -19 -20mod actor; -21 -22pub(crate) use self::actor::Config as RelayActorConfig; -23use self::actor::{RelayActor, RelayActorMessage, RelayRecvDatagram, RelaySendItem}; -24 -25#[derive(Debug)] -26pub(crate) struct RelayTransport { -27 /// Queue to receive datagrams from relays for [`quinn::AsyncUdpSocket::poll_recv`]. -28 relay_datagram_recv_queue: mpsc::Receiver<RelayRecvDatagram>, -29 /// Channel on which to send datagrams via a relay server. -30 relay_datagram_send_channel: mpsc::Sender<RelaySendItem>, -31 actor_sender: mpsc::Sender<RelayActorMessage>, -32 _actor_handle: AbortOnDropHandle<()>, -33 my_relay: Watchable<Option<RelayUrl>>, -34 my_node_id: NodeId, -35} -36 -37impl RelayTransport { -38 pub(crate) fn new(config: RelayActorConfig) -> Self { -39 let (relay_datagram_send_tx, relay_datagram_send_rx) = mpsc::channel(256); -40 -41 let (relay_datagram_recv_tx, relay_datagram_recv_rx) = mpsc::channel(512); -42 -43 let (actor_sender, actor_receiver) = mpsc::channel(256); -44 -45 let my_node_id = config.secret_key.public(); -46 let my_relay = config.my_relay.clone(); -47 -48 let relay_actor = RelayActor::new(config, relay_datagram_recv_tx); -49 -50 let actor_handle = AbortOnDropHandle::new(task::spawn( -51 async move { -52 relay_actor -53 .run(actor_receiver, relay_datagram_send_rx) -54 .await; -55 } -56 .instrument(info_span!("relay-actor")), -57 )); -58 -59 Self { -60 relay_datagram_recv_queue: relay_datagram_recv_rx, -61 relay_datagram_send_channel: relay_datagram_send_tx, -62 actor_sender, -63 _actor_handle: actor_handle, -64 my_relay, -65 my_node_id, -66 } -67 } -68 -69 pub(crate) fn create_sender(&self) -> RelaySender { -70 RelaySender { -71 sender: PollSender::new(self.relay_datagram_send_channel.clone()), -72 } -73 } -74 -75 pub(super) fn poll_recv( -76 &mut self, -77 cx: &mut Context, -78 bufs: &mut [io::IoSliceMut<'_>], -79 metas: &mut [quinn_udp::RecvMeta], -80 source_addrs: &mut [Addr], -81 ) -> Poll<io::Result<usize>> { -82 let mut num_msgs = 0; -83 for ((buf_out, meta_out), addr) in bufs -84 .iter_mut() -85 .zip(metas.iter_mut()) -86 .zip(source_addrs.iter_mut()) -87 { -88 let dm = match self.relay_datagram_recv_queue.poll_recv(cx) { -89 Poll::Ready(Some(recv)) => recv, -90 Poll::Ready(None) => { -91 error!("relay_recv_channel closed"); -92 return Poll::Ready(Err(io::Error::new( -93 io::ErrorKind::NotConnected, -94 "connection closed", -95 ))); -96 } -97 Poll::Pending => { -98 break; -99 } -100 }; -101 -102 buf_out[..dm.datagrams.contents.len()].copy_from_slice(&dm.datagrams.contents); -103 meta_out.len = dm.datagrams.contents.len(); -104 meta_out.stride = dm -105 .datagrams -106 .segment_size -107 .map_or(dm.datagrams.contents.len(), |s| s as usize); -108 meta_out.ecn = None; -109 meta_out.dst_ip = None; // TODO: insert the relay url for this relay -110 -111 *addr = (dm.url, dm.src).into(); -112 num_msgs += 1; -113 } -114 -115 // If we have any msgs to report, they are in the first `num_msgs_total` slots -116 if num_msgs > 0 { -117 debug_assert!(num_msgs <= metas.len()); -118 Poll::Ready(Ok(num_msgs)) -119 } else { -120 Poll::Pending -121 } -122 } -123 -124 pub(super) fn local_addr_watch( -125 &self, -126 ) -> n0_watcher::Map<n0_watcher::Direct<Option<RelayUrl>>, Option<(RelayUrl, NodeId)>> { -127 let my_node_id = self.my_node_id; -128 self.my_relay -129 .watch() -130 .map(move |url| url.map(|url| (url, my_node_id))) -131 .expect("disconnected") -132 } -133 -134 pub(super) fn create_network_change_sender(&self) -> RelayNetworkChangeSender { -135 RelayNetworkChangeSender { -136 sender: self.actor_sender.clone(), -137 } -138 } -139} -140 -141#[derive(Debug)] -142pub(super) struct RelayNetworkChangeSender { -143 sender: mpsc::Sender<RelayActorMessage>, -144} -145 -146impl RelayNetworkChangeSender { -147 pub(super) fn on_network_change(&self, report: &crate::magicsock::Report) { -148 self.send_relay_actor(RelayActorMessage::NetworkChange { -149 report: report.clone(), -150 }); -151 } -152 -153 pub(super) fn rebind(&self) -> io::Result<()> { -154 self.send_relay_actor(RelayActorMessage::MaybeCloseRelaysOnRebind); -155 -156 Ok(()) -157 } -158 -159 fn send_relay_actor(&self, msg: RelayActorMessage) { -160 match self.sender.try_send(msg) { -161 Ok(_) => {} -162 Err(mpsc::error::TrySendError::Closed(_)) => { -163 warn!("unable to send to relay actor, already closed"); -164 } -165 Err(mpsc::error::TrySendError::Full(_)) => { -166 warn!("dropping message for relay actor, channel is full"); -167 } -168 } -169 } -170} -171 -172/// Sender to send datagrams to the [`RelayActor`]. -173/// -174/// This includes the waker coordination required to support [`quinn::UdpSender::poll_send`]. -175#[derive(Debug, Clone)] -176pub(crate) struct RelaySender { -177 sender: PollSender<RelaySendItem>, -178} -179 -180impl RelaySender { -181 pub(super) fn is_valid_send_addr(&self, _url: &RelayUrl, _node_id: &NodeId) -> bool { -182 true -183 } -184 -185 pub(super) async fn send( -186 &self, -187 dest_url: RelayUrl, -188 dest_node: NodeId, -189 transmit: &Transmit<'_>, -190 ) -> io::Result<()> { -191 let contents = datagrams_from_transmit(transmit); -192 -193 let item = RelaySendItem { -194 remote_node: dest_node, -195 url: dest_url.clone(), -196 datagrams: contents, -197 }; -198 -199 let dest_node = item.remote_node; -200 let dest_url = item.url.clone(); -201 let Some(sender) = self.sender.get_ref() else { -202 return Err(io::Error::other("channel closed")); -203 }; -204 match sender.send(item).await { -205 Ok(_) => { -206 trace!(node = %dest_node.fmt_short(), relay_url = %dest_url, -207 "send relay: message queued"); -208 Ok(()) -209 } -210 Err(mpsc::error::SendError(_)) => { -211 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, -212 "send relay: message dropped, channel to actor is closed"); -213 Err(io::Error::new( -214 io::ErrorKind::ConnectionReset, -215 "channel to actor is closed", -216 )) -217 } -218 } -219 } -220 -221 pub(super) fn poll_send( -222 &mut self, -223 cx: &mut Context, -224 dest_url: RelayUrl, -225 dest_node: NodeId, -226 transmit: &Transmit<'_>, -227 ) -> Poll<io::Result<()>> { -228 match ready!(self.sender.poll_reserve(cx)) { -229 Ok(()) => { -230 trace!(node = %dest_node.fmt_short(), relay_url = %dest_url, -231 "send relay: message queued"); -232 -233 let contents = datagrams_from_transmit(transmit); -234 let item = RelaySendItem { -235 remote_node: dest_node, -236 url: dest_url.clone(), -237 datagrams: contents, -238 }; -239 let dest_node = item.remote_node; -240 let dest_url = item.url.clone(); -241 -242 match self.sender.send_item(item) { -243 Ok(()) => Poll::Ready(Ok(())), -244 Err(_err) => { -245 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, -246 "send relay: message dropped, channel to actor is closed"); -247 Poll::Ready(Err(io::Error::new( -248 io::ErrorKind::ConnectionReset, -249 "channel to actor is closed", -250 ))) -251 } -252 } -253 } -254 Err(_err) => { -255 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, -256 "send relay: message dropped, channel to actor is closed"); -257 Poll::Ready(Err(io::Error::new( -258 io::ErrorKind::ConnectionReset, -259 "channel to actor is closed", -260 ))) -261 } -262 } -263 } -264 -265 pub(super) fn try_send( -266 &self, -267 dest_url: RelayUrl, -268 dest_node: NodeId, -269 transmit: &Transmit<'_>, -270 ) -> io::Result<()> { -271 let contents = datagrams_from_transmit(transmit); -272 -273 let item = RelaySendItem { -274 remote_node: dest_node, -275 url: dest_url.clone(), -276 datagrams: contents, -277 }; -278 -279 let dest_node = item.remote_node; -280 let dest_url = item.url.clone(); -281 -282 let Some(sender) = self.sender.get_ref() else { -283 return Err(io::Error::other("channel closed")); -284 }; -285 -286 match sender.try_send(item) { -287 Ok(_) => { -288 trace!(node = %dest_node.fmt_short(), relay_url = %dest_url, -289 "send relay: message queued"); -290 Ok(()) -291 } -292 Err(mpsc::error::TrySendError::Closed(_)) => { -293 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, -294 "send relay: message dropped, channel to actor is closed"); -295 Err(io::Error::new( -296 io::ErrorKind::ConnectionReset, -297 "channel to actor is closed", -298 )) -299 } -300 Err(mpsc::error::TrySendError::Full(_)) => { -301 warn!(node = %dest_node.fmt_short(), relay_url = %dest_url, -302 "send relay: message dropped, channel to actor is full"); -303 Err(io::Error::new(io::ErrorKind::WouldBlock, "channel full")) -304 } -305 } -306 } -307} -308 -309/// Translate a UDP transmit to the `Datagrams` type for sending over the relay. -310// TODO: If quinn stayed on bytes this would probably be much cheaper, probably. Need to -311// figure out where they allocate the Vec. -312fn datagrams_from_transmit(transmit: &Transmit<'_>) -> Datagrams { -313 Datagrams { -314 ecn: transmit.ecn.map(|ecn| match ecn { -315 quinn_udp::EcnCodepoint::Ect0 => quinn_proto::EcnCodepoint::Ect0, -316 quinn_udp::EcnCodepoint::Ect1 => quinn_proto::EcnCodepoint::Ect1, -317 quinn_udp::EcnCodepoint::Ce => quinn_proto::EcnCodepoint::Ce, -318 }), -319 segment_size: transmit.segment_size.map(|ss| ss as u16), -320 contents: Bytes::copy_from_slice(transmit.contents), -321 } -322} -323 -324#[cfg(test)] -325mod tests { -326 use std::{collections::BTreeSet, time::Duration}; -327 -328 use iroh_base::NodeId; -329 use tokio::task::JoinSet; -330 use tracing::debug; -331 -332 use super::*; -333 use crate::defaults::staging; -334 -335 #[tokio::test(flavor = "multi_thread")] -336 async fn test_relay_datagram_queue() { -337 let capacity = 16; -338 let (sender, mut receiver) = mpsc::channel(capacity); -339 let url = staging::default_na_relay_node().url; -340 -341 let mut tasks = JoinSet::new(); -342 -343 tasks.spawn({ -344 async move { -345 let mut expected_msgs: BTreeSet<usize> = (0..capacity).collect(); -346 while !expected_msgs.is_empty() { -347 let datagram: RelayRecvDatagram = receiver.recv().await.unwrap(); -348 let msg_num = usize::from_le_bytes(datagram.datagrams.contents.as_ref().try_into().unwrap()); -349 debug!("Received {msg_num}"); -350 -351 if !expected_msgs.remove(&msg_num) { -352 panic!("Received message number {msg_num} twice or more, but expected it only exactly once."); -353 } -354 } -355 } -356 }); -357 -358 for i in 0..capacity { -359 tasks.spawn({ -360 let sender = sender.clone(); -361 let url = url.clone(); -362 async move { -363 debug!("Sending {i}"); -364 sender -365 .try_send(RelayRecvDatagram { -366 url, -367 src: NodeId::from_bytes(&[0u8; 32]).unwrap(), -368 datagrams: Datagrams::from(&i.to_le_bytes()), -369 }) -370 .unwrap(); -371 } -372 }); -373 } -374 -375 // We expect all of this work to be done in 10 seconds max. -376 if tokio::time::timeout(Duration::from_secs(10), tasks.join_all()) -377 .await -378 .is_err() -379 { -380 panic!("Timeout - not all messages between 0 and {capacity} received."); -381 } -382 } -383}
\ No newline at end of file +19use crate::magicsock::RelayContents; +20 +21mod actor; +22 +23pub(crate) use self::actor::Config as RelayActorConfig; +24use self::actor::{RelayActor, RelayActorMessage, RelayRecvDatagram, RelaySendItem}; +25 +26#[derive(Debug)] +27pub(crate) struct RelayTransport { +28 /// Queue to receive datagrams from relays for [`quinn::AsyncUdpSocket::poll_recv`]. +29 relay_datagram_recv_queue: mpsc::Receiver<RelayRecvDatagram>, +30 /// Channel on which to send datagrams via a relay server. +31 relay_datagram_send_channel: mpsc::Sender<RelaySendItem>, +32 actor_sender: mpsc::Sender<RelayActorMessage>, +33 _actor_handle: AbortOnDropHandle<()>, +34 my_relay: Watchable<Option<RelayUrl>>, +35 my_node_id: NodeId, +36} +37 +38impl RelayTransport { +39 pub(crate) fn new(config: RelayActorConfig) -> Self { +40 let (relay_datagram_send_tx, relay_datagram_send_rx) = mpsc::channel(256); +41 +42 let (relay_datagram_recv_tx, relay_datagram_recv_rx) = mpsc::channel(512); +43 +44 let (actor_sender, actor_receiver) = mpsc::channel(256); +45 +46 let my_node_id = config.secret_key.public(); +47 let my_relay = config.my_relay.clone(); +48 +49 let relay_actor = RelayActor::new(config, relay_datagram_recv_tx); +50 +51 let actor_handle = AbortOnDropHandle::new(task::spawn( +52 async move { +53 relay_actor +54 .run(actor_receiver, relay_datagram_send_rx) +55 .await; +56 } +57 .instrument(info_span!("relay-actor")), +58 )); +59 +60 Self { +61 relay_datagram_recv_queue: relay_datagram_recv_rx, +62 relay_datagram_send_channel: relay_datagram_send_tx, +63 actor_sender, +64 _actor_handle: actor_handle, +65 my_relay, +66 my_node_id, +67 } +68 } +69 +70 pub(crate) fn create_sender(&self) -> RelaySender { +71 RelaySender { +72 sender: PollSender::new(self.relay_datagram_send_channel.clone()), +73 } +74 } +75 +76 pub(super) fn poll_recv( +77 &mut self, +78 cx: &mut Context, +79 bufs: &mut [io::IoSliceMut<'_>], +80 metas: &mut [quinn_udp::RecvMeta], +81 source_addrs: &mut [Addr], +82 ) -> Poll<io::Result<usize>> { +83 let mut num_msgs = 0; +84 for ((buf_out, meta_out), addr) in bufs +85 .iter_mut() +86 .zip(metas.iter_mut()) +87 .zip(source_addrs.iter_mut()) +88 { +89 let dm = match self.relay_datagram_recv_queue.poll_recv(cx) { +90 Poll::Ready(Some(recv)) => recv, +91 Poll::Ready(None) => { +92 error!("relay_recv_channel closed"); +93 return Poll::Ready(Err(io::Error::new( +94 io::ErrorKind::NotConnected, +95 "connection closed", +96 ))); +97 } +98 Poll::Pending => { +99 break; +100 } +101 }; +102 +103 buf_out[..dm.buf.len()].copy_from_slice(&dm.buf); +104 meta_out.len = dm.buf.len(); +105 meta_out.stride = dm.buf.len(); +106 meta_out.ecn = None; +107 meta_out.dst_ip = None; // TODO: insert the relay url for this relay +108 +109 *addr = (dm.url, dm.src).into(); +110 num_msgs += 1; +111 } +112 +113 // If we have any msgs to report, they are in the first `num_msgs_total` slots +114 if num_msgs > 0 { +115 debug_assert!(num_msgs <= metas.len()); +116 Poll::Ready(Ok(num_msgs)) +117 } else { +118 Poll::Pending +119 } +120 } +121 +122 pub(super) fn local_addr_watch( +123 &self, +124 ) -> n0_watcher::Map<n0_watcher::Direct<Option<RelayUrl>>, Option<(RelayUrl, NodeId)>> { +125 let my_node_id = self.my_node_id; +126 self.my_relay +127 .watch() +128 .map(move |url| url.map(|url| (url, my_node_id))) +129 .expect("disconnected") +130 } +131 +132 pub(super) fn create_network_change_sender(&self) -> RelayNetworkChangeSender { +133 RelayNetworkChangeSender { +134 sender: self.actor_sender.clone(), +135 } +136 } +137} +138 +139#[derive(Debug)] +140pub(super) struct RelayNetworkChangeSender { +141 sender: mpsc::Sender<RelayActorMessage>, +142} +143 +144impl RelayNetworkChangeSender { +145 pub(super) fn on_network_change(&self, report: &crate::magicsock::Report) { +146 self.send_relay_actor(RelayActorMessage::NetworkChange { +147 report: report.clone(), +148 }); +149 } +150 +151 pub(super) fn rebind(&self) -> io::Result<()> { +152 self.send_relay_actor(RelayActorMessage::MaybeCloseRelaysOnRebind); +153 +154 Ok(()) +155 } +156 +157 fn send_relay_actor(&self, msg: RelayActorMessage) { +158 match self.sender.try_send(msg) { +159 Ok(_) => {} +160 Err(mpsc::error::TrySendError::Closed(_)) => { +161 warn!("unable to send to relay actor, already closed"); +162 } +163 Err(mpsc::error::TrySendError::Full(_)) => { +164 warn!("dropping message for relay actor, channel is full"); +165 } +166 } +167 } +168} +169 +170/// Sender to send datagrams to the [`RelayActor`]. +171/// +172/// This includes the waker coordination required to support [`quinn::UdpSender::poll_send`]. +173#[derive(Debug, Clone)] +174pub(crate) struct RelaySender { +175 sender: PollSender<RelaySendItem>, +176} +177 +178impl RelaySender { +179 pub(super) fn is_valid_send_addr(&self, _url: &RelayUrl, _node_id: &NodeId) -> bool { +180 true +181 } +182 +183 pub(super) async fn send( +184 &self, +185 dest_url: RelayUrl, +186 dest_node: NodeId, +187 transmit: &Transmit<'_>, +188 ) -> io::Result<()> { +189 let contents = split_packets(transmit); +190 +191 let item = RelaySendItem { +192 remote_node: dest_node, +193 url: dest_url.clone(), +194 datagrams: contents, +195 }; +196 +197 let dest_node = item.remote_node; +198 let dest_url = item.url.clone(); +199 let Some(sender) = self.sender.get_ref() else { +200 return Err(io::Error::other("channel closed")); +201 }; +202 match sender.send(item).await { +203 Ok(_) => { +204 trace!(node = %dest_node.fmt_short(), relay_url = %dest_url, +205 "send relay: message queued"); +206 Ok(()) +207 } +208 Err(mpsc::error::SendError(_)) => { +209 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, +210 "send relay: message dropped, channel to actor is closed"); +211 Err(io::Error::new( +212 io::ErrorKind::ConnectionReset, +213 "channel to actor is closed", +214 )) +215 } +216 } +217 } +218 +219 pub(super) fn poll_send( +220 &mut self, +221 cx: &mut Context, +222 dest_url: RelayUrl, +223 dest_node: NodeId, +224 transmit: &Transmit<'_>, +225 ) -> Poll<io::Result<()>> { +226 match ready!(self.sender.poll_reserve(cx)) { +227 Ok(()) => { +228 trace!(node = %dest_node.fmt_short(), relay_url = %dest_url, +229 "send relay: message queued"); +230 +231 let contents = split_packets(transmit); +232 let item = RelaySendItem { +233 remote_node: dest_node, +234 url: dest_url.clone(), +235 datagrams: contents, +236 }; +237 let dest_node = item.remote_node; +238 let dest_url = item.url.clone(); +239 +240 match self.sender.send_item(item) { +241 Ok(()) => Poll::Ready(Ok(())), +242 Err(_err) => { +243 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, +244 "send relay: message dropped, channel to actor is closed"); +245 Poll::Ready(Err(io::Error::new( +246 io::ErrorKind::ConnectionReset, +247 "channel to actor is closed", +248 ))) +249 } +250 } +251 } +252 Err(_err) => { +253 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, +254 "send relay: message dropped, channel to actor is closed"); +255 Poll::Ready(Err(io::Error::new( +256 io::ErrorKind::ConnectionReset, +257 "channel to actor is closed", +258 ))) +259 } +260 } +261 } +262 +263 pub(super) fn try_send( +264 &self, +265 dest_url: RelayUrl, +266 dest_node: NodeId, +267 transmit: &Transmit<'_>, +268 ) -> io::Result<()> { +269 let contents = split_packets(transmit); +270 +271 let item = RelaySendItem { +272 remote_node: dest_node, +273 url: dest_url.clone(), +274 datagrams: contents, +275 }; +276 +277 let dest_node = item.remote_node; +278 let dest_url = item.url.clone(); +279 +280 let Some(sender) = self.sender.get_ref() else { +281 return Err(io::Error::other("channel closed")); +282 }; +283 +284 match sender.try_send(item) { +285 Ok(_) => { +286 trace!(node = %dest_node.fmt_short(), relay_url = %dest_url, +287 "send relay: message queued"); +288 Ok(()) +289 } +290 Err(mpsc::error::TrySendError::Closed(_)) => { +291 error!(node = %dest_node.fmt_short(), relay_url = %dest_url, +292 "send relay: message dropped, channel to actor is closed"); +293 Err(io::Error::new( +294 io::ErrorKind::ConnectionReset, +295 "channel to actor is closed", +296 )) +297 } +298 Err(mpsc::error::TrySendError::Full(_)) => { +299 warn!(node = %dest_node.fmt_short(), relay_url = %dest_url, +300 "send relay: message dropped, channel to actor is full"); +301 Err(io::Error::new(io::ErrorKind::WouldBlock, "channel full")) +302 } +303 } +304 } +305} +306 +307/// Split a transmit containing a GSO payload into individual packets. +308/// +309/// This allocates the data. +310/// +311/// If the transmit has a segment size it contains multiple GSO packets. It will be split +312/// into multiple packets according to that segment size. If it does not have a segment +313/// size, the contents will be sent as a single packet. +314// TODO: If quinn stayed on bytes this would probably be much cheaper, probably. Need to +315// figure out where they allocate the Vec. +316fn split_packets(transmit: &Transmit<'_>) -> RelayContents { +317 let mut res = SmallVec::with_capacity(1); +318 let contents = transmit.contents; +319 if let Some(segment_size) = transmit.segment_size { +320 for chunk in contents.chunks(segment_size) { +321 res.push(Bytes::from(chunk.to_vec())); +322 } +323 } else { +324 res.push(Bytes::from(contents.to_vec())); +325 } +326 res +327} +328 +329#[cfg(test)] +330mod tests { +331 use std::{collections::BTreeSet, time::Duration}; +332 +333 use iroh_base::NodeId; +334 use tokio::task::JoinSet; +335 use tracing::debug; +336 +337 use super::*; +338 use crate::defaults::staging; +339 +340 #[tokio::test(flavor = "multi_thread")] +341 async fn test_relay_datagram_queue() { +342 let capacity = 16; +343 let (sender, mut receiver) = mpsc::channel(capacity); +344 let url = staging::default_na_relay_node().url; +345 +346 let mut tasks = JoinSet::new(); +347 +348 tasks.spawn({ +349 async move { +350 let mut expected_msgs: BTreeSet<usize> = (0..capacity).collect(); +351 while !expected_msgs.is_empty() { +352 let datagram: RelayRecvDatagram = receiver.recv().await.unwrap(); +353 let msg_num = usize::from_le_bytes(datagram.buf.as_ref().try_into().unwrap()); +354 debug!("Received {msg_num}"); +355 +356 if !expected_msgs.remove(&msg_num) { +357 panic!("Received message number {msg_num} twice or more, but expected it only exactly once."); +358 } +359 } +360 } +361 }); +362 +363 for i in 0..capacity { +364 tasks.spawn({ +365 let sender = sender.clone(); +366 let url = url.clone(); +367 async move { +368 debug!("Sending {i}"); +369 sender +370 .try_send(RelayRecvDatagram { +371 url, +372 src: NodeId::from_bytes(&[0u8; 32]).unwrap(), +373 buf: Bytes::copy_from_slice(&i.to_le_bytes()), +374 }) +375 .unwrap(); +376 } +377 }); +378 } +379 +380 // We expect all of this work to be done in 10 seconds max. +381 if tokio::time::timeout(Duration::from_secs(10), tasks.join_all()) +382 .await +383 .is_err() +384 { +385 panic!("Timeout - not all messages between 0 and {capacity} received."); +386 } +387 } +388} \ No newline at end of file diff --git a/pr/3331/docs/src/iroh/magicsock/transports/relay/actor.rs.html b/pr/3331/docs/src/iroh/magicsock/transports/relay/actor.rs.html index 27b34bd8a8..a1ae1e6ff5 100644 --- a/pr/3331/docs/src/iroh/magicsock/transports/relay/actor.rs.html +++ b/pr/3331/docs/src/iroh/magicsock/transports/relay/actor.rs.html @@ -38,1537 +38,1701 @@ 38}; 39 40use backon::{Backoff, BackoffBuilder, ExponentialBuilder}; -41use iroh_base::{NodeId, RelayUrl, SecretKey}; -42use iroh_relay::{ -43 self as relay, -44 client::{Client, ConnectError, RecvError, SendError}, -45 protos::relay::{ClientToRelayMsg, Datagrams, RelayToClientMsg}, -46 PingTracker, -47}; -48use n0_future::{ -49 task::JoinSet, -50 time::{self, Duration, Instant, MissedTickBehavior}, -51 FuturesUnorderedBounded, SinkExt, StreamExt, -52}; -53use n0_watcher::Watchable; -54use nested_enum_utils::common_fields; -55use netwatch::interfaces; -56use snafu::{IntoError, ResultExt, Snafu}; -57use tokio::sync::{mpsc, oneshot}; -58use tokio_util::sync::CancellationToken; -59use tracing::{debug, error, event, info, info_span, instrument, trace, warn, Instrument, Level}; -60use url::Url; -61 -62#[cfg(not(wasm_browser))] -63use crate::dns::DnsResolver; -64use crate::{magicsock::Metrics as MagicsockMetrics, net_report::Report, util::MaybeFuture}; -65 -66/// How long a non-home relay connection needs to be idle (last written to) before we close it. -67const RELAY_INACTIVE_CLEANUP_TIME: Duration = Duration::from_secs(60); -68 -69/// Interval in which we ping the relay server to ensure the connection is alive. -70/// -71/// The default QUIC max_idle_timeout is 30s, so setting that to half this time gives some -72/// chance of recovering. -73const PING_INTERVAL: Duration = Duration::from_secs(15); -74 -75/// Number of datagrams which can be sent to the relay server in one batch. -76/// -77/// This means while this batch is sending to the server no other relay protocol frames can -78/// be sent to the server, e.g. no Ping frames or so. While the maximum packet size is -79/// rather large, each item can typically be expected to up to 1500 or the max GSO size. -80const SEND_DATAGRAM_BATCH_SIZE: usize = 20; -81 -82/// Timeout for establishing the relay connection. -83/// -84/// This includes DNS, dialing the server, upgrading the connection, and completing the -85/// handshake. -86const CONNECT_TIMEOUT: Duration = Duration::from_secs(10); -87 -88/// Time after which the [`ActiveRelayActor`] will drop undeliverable datagrams. -89/// -90/// When the [`ActiveRelayActor`] is not connected it can not deliver datagrams. However it -91/// will still receive datagrams to send from the [`RelayActor`]. If connecting takes -92/// longer than this timeout datagrams will be dropped. -93/// -94/// This value is set to 3 times the QUIC initial Probe Timeout (PTO). -95const UNDELIVERABLE_DATAGRAM_TIMEOUT: Duration = Duration::from_secs(3); -96 -97/// An actor which handles the connection to a single relay server. -98/// -99/// It is responsible for maintaining the connection to the relay server and handling all -100/// communication with it. +41use bytes::{Bytes, BytesMut}; +42use iroh_base::{NodeId, PublicKey, RelayUrl, SecretKey}; +43use iroh_relay::{ +44 self as relay, +45 client::{Client, ConnectError, RecvError, SendError}, +46 protos::relay::{ClientToRelayMsg, RelayToClientMsg}, +47 PingTracker, MAX_PACKET_SIZE, +48}; +49use n0_future::{ +50 task::JoinSet, +51 time::{self, Duration, Instant, MissedTickBehavior}, +52 FuturesUnorderedBounded, SinkExt, StreamExt, +53}; +54use n0_watcher::Watchable; +55use nested_enum_utils::common_fields; +56use netwatch::interfaces; +57use snafu::{IntoError, ResultExt, Snafu}; +58use tokio::sync::{mpsc, oneshot}; +59use tokio_util::sync::CancellationToken; +60use tracing::{debug, error, event, info, info_span, instrument, trace, warn, Instrument, Level}; +61use url::Url; +62 +63#[cfg(not(wasm_browser))] +64use crate::dns::DnsResolver; +65use crate::{ +66 magicsock::{Metrics as MagicsockMetrics, RelayContents}, +67 net_report::Report, +68 util::MaybeFuture, +69}; +70 +71/// How long a non-home relay connection needs to be idle (last written to) before we close it. +72const RELAY_INACTIVE_CLEANUP_TIME: Duration = Duration::from_secs(60); +73 +74/// Maximum size a datagram payload is allowed to be. +75const MAX_PAYLOAD_SIZE: usize = MAX_PACKET_SIZE - PublicKey::LENGTH; +76 +77/// Interval in which we ping the relay server to ensure the connection is alive. +78/// +79/// The default QUIC max_idle_timeout is 30s, so setting that to half this time gives some +80/// chance of recovering. +81const PING_INTERVAL: Duration = Duration::from_secs(15); +82 +83/// Number of datagrams which can be sent to the relay server in one batch. +84/// +85/// This means while this batch is sending to the server no other relay protocol frames can +86/// be sent to the server, e.g. no Ping frames or so. While the maximum packet size is +87/// rather large, each item can typically be expected to up to 1500 or the max GSO size. +88const SEND_DATAGRAM_BATCH_SIZE: usize = 20; +89 +90/// Timeout for establishing the relay connection. +91/// +92/// This includes DNS, dialing the server, upgrading the connection, and completing the +93/// handshake. +94const CONNECT_TIMEOUT: Duration = Duration::from_secs(10); +95 +96/// Time after which the [`ActiveRelayActor`] will drop undeliverable datagrams. +97/// +98/// When the [`ActiveRelayActor`] is not connected it can not deliver datagrams. However it +99/// will still receive datagrams to send from the [`RelayActor`]. If connecting takes +100/// longer than this timeout datagrams will be dropped. 101/// -102/// The actor shuts down itself on inactivity: inactivity is determined when no more -103/// datagrams are being queued to send. -104/// -105/// This actor has 3 main states it can be in, each has it's dedicated run loop: +102/// This value is set to 3 times the QUIC initial Probe Timeout (PTO). +103const UNDELIVERABLE_DATAGRAM_TIMEOUT: Duration = Duration::from_secs(3); +104 +105/// An actor which handles the connection to a single relay server. 106/// -107/// - Dialing the relay server. -108/// -109/// This will continuously dial the server until connected, using exponential backoff if -110/// it can not connect. See [`ActiveRelayActor::run_dialing`]. -111/// -112/// - Connected to the relay server. -113/// -114/// This state allows receiving from the relay server, though sending is idle in this -115/// state. See [`ActiveRelayActor::run_connected`]. +107/// It is responsible for maintaining the connection to the relay server and handling all +108/// communication with it. +109/// +110/// The actor shuts down itself on inactivity: inactivity is determined when no more +111/// datagrams are being queued to send. +112/// +113/// This actor has 3 main states it can be in, each has it's dedicated run loop: +114/// +115/// - Dialing the relay server. 116/// -117/// - Sending to the relay server. -118/// -119/// This is a sub-state of `connected` so the actor can still be receiving from the relay -120/// server at this time. However it is actively sending data to the server so can not -121/// consume any further items from inboxes which will result in sending more data to the -122/// server until the actor goes back to the `connected` state. -123/// -124/// All these are driven from the top-level [`ActiveRelayActor::run`] loop. -125#[derive(Debug)] -126struct ActiveRelayActor { -127 // The inboxes and channels this actor communicates over. -128 /// Inbox for messages which should be handled without any blocking. -129 prio_inbox: mpsc::Receiver<ActiveRelayPrioMessage>, -130 /// Inbox for messages which involve sending to the relay server. -131 inbox: mpsc::Receiver<ActiveRelayMessage>, -132 /// Queue for received relay datagrams. -133 relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>, -134 /// Channel on which we queue packets to send to the relay. -135 relay_datagrams_send: mpsc::Receiver<RelaySendItem>, -136 -137 // Other actor state. -138 /// The relay server for this actor. -139 url: RelayUrl, -140 /// Builder which can repeatedly build a relay client. -141 relay_client_builder: relay::client::ClientBuilder, -142 /// Whether or not this is the home relay server. -143 /// -144 /// The home relay server needs to maintain it's connection to the relay server, even if -145 /// the relay actor is otherwise idle. -146 is_home_relay: bool, -147 /// When this expires the actor has been idle and should shut down. -148 /// -149 /// Unless it is managing the home relay connection. Inactivity is only tracked on the -150 /// last datagram sent to the relay, received datagrams will trigger QUIC ACKs which is -151 /// sufficient to keep active connections open. -152 inactive_timeout: Pin<Box<time::Sleep>>, -153 /// Token indicating the [`ActiveRelayActor`] should stop. -154 stop_token: CancellationToken, -155 metrics: Arc<MagicsockMetrics>, -156} -157 -158#[derive(Debug)] -159enum ActiveRelayMessage { -160 /// Triggers a connection check to the relay server. -161 /// -162 /// Sometimes it is known the local network interfaces have changed in which case it -163 /// might be prudent to check if the relay connection is still working. `Vec<IpAddr>` -164 /// should contain the current local IP addresses. If the connection uses a local -165 /// socket with an IP address in this list the relay server will be pinged. If the -166 /// connection uses a local socket with an IP address not in this list the server will -167 /// always re-connect. -168 CheckConnection(Vec<IpAddr>), -169 /// Sets this relay as the home relay, or not. -170 SetHomeRelay(bool), -171 #[cfg(test)] -172 GetLocalAddr(oneshot::Sender<Option<SocketAddr>>), -173 #[cfg(test)] -174 PingServer(oneshot::Sender<()>), -175} -176 -177/// Messages for the [`ActiveRelayActor`] which should never block. -178/// -179/// Most messages in the [`ActiveRelayMessage`] enum trigger sending to the relay server, -180/// which can be blocking. So the actor may not always be processing that inbox. Messages -181/// here are processed immediately. -182#[derive(Debug)] -183enum ActiveRelayPrioMessage { -184 /// Returns whether or not this relay can reach the NodeId. -185 HasNodeRoute(NodeId, oneshot::Sender<bool>), -186} -187 -188/// Configuration needed to start an [`ActiveRelayActor`]. -189#[derive(Debug)] -190struct ActiveRelayActorOptions { -191 url: RelayUrl, -192 prio_inbox_: mpsc::Receiver<ActiveRelayPrioMessage>, -193 inbox: mpsc::Receiver<ActiveRelayMessage>, -194 relay_datagrams_send: mpsc::Receiver<RelaySendItem>, -195 relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>, -196 connection_opts: RelayConnectionOptions, -197 stop_token: CancellationToken, -198 metrics: Arc<MagicsockMetrics>, -199} -200 -201/// Configuration needed to create a connection to a relay server. -202#[derive(Debug, Clone)] -203struct RelayConnectionOptions { -204 secret_key: SecretKey, -205 #[cfg(not(wasm_browser))] -206 dns_resolver: DnsResolver, -207 proxy_url: Option<Url>, -208 prefer_ipv6: Arc<AtomicBool>, -209 #[cfg(any(test, feature = "test-utils"))] -210 insecure_skip_cert_verify: bool, -211} -212 -213/// Possible reasons for a failed relay connection. -214#[allow(missing_docs)] -215#[common_fields({ -216 backtrace: Option<snafu::Backtrace>, -217 #[snafu(implicit)] -218 span_trace: n0_snafu::SpanTrace, -219})] -220#[derive(Debug, Snafu)] -221enum RelayConnectionError { -222 #[snafu(display("Failed to connect to relay server"))] -223 Dial { source: DialError }, -224 #[snafu(display("Failed to handshake with relay server"))] -225 Handshake { source: RunError }, -226 #[snafu(display("Lost connection to relay server"))] -227 Established { source: RunError }, -228} -229 -230#[allow(missing_docs)] -231#[common_fields({ -232 backtrace: Option<snafu::Backtrace>, -233 #[snafu(implicit)] -234 span_trace: n0_snafu::SpanTrace, -235})] -236#[derive(Debug, Snafu)] -237enum RunError { -238 #[snafu(display("Send timeout"))] -239 SendTimeout {}, -240 #[snafu(display("Ping timeout"))] -241 PingTimeout {}, -242 #[snafu(display("Local IP no longer valid"))] -243 LocalIpInvalid {}, -244 #[snafu(display("No local address"))] -245 LocalAddrMissing {}, -246 #[snafu(display("Stream closed by server."))] -247 StreamClosedServer {}, -248 #[snafu(display("Client stream read failed"))] -249 ClientStreamRead { source: RecvError }, -250 #[snafu(display("Client stream write failed"))] -251 ClientStreamWrite { source: SendError }, -252} -253 -254#[allow(missing_docs)] -255#[common_fields({ -256 backtrace: Option<snafu::Backtrace>, -257 #[snafu(implicit)] -258 span_trace: n0_snafu::SpanTrace, -259})] -260#[derive(Debug, Snafu)] -261enum DialError { -262 #[snafu(display("timeout trying to establish a connection"))] -263 Timeout {}, -264 #[snafu(display("unable to connect"))] -265 Connect { -266 #[snafu(source(from(ConnectError, Box::new)))] -267 source: Box<ConnectError>, -268 }, -269} -270 -271impl ActiveRelayActor { -272 fn new(opts: ActiveRelayActorOptions) -> Self { -273 let ActiveRelayActorOptions { -274 url, -275 prio_inbox_: prio_inbox, -276 inbox, -277 relay_datagrams_send, -278 relay_datagrams_recv, -279 connection_opts, -280 stop_token, -281 metrics, -282 } = opts; -283 let relay_client_builder = Self::create_relay_builder(url.clone(), connection_opts); -284 ActiveRelayActor { -285 prio_inbox, -286 inbox, -287 relay_datagrams_recv, -288 relay_datagrams_send, -289 url, -290 relay_client_builder, -291 is_home_relay: false, -292 inactive_timeout: Box::pin(time::sleep(RELAY_INACTIVE_CLEANUP_TIME)), -293 stop_token, -294 metrics, -295 } -296 } -297 -298 fn create_relay_builder( -299 url: RelayUrl, -300 opts: RelayConnectionOptions, -301 ) -> relay::client::ClientBuilder { -302 let RelayConnectionOptions { -303 secret_key, -304 #[cfg(not(wasm_browser))] -305 dns_resolver, -306 proxy_url, -307 prefer_ipv6, -308 #[cfg(any(test, feature = "test-utils"))] -309 insecure_skip_cert_verify, -310 } = opts; -311 -312 let mut builder = relay::client::ClientBuilder::new( -313 url, -314 secret_key, -315 #[cfg(not(wasm_browser))] -316 dns_resolver, -317 ) -318 .address_family_selector(move || prefer_ipv6.load(Ordering::Relaxed)); -319 if let Some(proxy_url) = proxy_url { -320 builder = builder.proxy_url(proxy_url); -321 } -322 #[cfg(any(test, feature = "test-utils"))] -323 let builder = builder.insecure_skip_cert_verify(insecure_skip_cert_verify); -324 builder -325 } -326 -327 /// The main actor run loop. -328 /// -329 /// Primarily switches between the dialing and connected states. -330 async fn run(mut self) { -331 // TODO(frando): decide what this metric means, it's either wrong here or in node_state.rs. -332 // From the existing description, it is wrong here. -333 // self.metrics.num_relay_conns_added.inc(); +117/// This will continuously dial the server until connected, using exponential backoff if +118/// it can not connect. See [`ActiveRelayActor::run_dialing`]. +119/// +120/// - Connected to the relay server. +121/// +122/// This state allows receiving from the relay server, though sending is idle in this +123/// state. See [`ActiveRelayActor::run_connected`]. +124/// +125/// - Sending to the relay server. +126/// +127/// This is a sub-state of `connected` so the actor can still be receiving from the relay +128/// server at this time. However it is actively sending data to the server so can not +129/// consume any further items from inboxes which will result in sending more data to the +130/// server until the actor goes back to the `connected` state. +131/// +132/// All these are driven from the top-level [`ActiveRelayActor::run`] loop. +133#[derive(Debug)] +134struct ActiveRelayActor { +135 // The inboxes and channels this actor communicates over. +136 /// Inbox for messages which should be handled without any blocking. +137 prio_inbox: mpsc::Receiver<ActiveRelayPrioMessage>, +138 /// Inbox for messages which involve sending to the relay server. +139 inbox: mpsc::Receiver<ActiveRelayMessage>, +140 /// Queue for received relay datagrams. +141 relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>, +142 /// Channel on which we queue packets to send to the relay. +143 relay_datagrams_send: mpsc::Receiver<RelaySendItem>, +144 +145 // Other actor state. +146 /// The relay server for this actor. +147 url: RelayUrl, +148 /// Builder which can repeatedly build a relay client. +149 relay_client_builder: relay::client::ClientBuilder, +150 /// Whether or not this is the home relay server. +151 /// +152 /// The home relay server needs to maintain it's connection to the relay server, even if +153 /// the relay actor is otherwise idle. +154 is_home_relay: bool, +155 /// When this expires the actor has been idle and should shut down. +156 /// +157 /// Unless it is managing the home relay connection. Inactivity is only tracked on the +158 /// last datagram sent to the relay, received datagrams will trigger QUIC ACKs which is +159 /// sufficient to keep active connections open. +160 inactive_timeout: Pin<Box<time::Sleep>>, +161 /// Token indicating the [`ActiveRelayActor`] should stop. +162 stop_token: CancellationToken, +163 metrics: Arc<MagicsockMetrics>, +164} +165 +166#[derive(Debug)] +167enum ActiveRelayMessage { +168 /// Triggers a connection check to the relay server. +169 /// +170 /// Sometimes it is known the local network interfaces have changed in which case it +171 /// might be prudent to check if the relay connection is still working. `Vec<IpAddr>` +172 /// should contain the current local IP addresses. If the connection uses a local +173 /// socket with an IP address in this list the relay server will be pinged. If the +174 /// connection uses a local socket with an IP address not in this list the server will +175 /// always re-connect. +176 CheckConnection(Vec<IpAddr>), +177 /// Sets this relay as the home relay, or not. +178 SetHomeRelay(bool), +179 #[cfg(test)] +180 GetLocalAddr(oneshot::Sender<Option<SocketAddr>>), +181 #[cfg(test)] +182 PingServer(oneshot::Sender<()>), +183} +184 +185/// Messages for the [`ActiveRelayActor`] which should never block. +186/// +187/// Most messages in the [`ActiveRelayMessage`] enum trigger sending to the relay server, +188/// which can be blocking. So the actor may not always be processing that inbox. Messages +189/// here are processed immediately. +190#[derive(Debug)] +191enum ActiveRelayPrioMessage { +192 /// Returns whether or not this relay can reach the NodeId. +193 HasNodeRoute(NodeId, oneshot::Sender<bool>), +194} +195 +196/// Configuration needed to start an [`ActiveRelayActor`]. +197#[derive(Debug)] +198struct ActiveRelayActorOptions { +199 url: RelayUrl, +200 prio_inbox_: mpsc::Receiver<ActiveRelayPrioMessage>, +201 inbox: mpsc::Receiver<ActiveRelayMessage>, +202 relay_datagrams_send: mpsc::Receiver<RelaySendItem>, +203 relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>, +204 connection_opts: RelayConnectionOptions, +205 stop_token: CancellationToken, +206 metrics: Arc<MagicsockMetrics>, +207} +208 +209/// Configuration needed to create a connection to a relay server. +210#[derive(Debug, Clone)] +211struct RelayConnectionOptions { +212 secret_key: SecretKey, +213 #[cfg(not(wasm_browser))] +214 dns_resolver: DnsResolver, +215 proxy_url: Option<Url>, +216 prefer_ipv6: Arc<AtomicBool>, +217 #[cfg(any(test, feature = "test-utils"))] +218 insecure_skip_cert_verify: bool, +219} +220 +221/// Possible reasons for a failed relay connection. +222#[allow(missing_docs)] +223#[common_fields({ +224 backtrace: Option<snafu::Backtrace>, +225 #[snafu(implicit)] +226 span_trace: n0_snafu::SpanTrace, +227})] +228#[derive(Debug, Snafu)] +229enum RelayConnectionError { +230 #[snafu(display("Failed to connect to relay server"))] +231 Dial { source: DialError }, +232 #[snafu(display("Failed to handshake with relay server"))] +233 Handshake { source: RunError }, +234 #[snafu(display("Lost connection to relay server"))] +235 Established { source: RunError }, +236} +237 +238#[allow(missing_docs)] +239#[common_fields({ +240 backtrace: Option<snafu::Backtrace>, +241 #[snafu(implicit)] +242 span_trace: n0_snafu::SpanTrace, +243})] +244#[derive(Debug, Snafu)] +245enum RunError { +246 #[snafu(display("Send timeout"))] +247 SendTimeout {}, +248 #[snafu(display("Ping timeout"))] +249 PingTimeout {}, +250 #[snafu(display("Local IP no longer valid"))] +251 LocalIpInvalid {}, +252 #[snafu(display("No local address"))] +253 LocalAddrMissing {}, +254 #[snafu(display("Stream closed by server."))] +255 StreamClosedServer {}, +256 #[snafu(display("Client stream read failed"))] +257 ClientStreamRead { source: RecvError }, +258 #[snafu(display("Client stream write failed"))] +259 ClientStreamWrite { source: SendError }, +260} +261 +262#[allow(missing_docs)] +263#[common_fields({ +264 backtrace: Option<snafu::Backtrace>, +265 #[snafu(implicit)] +266 span_trace: n0_snafu::SpanTrace, +267})] +268#[derive(Debug, Snafu)] +269enum DialError { +270 #[snafu(display("timeout trying to establish a connection"))] +271 Timeout {}, +272 #[snafu(display("unable to connect"))] +273 Connect { +274 #[snafu(source(from(ConnectError, Box::new)))] +275 source: Box<ConnectError>, +276 }, +277} +278 +279impl ActiveRelayActor { +280 fn new(opts: ActiveRelayActorOptions) -> Self { +281 let ActiveRelayActorOptions { +282 url, +283 prio_inbox_: prio_inbox, +284 inbox, +285 relay_datagrams_send, +286 relay_datagrams_recv, +287 connection_opts, +288 stop_token, +289 metrics, +290 } = opts; +291 let relay_client_builder = Self::create_relay_builder(url.clone(), connection_opts); +292 ActiveRelayActor { +293 prio_inbox, +294 inbox, +295 relay_datagrams_recv, +296 relay_datagrams_send, +297 url, +298 relay_client_builder, +299 is_home_relay: false, +300 inactive_timeout: Box::pin(time::sleep(RELAY_INACTIVE_CLEANUP_TIME)), +301 stop_token, +302 metrics, +303 } +304 } +305 +306 fn create_relay_builder( +307 url: RelayUrl, +308 opts: RelayConnectionOptions, +309 ) -> relay::client::ClientBuilder { +310 let RelayConnectionOptions { +311 secret_key, +312 #[cfg(not(wasm_browser))] +313 dns_resolver, +314 proxy_url, +315 prefer_ipv6, +316 #[cfg(any(test, feature = "test-utils"))] +317 insecure_skip_cert_verify, +318 } = opts; +319 +320 let mut builder = relay::client::ClientBuilder::new( +321 url, +322 secret_key, +323 #[cfg(not(wasm_browser))] +324 dns_resolver, +325 ) +326 .address_family_selector(move || prefer_ipv6.load(Ordering::Relaxed)); +327 if let Some(proxy_url) = proxy_url { +328 builder = builder.proxy_url(proxy_url); +329 } +330 #[cfg(any(test, feature = "test-utils"))] +331 let builder = builder.insecure_skip_cert_verify(insecure_skip_cert_verify); +332 builder +333 } 334 -335 let mut backoff = Self::build_backoff(); -336 -337 while let Err(err) = self.run_once().await { -338 warn!("{err}"); -339 match err { -340 RelayConnectionError::Dial { .. } | RelayConnectionError::Handshake { .. } => { -341 // If dialing failed, or if the relay connection failed before we received a pong, -342 // we wait an exponentially increasing time until we attempt to reconnect again. -343 let Some(delay) = backoff.next() else { -344 warn!("retries exceeded"); -345 break; -346 }; -347 debug!("retry in {delay:?}"); -348 time::sleep(delay).await; -349 } -350 RelayConnectionError::Established { .. } => { -351 // If the relay connection remained established long enough so that we received a pong -352 // from the relay server, we reset the backoff and attempt to reconnect immediately. -353 backoff = Self::build_backoff(); -354 } -355 } -356 } -357 debug!("exiting"); -358 // TODO(frando): decide what this metric means, it's either wrong here or in node_state.rs. -359 // From the existing description, it is wrong here. -360 // self.metrics.num_relay_conns_removed.inc(); -361 } -362 -363 fn build_backoff() -> impl Backoff { -364 ExponentialBuilder::new() -365 .with_min_delay(Duration::from_millis(10)) -366 .with_max_delay(Duration::from_secs(16)) -367 .with_jitter() -368 .without_max_times() -369 .build() -370 } -371 -372 /// Attempt to connect to the relay, and run the connected actor loop. -373 /// -374 /// Returns `Ok(())` if the actor loop should shut down. Returns an error if dialing failed, -375 /// or if the relay connection failed while connected. In both cases, the connection should -376 /// be retried with a backoff. -377 async fn run_once(&mut self) -> Result<(), RelayConnectionError> { -378 let client = match self.run_dialing().instrument(info_span!("dialing")).await { -379 Some(client_res) => client_res.context(DialSnafu)?, -380 None => return Ok(()), -381 }; -382 self.run_connected(client) -383 .instrument(info_span!("connected")) -384 .await -385 } -386 -387 fn reset_inactive_timeout(&mut self) { -388 self.inactive_timeout -389 .as_mut() -390 .reset(Instant::now() + RELAY_INACTIVE_CLEANUP_TIME); -391 } -392 -393 fn set_home_relay(&mut self, is_home: bool) { -394 let prev = std::mem::replace(&mut self.is_home_relay, is_home); -395 if self.is_home_relay != prev { -396 event!( -397 target: "iroh::_events::relay::home_changed", -398 Level::DEBUG, -399 url = %self.url, -400 home_relay = self.is_home_relay, -401 ); -402 } -403 } -404 -405 /// Actor loop when connecting to the relay server. -406 /// -407 /// Returns `None` if the actor needs to shut down. Returns `Some(Ok(client))` when the -408 /// connection is established, and `Some(Err(err))` if dialing the relay failed. -409 async fn run_dialing(&mut self) -> Option<Result<iroh_relay::client::Client, DialError>> { -410 debug!("Actor loop: connecting to relay."); -411 -412 // We regularly flush the relay_datagrams_send queue so it is not full of stale -413 // packets while reconnecting. Those datagrams are dropped and the QUIC congestion -414 // controller will have to handle this (DISCO packets do not yet have retry). This -415 // is not an ideal mechanism, an alternative approach would be to use -416 // e.g. ConcurrentQueue with force_push, though now you might still send very stale -417 // packets when eventually connected. So perhaps this is a reasonable compromise. -418 let mut send_datagram_flush = time::interval(UNDELIVERABLE_DATAGRAM_TIMEOUT); -419 send_datagram_flush.set_missed_tick_behavior(MissedTickBehavior::Delay); -420 send_datagram_flush.reset(); // Skip the immediate interval -421 -422 let dialing_fut = self.dial_relay(); -423 tokio::pin!(dialing_fut); -424 loop { -425 tokio::select! { -426 biased; -427 _ = self.stop_token.cancelled() => { -428 debug!("Shutdown."); -429 break None; -430 } -431 msg = self.prio_inbox.recv() => { -432 let Some(msg) = msg else { -433 warn!("Priority inbox closed, shutdown."); -434 break None; -435 }; -436 match msg { -437 ActiveRelayPrioMessage::HasNodeRoute(_peer, sender) => { -438 sender.send(false).ok(); -439 } -440 } -441 } -442 res = &mut dialing_fut => { -443 match res { -444 Ok(client) => { -445 break Some(Ok(client)); -446 } -447 Err(err) => { -448 break Some(Err(err)); -449 } -450 } -451 } -452 msg = self.inbox.recv() => { -453 let Some(msg) = msg else { -454 debug!("Inbox closed, shutdown."); -455 break None; -456 }; -457 match msg { -458 ActiveRelayMessage::SetHomeRelay(is_home) => { -459 self.set_home_relay(is_home); -460 } -461 ActiveRelayMessage::CheckConnection(_local_ips) => {} -462 #[cfg(test)] -463 ActiveRelayMessage::GetLocalAddr(sender) => { -464 sender.send(None).ok(); -465 } -466 #[cfg(test)] -467 ActiveRelayMessage::PingServer(sender) => { -468 drop(sender); -469 } -470 } -471 } -472 _ = send_datagram_flush.tick() => { -473 self.reset_inactive_timeout(); -474 let mut logged = false; -475 while self.relay_datagrams_send.try_recv().is_ok() { -476 if !logged { -477 debug!(?UNDELIVERABLE_DATAGRAM_TIMEOUT, "Dropping datagrams to send."); -478 logged = true; -479 } -480 } -481 } -482 _ = &mut self.inactive_timeout, if !self.is_home_relay => { -483 debug!(?RELAY_INACTIVE_CLEANUP_TIME, "Inactive, exiting."); -484 break None; -485 } -486 } -487 } -488 } -489 -490 /// Returns a future which will complete once connected to the relay server. -491 /// -492 /// The future only completes once the connection is established and retries -493 /// connections. It currently does not ever return `Err` as the retries continue -494 /// forever. -495 // This is using `impl Future` to return a future without a reference to self. -496 fn dial_relay(&self) -> impl Future<Output = Result<Client, DialError>> { -497 let client_builder = self.relay_client_builder.clone(); -498 async move { -499 match time::timeout(CONNECT_TIMEOUT, client_builder.connect()).await { -500 Ok(Ok(client)) => Ok(client), -501 Ok(Err(err)) => Err(ConnectSnafu.into_error(err)), -502 Err(_) => Err(TimeoutSnafu.build()), -503 } -504 } -505 } -506 -507 /// Runs the actor loop when connected to a relay server. -508 /// -509 /// Returns `Ok` if the actor needs to shut down. `Err` is returned if the connection -510 /// to the relay server is lost. -511 async fn run_connected( -512 &mut self, -513 client: iroh_relay::client::Client, -514 ) -> Result<(), RelayConnectionError> { -515 debug!("Actor loop: connected to relay"); -516 event!( -517 target: "iroh::_events::relay::connected", -518 Level::DEBUG, -519 url = %self.url, -520 home_relay = self.is_home_relay, -521 ); -522 -523 let (mut client_stream, client_sink) = client.split(); -524 let mut client_sink = client_sink.sink_map_err(|e| ClientStreamWriteSnafu.into_error(e)); -525 -526 let mut state = ConnectedRelayState { -527 ping_tracker: PingTracker::default(), -528 nodes_present: BTreeSet::new(), -529 last_packet_src: None, -530 pong_pending: None, -531 established: false, -532 #[cfg(test)] -533 test_pong: None, -534 }; -535 -536 // A buffer to pass through multiple datagrams at once as an optimisation. -537 let mut send_datagrams_buf = Vec::with_capacity(SEND_DATAGRAM_BATCH_SIZE); -538 -539 // Regularly send pings so we know the connection is healthy. -540 // The first ping will be sent immediately. -541 let mut ping_interval = time::interval(PING_INTERVAL); -542 ping_interval.set_missed_tick_behavior(MissedTickBehavior::Delay); +335 /// The main actor run loop. +336 /// +337 /// Primarily switches between the dialing and connected states. +338 async fn run(mut self) { +339 // TODO(frando): decide what this metric means, it's either wrong here or in node_state.rs. +340 // From the existing description, it is wrong here. +341 // self.metrics.num_relay_conns_added.inc(); +342 +343 let mut backoff = Self::build_backoff(); +344 +345 while let Err(err) = self.run_once().await { +346 warn!("{err}"); +347 match err { +348 RelayConnectionError::Dial { .. } | RelayConnectionError::Handshake { .. } => { +349 // If dialing failed, or if the relay connection failed before we received a pong, +350 // we wait an exponentially increasing time until we attempt to reconnect again. +351 let Some(delay) = backoff.next() else { +352 warn!("retries exceeded"); +353 break; +354 }; +355 debug!("retry in {delay:?}"); +356 time::sleep(delay).await; +357 } +358 RelayConnectionError::Established { .. } => { +359 // If the relay connection remained established long enough so that we received a pong +360 // from the relay server, we reset the backoff and attempt to reconnect immediately. +361 backoff = Self::build_backoff(); +362 } +363 } +364 } +365 debug!("exiting"); +366 // TODO(frando): decide what this metric means, it's either wrong here or in node_state.rs. +367 // From the existing description, it is wrong here. +368 // self.metrics.num_relay_conns_removed.inc(); +369 } +370 +371 fn build_backoff() -> impl Backoff { +372 ExponentialBuilder::new() +373 .with_min_delay(Duration::from_millis(10)) +374 .with_max_delay(Duration::from_secs(16)) +375 .with_jitter() +376 .without_max_times() +377 .build() +378 } +379 +380 /// Attempt to connect to the relay, and run the connected actor loop. +381 /// +382 /// Returns `Ok(())` if the actor loop should shut down. Returns an error if dialing failed, +383 /// or if the relay connection failed while connected. In both cases, the connection should +384 /// be retried with a backoff. +385 async fn run_once(&mut self) -> Result<(), RelayConnectionError> { +386 let client = match self.run_dialing().instrument(info_span!("dialing")).await { +387 Some(client_res) => client_res.context(DialSnafu)?, +388 None => return Ok(()), +389 }; +390 self.run_connected(client) +391 .instrument(info_span!("connected")) +392 .await +393 } +394 +395 fn reset_inactive_timeout(&mut self) { +396 self.inactive_timeout +397 .as_mut() +398 .reset(Instant::now() + RELAY_INACTIVE_CLEANUP_TIME); +399 } +400 +401 fn set_home_relay(&mut self, is_home: bool) { +402 let prev = std::mem::replace(&mut self.is_home_relay, is_home); +403 if self.is_home_relay != prev { +404 event!( +405 target: "iroh::_events::relay::home_changed", +406 Level::DEBUG, +407 url = %self.url, +408 home_relay = self.is_home_relay, +409 ); +410 } +411 } +412 +413 /// Actor loop when connecting to the relay server. +414 /// +415 /// Returns `None` if the actor needs to shut down. Returns `Some(Ok(client))` when the +416 /// connection is established, and `Some(Err(err))` if dialing the relay failed. +417 async fn run_dialing(&mut self) -> Option<Result<iroh_relay::client::Client, DialError>> { +418 debug!("Actor loop: connecting to relay."); +419 +420 // We regularly flush the relay_datagrams_send queue so it is not full of stale +421 // packets while reconnecting. Those datagrams are dropped and the QUIC congestion +422 // controller will have to handle this (DISCO packets do not yet have retry). This +423 // is not an ideal mechanism, an alternative approach would be to use +424 // e.g. ConcurrentQueue with force_push, though now you might still send very stale +425 // packets when eventually connected. So perhaps this is a reasonable compromise. +426 let mut send_datagram_flush = time::interval(UNDELIVERABLE_DATAGRAM_TIMEOUT); +427 send_datagram_flush.set_missed_tick_behavior(MissedTickBehavior::Delay); +428 send_datagram_flush.reset(); // Skip the immediate interval +429 +430 let dialing_fut = self.dial_relay(); +431 tokio::pin!(dialing_fut); +432 loop { +433 tokio::select! { +434 biased; +435 _ = self.stop_token.cancelled() => { +436 debug!("Shutdown."); +437 break None; +438 } +439 msg = self.prio_inbox.recv() => { +440 let Some(msg) = msg else { +441 warn!("Priority inbox closed, shutdown."); +442 break None; +443 }; +444 match msg { +445 ActiveRelayPrioMessage::HasNodeRoute(_peer, sender) => { +446 sender.send(false).ok(); +447 } +448 } +449 } +450 res = &mut dialing_fut => { +451 match res { +452 Ok(client) => { +453 break Some(Ok(client)); +454 } +455 Err(err) => { +456 break Some(Err(err)); +457 } +458 } +459 } +460 msg = self.inbox.recv() => { +461 let Some(msg) = msg else { +462 debug!("Inbox closed, shutdown."); +463 break None; +464 }; +465 match msg { +466 ActiveRelayMessage::SetHomeRelay(is_home) => { +467 self.set_home_relay(is_home); +468 } +469 ActiveRelayMessage::CheckConnection(_local_ips) => {} +470 #[cfg(test)] +471 ActiveRelayMessage::GetLocalAddr(sender) => { +472 sender.send(None).ok(); +473 } +474 #[cfg(test)] +475 ActiveRelayMessage::PingServer(sender) => { +476 drop(sender); +477 } +478 } +479 } +480 _ = send_datagram_flush.tick() => { +481 self.reset_inactive_timeout(); +482 let mut logged = false; +483 while self.relay_datagrams_send.try_recv().is_ok() { +484 if !logged { +485 debug!(?UNDELIVERABLE_DATAGRAM_TIMEOUT, "Dropping datagrams to send."); +486 logged = true; +487 } +488 } +489 } +490 _ = &mut self.inactive_timeout, if !self.is_home_relay => { +491 debug!(?RELAY_INACTIVE_CLEANUP_TIME, "Inactive, exiting."); +492 break None; +493 } +494 } +495 } +496 } +497 +498 /// Returns a future which will complete once connected to the relay server. +499 /// +500 /// The future only completes once the connection is established and retries +501 /// connections. It currently does not ever return `Err` as the retries continue +502 /// forever. +503 // This is using `impl Future` to return a future without a reference to self. +504 fn dial_relay(&self) -> impl Future<Output = Result<Client, DialError>> { +505 let client_builder = self.relay_client_builder.clone(); +506 async move { +507 match time::timeout(CONNECT_TIMEOUT, client_builder.connect()).await { +508 Ok(Ok(client)) => Ok(client), +509 Ok(Err(err)) => Err(ConnectSnafu.into_error(err)), +510 Err(_) => Err(TimeoutSnafu.build()), +511 } +512 } +513 } +514 +515 /// Runs the actor loop when connected to a relay server. +516 /// +517 /// Returns `Ok` if the actor needs to shut down. `Err` is returned if the connection +518 /// to the relay server is lost. +519 async fn run_connected( +520 &mut self, +521 client: iroh_relay::client::Client, +522 ) -> Result<(), RelayConnectionError> { +523 debug!("Actor loop: connected to relay"); +524 event!( +525 target: "iroh::_events::relay::connected", +526 Level::DEBUG, +527 url = %self.url, +528 home_relay = self.is_home_relay, +529 ); +530 +531 let (mut client_stream, client_sink) = client.split(); +532 let mut client_sink = client_sink.sink_map_err(|e| ClientStreamWriteSnafu.into_error(e)); +533 +534 let mut state = ConnectedRelayState { +535 ping_tracker: PingTracker::default(), +536 nodes_present: BTreeSet::new(), +537 last_packet_src: None, +538 pong_pending: None, +539 established: false, +540 #[cfg(test)] +541 test_pong: None, +542 }; 543 -544 let res = loop { -545 if let Some(data) = state.pong_pending.take() { -546 let fut = client_sink.send(ClientToRelayMsg::Pong(data)); -547 self.run_sending(fut, &mut state, &mut client_stream) -548 .await?; -549 } -550 tokio::select! { -551 biased; -552 _ = self.stop_token.cancelled() => { -553 debug!("Shutdown."); -554 break Ok(()); -555 } -556 msg = self.prio_inbox.recv() => { -557 let Some(msg) = msg else { -558 warn!("Priority inbox closed, shutdown."); -559 break Ok(()); -560 }; -561 match msg { -562 ActiveRelayPrioMessage::HasNodeRoute(peer, sender) => { -563 let has_peer = state.nodes_present.contains(&peer); -564 sender.send(has_peer).ok(); -565 } -566 } -567 } -568 _ = state.ping_tracker.timeout() => { -569 break Err(PingTimeoutSnafu.build()); -570 } -571 _ = ping_interval.tick() => { -572 let data = state.ping_tracker.new_ping(); -573 let fut = client_sink.send(ClientToRelayMsg::Ping(data)); -574 self.run_sending(fut, &mut state, &mut client_stream).await?; +544 // A buffer to pass through multiple datagrams at once as an optimisation. +545 let mut send_datagrams_buf = Vec::with_capacity(SEND_DATAGRAM_BATCH_SIZE); +546 +547 // Regularly send pings so we know the connection is healthy. +548 // The first ping will be sent immediately. +549 let mut ping_interval = time::interval(PING_INTERVAL); +550 ping_interval.set_missed_tick_behavior(MissedTickBehavior::Delay); +551 +552 let res = loop { +553 if let Some(data) = state.pong_pending.take() { +554 let fut = client_sink.send(ClientToRelayMsg::Pong(data)); +555 self.run_sending(fut, &mut state, &mut client_stream) +556 .await?; +557 } +558 tokio::select! { +559 biased; +560 _ = self.stop_token.cancelled() => { +561 debug!("Shutdown."); +562 break Ok(()); +563 } +564 msg = self.prio_inbox.recv() => { +565 let Some(msg) = msg else { +566 warn!("Priority inbox closed, shutdown."); +567 break Ok(()); +568 }; +569 match msg { +570 ActiveRelayPrioMessage::HasNodeRoute(peer, sender) => { +571 let has_peer = state.nodes_present.contains(&peer); +572 sender.send(has_peer).ok(); +573 } +574 } 575 } -576 msg = self.inbox.recv() => { -577 let Some(msg) = msg else { -578 warn!("Inbox closed, shutdown."); -579 break Ok(()); -580 }; -581 match msg { -582 ActiveRelayMessage::SetHomeRelay(is_home) => { -583 self.set_home_relay(is_home); -584 } -585 ActiveRelayMessage::CheckConnection(local_ips) => { -586 match client_stream.local_addr() { -587 Some(addr) if local_ips.contains(&addr.ip()) => { -588 let data = state.ping_tracker.new_ping(); -589 let fut = client_sink.send(ClientToRelayMsg::Ping(data)); -590 self.run_sending(fut, &mut state, &mut client_stream).await?; -591 } -592 Some(_) => break Err(LocalIpInvalidSnafu.build()), -593 None => break Err(LocalAddrMissingSnafu.build()), -594 } -595 } -596 #[cfg(test)] -597 ActiveRelayMessage::GetLocalAddr(sender) => { -598 let addr = client_stream.local_addr(); -599 sender.send(addr).ok(); -600 } -601 #[cfg(test)] -602 ActiveRelayMessage::PingServer(sender) => { -603 let data = rand::random(); -604 state.test_pong = Some((data, sender)); -605 let fut = client_sink.send(ClientToRelayMsg::Ping(data)); -606 self.run_sending(fut, &mut state, &mut client_stream).await?; -607 } -608 } -609 } -610 count = self.relay_datagrams_send.recv_many( -611 &mut send_datagrams_buf, -612 SEND_DATAGRAM_BATCH_SIZE, -613 ) => { -614 if count == 0 { -615 warn!("Datagram inbox closed, shutdown"); -616 break Ok(()); -617 }; -618 self.reset_inactive_timeout(); -619 // TODO: This allocation is *very* unfortunate. But so is the -620 // allocation *inside* of PacketizeIter... -621 let batch = std::mem::replace( -622 &mut send_datagrams_buf, -623 Vec::with_capacity(SEND_DATAGRAM_BATCH_SIZE), -624 ); -625 // TODO(frando): can we avoid the clone here? -626 let metrics = self.metrics.clone(); -627 let packet_iter = batch.into_iter().map(|item| { -628 metrics.send_relay.inc_by(item.datagrams.contents.len() as _); -629 Ok(ClientToRelayMsg::Datagrams { -630 dst_node_id: item.remote_node, -631 datagrams: item.datagrams -632 }) -633 }); -634 let mut packet_stream = n0_future::stream::iter(packet_iter); -635 let fut = client_sink.send_all(&mut packet_stream); -636 self.run_sending(fut, &mut state, &mut client_stream).await?; -637 } -638 msg = client_stream.next() => { -639 let Some(msg) = msg else { -640 break Err(StreamClosedServerSnafu.build()); -641 }; -642 match msg { -643 Ok(msg) => { -644 self.handle_relay_msg(msg, &mut state); -645 // reset the ping timer, we have just received a message -646 ping_interval.reset(); -647 }, -648 Err(err) => break Err(ClientStreamReadSnafu.into_error(err)), -649 } -650 } -651 _ = &mut self.inactive_timeout, if !self.is_home_relay => { -652 debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting."); -653 break Ok(()); -654 } -655 } -656 }; -657 -658 if res.is_ok() { -659 if let Err(err) = client_sink.close().await { -660 debug!("Failed to close client sink gracefully: {err:#}"); -661 } -662 } -663 -664 res.map_err(|err| state.map_err(err)) -665 } -666 -667 fn handle_relay_msg(&mut self, msg: RelayToClientMsg, state: &mut ConnectedRelayState) { -668 match msg { -669 RelayToClientMsg::Datagrams { -670 remote_node_id, -671 datagrams, -672 } => { -673 trace!(len = %datagrams.contents.len(), "received msg"); -674 // If this is a new sender, register a route for this peer. -675 if state -676 .last_packet_src -677 .as_ref() -678 .map(|p| *p != remote_node_id) -679 .unwrap_or(true) -680 { -681 // Avoid map lookup with high throughput single peer. -682 state.last_packet_src = Some(remote_node_id); -683 state.nodes_present.insert(remote_node_id); -684 } -685 if let Err(err) = self.relay_datagrams_recv.try_send(RelayRecvDatagram { -686 url: self.url.clone(), -687 src: remote_node_id, -688 datagrams, -689 }) { -690 warn!("Dropping received relay packet: {err:#}"); -691 } -692 } -693 RelayToClientMsg::NodeGone(node_id) => { -694 state.nodes_present.remove(&node_id); -695 } -696 RelayToClientMsg::Ping(data) => state.pong_pending = Some(data), -697 RelayToClientMsg::Pong(data) => { -698 #[cfg(test)] -699 { -700 if let Some((expected_data, sender)) = state.test_pong.take() { -701 if data == expected_data { -702 sender.send(()).ok(); -703 } else { -704 state.test_pong = Some((expected_data, sender)); -705 } +576 _ = state.ping_tracker.timeout() => { +577 break Err(PingTimeoutSnafu.build()); +578 } +579 _ = ping_interval.tick() => { +580 let data = state.ping_tracker.new_ping(); +581 let fut = client_sink.send(ClientToRelayMsg::Ping(data)); +582 self.run_sending(fut, &mut state, &mut client_stream).await?; +583 } +584 msg = self.inbox.recv() => { +585 let Some(msg) = msg else { +586 warn!("Inbox closed, shutdown."); +587 break Ok(()); +588 }; +589 match msg { +590 ActiveRelayMessage::SetHomeRelay(is_home) => { +591 self.set_home_relay(is_home); +592 } +593 ActiveRelayMessage::CheckConnection(local_ips) => { +594 match client_stream.local_addr() { +595 Some(addr) if local_ips.contains(&addr.ip()) => { +596 let data = state.ping_tracker.new_ping(); +597 let fut = client_sink.send(ClientToRelayMsg::Ping(data)); +598 self.run_sending(fut, &mut state, &mut client_stream).await?; +599 } +600 Some(_) => break Err(LocalIpInvalidSnafu.build()), +601 None => break Err(LocalAddrMissingSnafu.build()), +602 } +603 } +604 #[cfg(test)] +605 ActiveRelayMessage::GetLocalAddr(sender) => { +606 let addr = client_stream.local_addr(); +607 sender.send(addr).ok(); +608 } +609 #[cfg(test)] +610 ActiveRelayMessage::PingServer(sender) => { +611 let data = rand::random(); +612 state.test_pong = Some((data, sender)); +613 let fut = client_sink.send(ClientToRelayMsg::Ping(data)); +614 self.run_sending(fut, &mut state, &mut client_stream).await?; +615 } +616 } +617 } +618 count = self.relay_datagrams_send.recv_many( +619 &mut send_datagrams_buf, +620 SEND_DATAGRAM_BATCH_SIZE, +621 ) => { +622 if count == 0 { +623 warn!("Datagram inbox closed, shutdown"); +624 break Ok(()); +625 }; +626 self.reset_inactive_timeout(); +627 // TODO: This allocation is *very* unfortunate. But so is the +628 // allocation *inside* of PacketizeIter... +629 let dgrams = std::mem::replace( +630 &mut send_datagrams_buf, +631 Vec::with_capacity(SEND_DATAGRAM_BATCH_SIZE), +632 ); +633 // TODO(frando): can we avoid the clone here? +634 let metrics = self.metrics.clone(); +635 let packet_iter = dgrams.into_iter().flat_map(|datagrams| { +636 PacketizeIter::<_, MAX_PAYLOAD_SIZE>::new( +637 datagrams.remote_node, +638 datagrams.datagrams.clone(), +639 ) +640 .map(|p| { +641 Ok(ClientToRelayMsg::SendPacket { dst_key: p.node_id, packet: p.payload }) +642 }) +643 }); +644 let mut packet_stream = n0_future::stream::iter(packet_iter).inspect(|m| { +645 if let Ok(ClientToRelayMsg::SendPacket { dst_key: _node_id, packet: payload }) = m { +646 metrics.send_relay.inc_by(payload.len() as _); +647 } +648 }); +649 let fut = client_sink.send_all(&mut packet_stream); +650 self.run_sending(fut, &mut state, &mut client_stream).await?; +651 } +652 msg = client_stream.next() => { +653 let Some(msg) = msg else { +654 break Err(StreamClosedServerSnafu.build()); +655 }; +656 match msg { +657 Ok(msg) => { +658 self.handle_relay_msg(msg, &mut state); +659 // reset the ping timer, we have just received a message +660 ping_interval.reset(); +661 }, +662 Err(err) => break Err(ClientStreamReadSnafu.into_error(err)), +663 } +664 } +665 _ = &mut self.inactive_timeout, if !self.is_home_relay => { +666 debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting."); +667 break Ok(()); +668 } +669 } +670 }; +671 +672 if res.is_ok() { +673 if let Err(err) = client_sink.close().await { +674 debug!("Failed to close client sink gracefully: {err:#}"); +675 } +676 } +677 +678 res.map_err(|err| state.map_err(err)) +679 } +680 +681 fn handle_relay_msg(&mut self, msg: RelayToClientMsg, state: &mut ConnectedRelayState) { +682 match msg { +683 RelayToClientMsg::ReceivedPacket { +684 src_key: remote_node_id, +685 content, +686 } => { +687 trace!(len = %content.len(), "received msg"); +688 // If this is a new sender, register a route for this peer. +689 if state +690 .last_packet_src +691 .as_ref() +692 .map(|p| *p != remote_node_id) +693 .unwrap_or(true) +694 { +695 // Avoid map lookup with high throughput single peer. +696 state.last_packet_src = Some(remote_node_id); +697 state.nodes_present.insert(remote_node_id); +698 } +699 for datagram in PacketSplitIter::new(self.url.clone(), remote_node_id, content) { +700 let Ok(datagram) = datagram else { +701 warn!("Invalid packet split"); +702 break; +703 }; +704 if let Err(err) = self.relay_datagrams_recv.try_send(datagram) { +705 warn!("Dropping received relay packet: {err:#}"); 706 } 707 } -708 state.ping_tracker.pong_received(data); -709 state.established = true; -710 } -711 RelayToClientMsg::Health { problem } => { -712 warn!("Relay server reports problem: {problem}"); -713 } -714 RelayToClientMsg::Restarting { .. } => { -715 trace!("Ignoring {msg:?}") -716 } -717 } -718 } -719 -720 /// Run the actor main loop while sending to the relay server. -721 /// -722 /// While sending the actor should not read any inboxes which will give it more things -723 /// to send to the relay server. -724 /// -725 /// # Returns -726 /// -727 /// On `Err` the relay connection should be disconnected. An `Ok` return means either -728 /// the actor should shut down, consult the [`ActiveRelayActor::stop_token`] and -729 /// [`ActiveRelayActor::inactive_timeout`] for this, or the send was successful. -730 #[instrument(name = "tx", skip_all)] -731 async fn run_sending<T>( -732 &mut self, -733 sending_fut: impl Future<Output = Result<T, RunError>>, -734 state: &mut ConnectedRelayState, -735 client_stream: &mut iroh_relay::client::ClientStream, -736 ) -> Result<(), RelayConnectionError> { -737 // we use the same time as for our ping interval -738 let send_timeout = PING_INTERVAL; -739 -740 let mut timeout = pin!(time::sleep(send_timeout)); -741 let mut sending_fut = pin!(sending_fut); -742 let res = loop { -743 tokio::select! { -744 biased; -745 _ = self.stop_token.cancelled() => { -746 break Ok(()); -747 } -748 _ = &mut timeout => { -749 break Err(SendTimeoutSnafu.build()); -750 } -751 msg = self.prio_inbox.recv() => { -752 let Some(msg) = msg else { -753 warn!("Priority inbox closed, shutdown."); -754 break Ok(()); -755 }; -756 match msg { -757 ActiveRelayPrioMessage::HasNodeRoute(peer, sender) => { -758 let has_peer = state.nodes_present.contains(&peer); -759 sender.send(has_peer).ok(); -760 } -761 } -762 } -763 res = &mut sending_fut => { -764 match res { -765 Ok(_) => break Ok(()), -766 Err(err) => break Err(err), -767 } -768 } -769 _ = state.ping_tracker.timeout() => { -770 break Err(PingTimeoutSnafu.build()); -771 } -772 // No need to read the inbox or datagrams to send. -773 msg = client_stream.next() => { -774 let Some(msg) = msg else { -775 break Err(StreamClosedServerSnafu.build()); -776 }; -777 match msg { -778 Ok(msg) => self.handle_relay_msg(msg, state), -779 Err(err) => break Err(ClientStreamReadSnafu.into_error(err)), -780 } -781 } -782 _ = &mut self.inactive_timeout, if !self.is_home_relay => { -783 debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting."); -784 break Ok(()); -785 } -786 } -787 }; -788 res.map_err(|err| state.map_err(err)) -789 } -790} -791 -792/// Shared state when the [`ActiveRelayActor`] is connected to a relay server. -793/// -794/// Common state between [`ActiveRelayActor::run_connected`] and -795/// [`ActiveRelayActor::run_sending`]. -796#[derive(Debug)] -797struct ConnectedRelayState { -798 /// Tracks pings we have sent, awaits pong replies. -799 ping_tracker: PingTracker, -800 /// Nodes which are reachable via this relay server. -801 nodes_present: BTreeSet<NodeId>, -802 /// The [`NodeId`] from whom we received the last packet. -803 /// -804 /// This is to avoid a slower lookup in the [`ConnectedRelayState::nodes_present`] map -805 /// when we are only communicating to a single remote node. -806 last_packet_src: Option<NodeId>, -807 /// A pong we need to send ASAP. -808 pong_pending: Option<[u8; 8]>, -809 /// Whether the connection is to be considered established. -810 /// -811 /// This is set to `true` once a pong was received from the server. -812 established: bool, -813 #[cfg(test)] -814 test_pong: Option<([u8; 8], oneshot::Sender<()>)>, -815} -816 -817impl ConnectedRelayState { -818 fn map_err(&self, error: RunError) -> RelayConnectionError { -819 if self.established { -820 EstablishedSnafu.into_error(error) -821 } else { -822 HandshakeSnafu.into_error(error) -823 } -824 } -825} -826 -827pub(super) enum RelayActorMessage { -828 MaybeCloseRelaysOnRebind, -829 NetworkChange { report: Report }, -830} -831 -832#[derive(Debug, Clone)] -833pub(crate) struct RelaySendItem { -834 /// The destination for the datagrams. -835 pub(crate) remote_node: NodeId, -836 /// The home relay of the remote node. -837 pub(crate) url: RelayUrl, -838 /// One or more datagrams to send. -839 pub(crate) datagrams: Datagrams, -840} -841 -842pub(super) struct RelayActor { -843 config: Config, -844 /// Queue on which to put received datagrams. -845 relay_datagram_recv_queue: mpsc::Sender<RelayRecvDatagram>, -846 /// The actors managing each currently used relay server. -847 /// -848 /// These actors will exit when they have any inactivity. Otherwise they will keep -849 /// trying to maintain a connection to the relay server as needed. -850 active_relays: BTreeMap<RelayUrl, ActiveRelayHandle>, -851 /// The tasks for the [`ActiveRelayActor`]s in `active_relays` above. -852 active_relay_tasks: JoinSet<()>, -853 cancel_token: CancellationToken, -854} -855 -856#[derive(Debug)] -857pub struct Config { -858 pub my_relay: Watchable<Option<RelayUrl>>, -859 pub secret_key: SecretKey, -860 #[cfg(not(wasm_browser))] -861 pub dns_resolver: DnsResolver, -862 /// Proxy -863 pub proxy_url: Option<Url>, -864 /// If the last net_report report, reports IPv6 to be available. -865 pub ipv6_reported: Arc<AtomicBool>, -866 #[cfg(any(test, feature = "test-utils"))] -867 pub insecure_skip_relay_cert_verify: bool, -868 pub metrics: Arc<MagicsockMetrics>, -869} -870 -871impl RelayActor { -872 pub(super) fn new( -873 config: Config, -874 relay_datagram_recv_queue: mpsc::Sender<RelayRecvDatagram>, -875 ) -> Self { -876 let cancel_token = CancellationToken::new(); -877 Self { -878 config, -879 relay_datagram_recv_queue, -880 active_relays: Default::default(), -881 active_relay_tasks: JoinSet::new(), -882 cancel_token, -883 } -884 } -885 -886 pub(super) async fn run( -887 mut self, -888 mut receiver: mpsc::Receiver<RelayActorMessage>, -889 mut datagram_send_channel: mpsc::Receiver<RelaySendItem>, -890 ) { -891 // When this future is present, it is sending pending datagrams to an -892 // ActiveRelayActor. We can not process further datagrams during this time. -893 let mut datagram_send_fut = std::pin::pin!(MaybeFuture::none()); -894 -895 loop { -896 tokio::select! { -897 biased; -898 _ = self.cancel_token.cancelled() => { -899 debug!("shutting down"); -900 break; -901 } -902 Some(res) = self.active_relay_tasks.join_next() => { -903 match res { -904 Ok(()) => (), -905 Err(err) if err.is_panic() => { -906 error!("ActiveRelayActor task panicked: {err:#?}"); -907 } -908 Err(err) if err.is_cancelled() => { -909 error!("ActiveRelayActor cancelled: {err:#?}"); -910 } -911 Err(err) => error!("ActiveRelayActor failed: {err:#?}"), -912 } -913 self.reap_active_relays(); -914 } -915 msg = receiver.recv() => { -916 let Some(msg) = msg else { -917 debug!("Inbox dropped, shutting down."); -918 break; -919 }; -920 let cancel_token = self.cancel_token.child_token(); -921 cancel_token.run_until_cancelled(self.handle_msg(msg)).await; -922 } -923 // Only poll for new datagrams if we are not blocked on sending them. -924 item = datagram_send_channel.recv(), if datagram_send_fut.is_none() => { -925 let Some(item) = item else { -926 debug!("Datagram send channel dropped, shutting down."); -927 break; -928 }; -929 let token = self.cancel_token.child_token(); -930 if let Some(Some(fut)) = token.run_until_cancelled( -931 self.try_send_datagram(item) -932 ).await { -933 datagram_send_fut.as_mut().set_future(fut); -934 } -935 } -936 // Only poll this future if it is in use. -937 _ = &mut datagram_send_fut, if datagram_send_fut.is_some() => { -938 datagram_send_fut.as_mut().set_none(); -939 } -940 } -941 } -942 -943 // try shutdown -944 if time::timeout(Duration::from_secs(3), self.close_all_active_relays()) -945 .await -946 .is_err() -947 { -948 warn!("Failed to shut down all ActiveRelayActors"); -949 } -950 } -951 -952 async fn handle_msg(&mut self, msg: RelayActorMessage) { -953 match msg { -954 RelayActorMessage::NetworkChange { report } => { -955 self.on_network_change(report).await; +708 } +709 RelayToClientMsg::NodeGone(node_id) => { +710 state.nodes_present.remove(&node_id); +711 } +712 RelayToClientMsg::Ping(data) => state.pong_pending = Some(data), +713 RelayToClientMsg::Pong(data) => { +714 #[cfg(test)] +715 { +716 if let Some((expected_data, sender)) = state.test_pong.take() { +717 if data == expected_data { +718 sender.send(()).ok(); +719 } else { +720 state.test_pong = Some((expected_data, sender)); +721 } +722 } +723 } +724 state.ping_tracker.pong_received(data); +725 state.established = true; +726 } +727 RelayToClientMsg::Health { problem } => { +728 warn!("Relay server reports problem: {problem}"); +729 } +730 RelayToClientMsg::Restarting { .. } => { +731 trace!("Ignoring {msg:?}") +732 } +733 } +734 } +735 +736 /// Run the actor main loop while sending to the relay server. +737 /// +738 /// While sending the actor should not read any inboxes which will give it more things +739 /// to send to the relay server. +740 /// +741 /// # Returns +742 /// +743 /// On `Err` the relay connection should be disconnected. An `Ok` return means either +744 /// the actor should shut down, consult the [`ActiveRelayActor::stop_token`] and +745 /// [`ActiveRelayActor::inactive_timeout`] for this, or the send was successful. +746 #[instrument(name = "tx", skip_all)] +747 async fn run_sending<T>( +748 &mut self, +749 sending_fut: impl Future<Output = Result<T, RunError>>, +750 state: &mut ConnectedRelayState, +751 client_stream: &mut iroh_relay::client::ClientStream, +752 ) -> Result<(), RelayConnectionError> { +753 // we use the same time as for our ping interval +754 let send_timeout = PING_INTERVAL; +755 +756 let mut timeout = pin!(time::sleep(send_timeout)); +757 let mut sending_fut = pin!(sending_fut); +758 let res = loop { +759 tokio::select! { +760 biased; +761 _ = self.stop_token.cancelled() => { +762 break Ok(()); +763 } +764 _ = &mut timeout => { +765 break Err(SendTimeoutSnafu.build()); +766 } +767 msg = self.prio_inbox.recv() => { +768 let Some(msg) = msg else { +769 warn!("Priority inbox closed, shutdown."); +770 break Ok(()); +771 }; +772 match msg { +773 ActiveRelayPrioMessage::HasNodeRoute(peer, sender) => { +774 let has_peer = state.nodes_present.contains(&peer); +775 sender.send(has_peer).ok(); +776 } +777 } +778 } +779 res = &mut sending_fut => { +780 match res { +781 Ok(_) => break Ok(()), +782 Err(err) => break Err(err), +783 } +784 } +785 _ = state.ping_tracker.timeout() => { +786 break Err(PingTimeoutSnafu.build()); +787 } +788 // No need to read the inbox or datagrams to send. +789 msg = client_stream.next() => { +790 let Some(msg) = msg else { +791 break Err(StreamClosedServerSnafu.build()); +792 }; +793 match msg { +794 Ok(msg) => self.handle_relay_msg(msg, state), +795 Err(err) => break Err(ClientStreamReadSnafu.into_error(err)), +796 } +797 } +798 _ = &mut self.inactive_timeout, if !self.is_home_relay => { +799 debug!("Inactive for {RELAY_INACTIVE_CLEANUP_TIME:?}, exiting."); +800 break Ok(()); +801 } +802 } +803 }; +804 res.map_err(|err| state.map_err(err)) +805 } +806} +807 +808/// Shared state when the [`ActiveRelayActor`] is connected to a relay server. +809/// +810/// Common state between [`ActiveRelayActor::run_connected`] and +811/// [`ActiveRelayActor::run_sending`]. +812#[derive(Debug)] +813struct ConnectedRelayState { +814 /// Tracks pings we have sent, awaits pong replies. +815 ping_tracker: PingTracker, +816 /// Nodes which are reachable via this relay server. +817 nodes_present: BTreeSet<NodeId>, +818 /// The [`NodeId`] from whom we received the last packet. +819 /// +820 /// This is to avoid a slower lookup in the [`ConnectedRelayState::nodes_present`] map +821 /// when we are only communicating to a single remote node. +822 last_packet_src: Option<NodeId>, +823 /// A pong we need to send ASAP. +824 pong_pending: Option<[u8; 8]>, +825 /// Whether the connection is to be considered established. +826 /// +827 /// This is set to `true` once a pong was received from the server. +828 established: bool, +829 #[cfg(test)] +830 test_pong: Option<([u8; 8], oneshot::Sender<()>)>, +831} +832 +833impl ConnectedRelayState { +834 fn map_err(&self, error: RunError) -> RelayConnectionError { +835 if self.established { +836 EstablishedSnafu.into_error(error) +837 } else { +838 HandshakeSnafu.into_error(error) +839 } +840 } +841} +842 +843pub(super) enum RelayActorMessage { +844 MaybeCloseRelaysOnRebind, +845 NetworkChange { report: Report }, +846} +847 +848#[derive(Debug, Clone)] +849pub(crate) struct RelaySendItem { +850 /// The destination for the datagrams. +851 pub(crate) remote_node: NodeId, +852 /// The home relay of the remote node. +853 pub(crate) url: RelayUrl, +854 /// One or more datagrams to send. +855 pub(crate) datagrams: RelayContents, +856} +857 +858pub(super) struct RelayActor { +859 config: Config, +860 /// Queue on which to put received datagrams. +861 relay_datagram_recv_queue: mpsc::Sender<RelayRecvDatagram>, +862 /// The actors managing each currently used relay server. +863 /// +864 /// These actors will exit when they have any inactivity. Otherwise they will keep +865 /// trying to maintain a connection to the relay server as needed. +866 active_relays: BTreeMap<RelayUrl, ActiveRelayHandle>, +867 /// The tasks for the [`ActiveRelayActor`]s in `active_relays` above. +868 active_relay_tasks: JoinSet<()>, +869 cancel_token: CancellationToken, +870} +871 +872#[derive(Debug)] +873pub struct Config { +874 pub my_relay: Watchable<Option<RelayUrl>>, +875 pub secret_key: SecretKey, +876 #[cfg(not(wasm_browser))] +877 pub dns_resolver: DnsResolver, +878 /// Proxy +879 pub proxy_url: Option<Url>, +880 /// If the last net_report report, reports IPv6 to be available. +881 pub ipv6_reported: Arc<AtomicBool>, +882 #[cfg(any(test, feature = "test-utils"))] +883 pub insecure_skip_relay_cert_verify: bool, +884 pub metrics: Arc<MagicsockMetrics>, +885} +886 +887impl RelayActor { +888 pub(super) fn new( +889 config: Config, +890 relay_datagram_recv_queue: mpsc::Sender<RelayRecvDatagram>, +891 ) -> Self { +892 let cancel_token = CancellationToken::new(); +893 Self { +894 config, +895 relay_datagram_recv_queue, +896 active_relays: Default::default(), +897 active_relay_tasks: JoinSet::new(), +898 cancel_token, +899 } +900 } +901 +902 pub(super) async fn run( +903 mut self, +904 mut receiver: mpsc::Receiver<RelayActorMessage>, +905 mut datagram_send_channel: mpsc::Receiver<RelaySendItem>, +906 ) { +907 // When this future is present, it is sending pending datagrams to an +908 // ActiveRelayActor. We can not process further datagrams during this time. +909 let mut datagram_send_fut = std::pin::pin!(MaybeFuture::none()); +910 +911 loop { +912 tokio::select! { +913 biased; +914 _ = self.cancel_token.cancelled() => { +915 debug!("shutting down"); +916 break; +917 } +918 Some(res) = self.active_relay_tasks.join_next() => { +919 match res { +920 Ok(()) => (), +921 Err(err) if err.is_panic() => { +922 error!("ActiveRelayActor task panicked: {err:#?}"); +923 } +924 Err(err) if err.is_cancelled() => { +925 error!("ActiveRelayActor cancelled: {err:#?}"); +926 } +927 Err(err) => error!("ActiveRelayActor failed: {err:#?}"), +928 } +929 self.reap_active_relays(); +930 } +931 msg = receiver.recv() => { +932 let Some(msg) = msg else { +933 debug!("Inbox dropped, shutting down."); +934 break; +935 }; +936 let cancel_token = self.cancel_token.child_token(); +937 cancel_token.run_until_cancelled(self.handle_msg(msg)).await; +938 } +939 // Only poll for new datagrams if we are not blocked on sending them. +940 item = datagram_send_channel.recv(), if datagram_send_fut.is_none() => { +941 let Some(item) = item else { +942 debug!("Datagram send channel dropped, shutting down."); +943 break; +944 }; +945 let token = self.cancel_token.child_token(); +946 if let Some(Some(fut)) = token.run_until_cancelled( +947 self.try_send_datagram(item) +948 ).await { +949 datagram_send_fut.as_mut().set_future(fut); +950 } +951 } +952 // Only poll this future if it is in use. +953 _ = &mut datagram_send_fut, if datagram_send_fut.is_some() => { +954 datagram_send_fut.as_mut().set_none(); +955 } 956 } -957 RelayActorMessage::MaybeCloseRelaysOnRebind => { -958 self.maybe_close_relays_on_rebind().await; -959 } -960 } -961 } -962 -963 /// Sends datagrams to the correct [`ActiveRelayActor`], or returns a future. -964 /// -965 /// If the datagram can not be sent immediately, because the destination channel is -966 /// full, a future is returned that will complete once the datagrams have been sent to -967 /// the [`ActiveRelayActor`]. -968 async fn try_send_datagram(&mut self, item: RelaySendItem) -> Option<impl Future<Output = ()>> { -969 let url = item.url.clone(); -970 let handle = self -971 .active_relay_handle_for_node(&item.url, &item.remote_node) -972 .await; -973 match handle.datagrams_send_queue.try_send(item) { -974 Ok(()) => None, -975 Err(mpsc::error::TrySendError::Closed(_)) => { -976 warn!(?url, "Dropped datagram(s): ActiveRelayActor closed."); -977 None -978 } -979 Err(mpsc::error::TrySendError::Full(item)) => { -980 let sender = handle.datagrams_send_queue.clone(); -981 let fut = async move { -982 if sender.send(item).await.is_err() { -983 warn!(?url, "Dropped datagram(s): ActiveRelayActor closed."); -984 } -985 }; -986 Some(fut) -987 } -988 } -989 } -990 -991 async fn on_network_change(&mut self, report: Report) { -992 let my_relay = self.config.my_relay.get(); -993 if report.preferred_relay == my_relay { -994 // No change. -995 return; -996 } -997 let old_relay = self -998 .config -999 .my_relay -1000 .set(report.preferred_relay.clone()) -1001 .unwrap_or_else(|e| e); -1002 -1003 if let Some(relay_url) = report.preferred_relay { -1004 self.config.metrics.relay_home_change.inc(); -1005 -1006 // On change, notify all currently connected relay servers and -1007 // start connecting to our home relay if we are not already. -1008 info!("home is now relay {}, was {:?}", relay_url, old_relay); -1009 self.set_home_relay(relay_url).await; -1010 } -1011 } -1012 -1013 async fn set_home_relay(&mut self, home_url: RelayUrl) { -1014 let home_url_ref = &home_url; -1015 n0_future::join_all(self.active_relays.iter().map(|(url, handle)| async move { -1016 let is_preferred = url == home_url_ref; -1017 handle -1018 .inbox_addr -1019 .send(ActiveRelayMessage::SetHomeRelay(is_preferred)) -1020 .await -1021 .ok() -1022 })) -1023 .await; -1024 // Ensure we have an ActiveRelayActor for the current home relay. -1025 self.active_relay_handle(home_url); -1026 } -1027 -1028 /// Returns the handle for the [`ActiveRelayActor`] to reach `remote_node`. -1029 /// -1030 /// The node is expected to be reachable on `url`, but if no [`ActiveRelayActor`] for -1031 /// `url` exists but another existing [`ActiveRelayActor`] already knows about the node, -1032 /// that other node is used. -1033 async fn active_relay_handle_for_node( -1034 &mut self, -1035 url: &RelayUrl, -1036 remote_node: &NodeId, -1037 ) -> ActiveRelayHandle { -1038 if let Some(handle) = self.active_relays.get(url) { -1039 return handle.clone(); -1040 } -1041 -1042 let mut found_relay: Option<RelayUrl> = None; -1043 // If we don't have an open connection to the remote node's home relay, see if -1044 // we have an open connection to a relay node where we'd heard from that peer -1045 // already. E.g. maybe they dialed our home relay recently. -1046 { -1047 // Futures which return Some(RelayUrl) if the relay knows about the remote node. -1048 let check_futs = self.active_relays.iter().map(|(url, handle)| async move { -1049 let (tx, rx) = oneshot::channel(); -1050 handle -1051 .prio_inbox_addr -1052 .send(ActiveRelayPrioMessage::HasNodeRoute(*remote_node, tx)) -1053 .await -1054 .ok(); -1055 match rx.await { -1056 Ok(true) => Some(url.clone()), -1057 _ => None, -1058 } -1059 }); -1060 let mut futures = FuturesUnorderedBounded::from_iter(check_futs); -1061 while let Some(maybe_url) = futures.next().await { -1062 if maybe_url.is_some() { -1063 found_relay = maybe_url; -1064 break; -1065 } -1066 } -1067 } -1068 let url = found_relay.unwrap_or(url.clone()); -1069 self.active_relay_handle(url) -1070 } -1071 -1072 /// Returns the handle of the [`ActiveRelayActor`]. -1073 fn active_relay_handle(&mut self, url: RelayUrl) -> ActiveRelayHandle { -1074 match self.active_relays.get(&url) { -1075 Some(e) => e.clone(), -1076 None => { -1077 let handle = self.start_active_relay(url.clone()); -1078 if Some(&url) == self.config.my_relay.get().as_ref() { -1079 if let Err(err) = handle -1080 .inbox_addr -1081 .try_send(ActiveRelayMessage::SetHomeRelay(true)) -1082 { -1083 error!("Home relay not set, send to new actor failed: {err:#}."); -1084 } -1085 } -1086 self.active_relays.insert(url, handle.clone()); -1087 self.log_active_relay(); -1088 handle -1089 } -1090 } -1091 } -1092 -1093 fn start_active_relay(&mut self, url: RelayUrl) -> ActiveRelayHandle { -1094 debug!(?url, "Adding relay connection"); -1095 -1096 let connection_opts = RelayConnectionOptions { -1097 secret_key: self.config.secret_key.clone(), -1098 #[cfg(not(wasm_browser))] -1099 dns_resolver: self.config.dns_resolver.clone(), -1100 proxy_url: self.config.proxy_url.clone(), -1101 prefer_ipv6: self.config.ipv6_reported.clone(), -1102 #[cfg(any(test, feature = "test-utils"))] -1103 insecure_skip_cert_verify: self.config.insecure_skip_relay_cert_verify, -1104 }; -1105 -1106 // TODO: Replace 64 with PER_CLIENT_SEND_QUEUE_DEPTH once that's unused -1107 let (send_datagram_tx, send_datagram_rx) = mpsc::channel(64); -1108 let (prio_inbox_tx, prio_inbox_rx) = mpsc::channel(32); -1109 let (inbox_tx, inbox_rx) = mpsc::channel(64); -1110 let span = info_span!("active-relay", %url); -1111 let opts = ActiveRelayActorOptions { -1112 url, -1113 prio_inbox_: prio_inbox_rx, -1114 inbox: inbox_rx, -1115 relay_datagrams_send: send_datagram_rx, -1116 relay_datagrams_recv: self.relay_datagram_recv_queue.clone(), -1117 connection_opts, -1118 stop_token: self.cancel_token.child_token(), -1119 metrics: self.config.metrics.clone(), +957 } +958 +959 // try shutdown +960 if time::timeout(Duration::from_secs(3), self.close_all_active_relays()) +961 .await +962 .is_err() +963 { +964 warn!("Failed to shut down all ActiveRelayActors"); +965 } +966 } +967 +968 async fn handle_msg(&mut self, msg: RelayActorMessage) { +969 match msg { +970 RelayActorMessage::NetworkChange { report } => { +971 self.on_network_change(report).await; +972 } +973 RelayActorMessage::MaybeCloseRelaysOnRebind => { +974 self.maybe_close_relays_on_rebind().await; +975 } +976 } +977 } +978 +979 /// Sends datagrams to the correct [`ActiveRelayActor`], or returns a future. +980 /// +981 /// If the datagram can not be sent immediately, because the destination channel is +982 /// full, a future is returned that will complete once the datagrams have been sent to +983 /// the [`ActiveRelayActor`]. +984 async fn try_send_datagram(&mut self, item: RelaySendItem) -> Option<impl Future<Output = ()>> { +985 let url = item.url.clone(); +986 let handle = self +987 .active_relay_handle_for_node(&item.url, &item.remote_node) +988 .await; +989 match handle.datagrams_send_queue.try_send(item) { +990 Ok(()) => None, +991 Err(mpsc::error::TrySendError::Closed(_)) => { +992 warn!(?url, "Dropped datagram(s): ActiveRelayActor closed."); +993 None +994 } +995 Err(mpsc::error::TrySendError::Full(item)) => { +996 let sender = handle.datagrams_send_queue.clone(); +997 let fut = async move { +998 if sender.send(item).await.is_err() { +999 warn!(?url, "Dropped datagram(s): ActiveRelayActor closed."); +1000 } +1001 }; +1002 Some(fut) +1003 } +1004 } +1005 } +1006 +1007 async fn on_network_change(&mut self, report: Report) { +1008 let my_relay = self.config.my_relay.get(); +1009 if report.preferred_relay == my_relay { +1010 // No change. +1011 return; +1012 } +1013 let old_relay = self +1014 .config +1015 .my_relay +1016 .set(report.preferred_relay.clone()) +1017 .unwrap_or_else(|e| e); +1018 +1019 if let Some(relay_url) = report.preferred_relay { +1020 self.config.metrics.relay_home_change.inc(); +1021 +1022 // On change, notify all currently connected relay servers and +1023 // start connecting to our home relay if we are not already. +1024 info!("home is now relay {}, was {:?}", relay_url, old_relay); +1025 self.set_home_relay(relay_url).await; +1026 } +1027 } +1028 +1029 async fn set_home_relay(&mut self, home_url: RelayUrl) { +1030 let home_url_ref = &home_url; +1031 n0_future::join_all(self.active_relays.iter().map(|(url, handle)| async move { +1032 let is_preferred = url == home_url_ref; +1033 handle +1034 .inbox_addr +1035 .send(ActiveRelayMessage::SetHomeRelay(is_preferred)) +1036 .await +1037 .ok() +1038 })) +1039 .await; +1040 // Ensure we have an ActiveRelayActor for the current home relay. +1041 self.active_relay_handle(home_url); +1042 } +1043 +1044 /// Returns the handle for the [`ActiveRelayActor`] to reach `remote_node`. +1045 /// +1046 /// The node is expected to be reachable on `url`, but if no [`ActiveRelayActor`] for +1047 /// `url` exists but another existing [`ActiveRelayActor`] already knows about the node, +1048 /// that other node is used. +1049 async fn active_relay_handle_for_node( +1050 &mut self, +1051 url: &RelayUrl, +1052 remote_node: &NodeId, +1053 ) -> ActiveRelayHandle { +1054 if let Some(handle) = self.active_relays.get(url) { +1055 return handle.clone(); +1056 } +1057 +1058 let mut found_relay: Option<RelayUrl> = None; +1059 // If we don't have an open connection to the remote node's home relay, see if +1060 // we have an open connection to a relay node where we'd heard from that peer +1061 // already. E.g. maybe they dialed our home relay recently. +1062 { +1063 // Futures which return Some(RelayUrl) if the relay knows about the remote node. +1064 let check_futs = self.active_relays.iter().map(|(url, handle)| async move { +1065 let (tx, rx) = oneshot::channel(); +1066 handle +1067 .prio_inbox_addr +1068 .send(ActiveRelayPrioMessage::HasNodeRoute(*remote_node, tx)) +1069 .await +1070 .ok(); +1071 match rx.await { +1072 Ok(true) => Some(url.clone()), +1073 _ => None, +1074 } +1075 }); +1076 let mut futures = FuturesUnorderedBounded::from_iter(check_futs); +1077 while let Some(maybe_url) = futures.next().await { +1078 if maybe_url.is_some() { +1079 found_relay = maybe_url; +1080 break; +1081 } +1082 } +1083 } +1084 let url = found_relay.unwrap_or(url.clone()); +1085 self.active_relay_handle(url) +1086 } +1087 +1088 /// Returns the handle of the [`ActiveRelayActor`]. +1089 fn active_relay_handle(&mut self, url: RelayUrl) -> ActiveRelayHandle { +1090 match self.active_relays.get(&url) { +1091 Some(e) => e.clone(), +1092 None => { +1093 let handle = self.start_active_relay(url.clone()); +1094 if Some(&url) == self.config.my_relay.get().as_ref() { +1095 if let Err(err) = handle +1096 .inbox_addr +1097 .try_send(ActiveRelayMessage::SetHomeRelay(true)) +1098 { +1099 error!("Home relay not set, send to new actor failed: {err:#}."); +1100 } +1101 } +1102 self.active_relays.insert(url, handle.clone()); +1103 self.log_active_relay(); +1104 handle +1105 } +1106 } +1107 } +1108 +1109 fn start_active_relay(&mut self, url: RelayUrl) -> ActiveRelayHandle { +1110 debug!(?url, "Adding relay connection"); +1111 +1112 let connection_opts = RelayConnectionOptions { +1113 secret_key: self.config.secret_key.clone(), +1114 #[cfg(not(wasm_browser))] +1115 dns_resolver: self.config.dns_resolver.clone(), +1116 proxy_url: self.config.proxy_url.clone(), +1117 prefer_ipv6: self.config.ipv6_reported.clone(), +1118 #[cfg(any(test, feature = "test-utils"))] +1119 insecure_skip_cert_verify: self.config.insecure_skip_relay_cert_verify, 1120 }; -1121 let actor = ActiveRelayActor::new(opts); -1122 self.active_relay_tasks.spawn( -1123 async move { -1124 actor.run().await; -1125 } -1126 .instrument(span), -1127 ); -1128 let handle = ActiveRelayHandle { -1129 prio_inbox_addr: prio_inbox_tx, -1130 inbox_addr: inbox_tx, -1131 datagrams_send_queue: send_datagram_tx, -1132 }; -1133 self.log_active_relay(); -1134 handle -1135 } -1136 -1137 /// Closes the relay connections not originating from a local IP address. -1138 /// -1139 /// Called in response to a rebind, any relay connection originating from an address -1140 /// that's not known to be currently a local IP address should be closed. All the other -1141 /// relay connections are pinged. -1142 async fn maybe_close_relays_on_rebind(&mut self) { -1143 #[cfg(not(wasm_browser))] -1144 let ifs = interfaces::State::new().await; -1145 #[cfg(not(wasm_browser))] -1146 let local_ips: Vec<_> = ifs -1147 .interfaces -1148 .values() -1149 .flat_map(|netif| netif.addrs()) -1150 .map(|ipnet| ipnet.addr()) -1151 .collect(); -1152 // In browsers, we don't have this information. This will do the right thing in the ActiveRelayActor, though. -1153 #[cfg(wasm_browser)] -1154 let local_ips = Vec::new(); -1155 let send_futs = self.active_relays.values().map(|handle| { -1156 let local_ips = local_ips.clone(); -1157 async move { -1158 handle -1159 .inbox_addr -1160 .send(ActiveRelayMessage::CheckConnection(local_ips)) -1161 .await -1162 .ok(); -1163 } -1164 }); -1165 n0_future::join_all(send_futs).await; -1166 self.log_active_relay(); -1167 } -1168 -1169 /// Cleans up [`ActiveRelayActor`]s which have stopped running. -1170 fn reap_active_relays(&mut self) { -1171 self.active_relays -1172 .retain(|_url, handle| !handle.inbox_addr.is_closed()); -1173 -1174 // Make sure home relay exists -1175 if let Some(url) = self.config.my_relay.get() { -1176 self.active_relay_handle(url); -1177 } -1178 self.log_active_relay(); -1179 } -1180 -1181 /// Stops all [`ActiveRelayActor`]s and awaits for them to finish. -1182 async fn close_all_active_relays(&mut self) { -1183 self.cancel_token.cancel(); -1184 let tasks = std::mem::take(&mut self.active_relay_tasks); -1185 tasks.join_all().await; -1186 -1187 self.log_active_relay(); -1188 } +1121 +1122 // TODO: Replace 64 with PER_CLIENT_SEND_QUEUE_DEPTH once that's unused +1123 let (send_datagram_tx, send_datagram_rx) = mpsc::channel(64); +1124 let (prio_inbox_tx, prio_inbox_rx) = mpsc::channel(32); +1125 let (inbox_tx, inbox_rx) = mpsc::channel(64); +1126 let span = info_span!("active-relay", %url); +1127 let opts = ActiveRelayActorOptions { +1128 url, +1129 prio_inbox_: prio_inbox_rx, +1130 inbox: inbox_rx, +1131 relay_datagrams_send: send_datagram_rx, +1132 relay_datagrams_recv: self.relay_datagram_recv_queue.clone(), +1133 connection_opts, +1134 stop_token: self.cancel_token.child_token(), +1135 metrics: self.config.metrics.clone(), +1136 }; +1137 let actor = ActiveRelayActor::new(opts); +1138 self.active_relay_tasks.spawn( +1139 async move { +1140 actor.run().await; +1141 } +1142 .instrument(span), +1143 ); +1144 let handle = ActiveRelayHandle { +1145 prio_inbox_addr: prio_inbox_tx, +1146 inbox_addr: inbox_tx, +1147 datagrams_send_queue: send_datagram_tx, +1148 }; +1149 self.log_active_relay(); +1150 handle +1151 } +1152 +1153 /// Closes the relay connections not originating from a local IP address. +1154 /// +1155 /// Called in response to a rebind, any relay connection originating from an address +1156 /// that's not known to be currently a local IP address should be closed. All the other +1157 /// relay connections are pinged. +1158 async fn maybe_close_relays_on_rebind(&mut self) { +1159 #[cfg(not(wasm_browser))] +1160 let ifs = interfaces::State::new().await; +1161 #[cfg(not(wasm_browser))] +1162 let local_ips: Vec<_> = ifs +1163 .interfaces +1164 .values() +1165 .flat_map(|netif| netif.addrs()) +1166 .map(|ipnet| ipnet.addr()) +1167 .collect(); +1168 // In browsers, we don't have this information. This will do the right thing in the ActiveRelayActor, though. +1169 #[cfg(wasm_browser)] +1170 let local_ips = Vec::new(); +1171 let send_futs = self.active_relays.values().map(|handle| { +1172 let local_ips = local_ips.clone(); +1173 async move { +1174 handle +1175 .inbox_addr +1176 .send(ActiveRelayMessage::CheckConnection(local_ips)) +1177 .await +1178 .ok(); +1179 } +1180 }); +1181 n0_future::join_all(send_futs).await; +1182 self.log_active_relay(); +1183 } +1184 +1185 /// Cleans up [`ActiveRelayActor`]s which have stopped running. +1186 fn reap_active_relays(&mut self) { +1187 self.active_relays +1188 .retain(|_url, handle| !handle.inbox_addr.is_closed()); 1189 -1190 fn log_active_relay(&self) { -1191 debug!("{} active relay conns{}", self.active_relays.len(), { -1192 let mut s = String::new(); -1193 if !self.active_relays.is_empty() { -1194 s += ":"; -1195 for node in self.active_relay_sorted() { -1196 s += &format!(" relay-{node}"); -1197 } -1198 } -1199 s -1200 }); -1201 } +1190 // Make sure home relay exists +1191 if let Some(url) = self.config.my_relay.get() { +1192 self.active_relay_handle(url); +1193 } +1194 self.log_active_relay(); +1195 } +1196 +1197 /// Stops all [`ActiveRelayActor`]s and awaits for them to finish. +1198 async fn close_all_active_relays(&mut self) { +1199 self.cancel_token.cancel(); +1200 let tasks = std::mem::take(&mut self.active_relay_tasks); +1201 tasks.join_all().await; 1202 -1203 fn active_relay_sorted(&self) -> impl Iterator<Item = RelayUrl> { -1204 let mut ids: Vec<_> = self.active_relays.keys().cloned().collect(); -1205 ids.sort(); -1206 -1207 ids.into_iter() -1208 } -1209} -1210 -1211/// Handle to one [`ActiveRelayActor`]. -1212#[derive(Debug, Clone)] -1213struct ActiveRelayHandle { -1214 prio_inbox_addr: mpsc::Sender<ActiveRelayPrioMessage>, -1215 inbox_addr: mpsc::Sender<ActiveRelayMessage>, -1216 datagrams_send_queue: mpsc::Sender<RelaySendItem>, -1217} +1203 self.log_active_relay(); +1204 } +1205 +1206 fn log_active_relay(&self) { +1207 debug!("{} active relay conns{}", self.active_relays.len(), { +1208 let mut s = String::new(); +1209 if !self.active_relays.is_empty() { +1210 s += ":"; +1211 for node in self.active_relay_sorted() { +1212 s += &format!(" relay-{node}"); +1213 } +1214 } +1215 s +1216 }); +1217 } 1218 -1219/// A single datagram received from a relay server. -1220/// -1221/// This could be either a QUIC or DISCO packet. -1222#[derive(Debug)] -1223pub(crate) struct RelayRecvDatagram { -1224 pub(crate) url: RelayUrl, -1225 pub(crate) src: NodeId, -1226 pub(crate) datagrams: Datagrams, -1227} -1228 -1229#[cfg(test)] -1230mod tests { -1231 use std::{ -1232 sync::{atomic::AtomicBool, Arc}, -1233 time::Duration, -1234 }; -1235 -1236 use iroh_base::{NodeId, RelayUrl, SecretKey}; -1237 use iroh_relay::{protos::relay::Datagrams, PingTracker}; -1238 use n0_snafu::{Error, Result, ResultExt}; -1239 use tokio::sync::{mpsc, oneshot}; -1240 use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle}; -1241 use tracing::{info, info_span, Instrument}; -1242 use tracing_test::traced_test; -1243 -1244 use super::{ -1245 ActiveRelayActor, ActiveRelayActorOptions, ActiveRelayMessage, ActiveRelayPrioMessage, -1246 RelayConnectionOptions, RelayRecvDatagram, RelaySendItem, RELAY_INACTIVE_CLEANUP_TIME, -1247 UNDELIVERABLE_DATAGRAM_TIMEOUT, -1248 }; -1249 use crate::{dns::DnsResolver, test_utils}; -1250 -1251 /// Starts a new [`ActiveRelayActor`]. -1252 #[allow(clippy::too_many_arguments)] -1253 fn start_active_relay_actor( -1254 secret_key: SecretKey, -1255 stop_token: CancellationToken, -1256 url: RelayUrl, -1257 prio_inbox_rx: mpsc::Receiver<ActiveRelayPrioMessage>, -1258 inbox_rx: mpsc::Receiver<ActiveRelayMessage>, -1259 relay_datagrams_send: mpsc::Receiver<RelaySendItem>, -1260 relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>, -1261 span: tracing::Span, -1262 ) -> AbortOnDropHandle<()> { -1263 let opts = ActiveRelayActorOptions { -1264 url, -1265 prio_inbox_: prio_inbox_rx, -1266 inbox: inbox_rx, -1267 relay_datagrams_send, -1268 relay_datagrams_recv, -1269 connection_opts: RelayConnectionOptions { -1270 secret_key, -1271 dns_resolver: DnsResolver::new(), -1272 proxy_url: None, -1273 prefer_ipv6: Arc::new(AtomicBool::new(true)), -1274 insecure_skip_cert_verify: true, -1275 }, -1276 stop_token, -1277 metrics: Default::default(), -1278 }; -1279 let task = tokio::spawn(ActiveRelayActor::new(opts).run().instrument(span)); -1280 AbortOnDropHandle::new(task) +1219 fn active_relay_sorted(&self) -> impl Iterator<Item = RelayUrl> { +1220 let mut ids: Vec<_> = self.active_relays.keys().cloned().collect(); +1221 ids.sort(); +1222 +1223 ids.into_iter() +1224 } +1225} +1226 +1227/// Handle to one [`ActiveRelayActor`]. +1228#[derive(Debug, Clone)] +1229struct ActiveRelayHandle { +1230 prio_inbox_addr: mpsc::Sender<ActiveRelayPrioMessage>, +1231 inbox_addr: mpsc::Sender<ActiveRelayMessage>, +1232 datagrams_send_queue: mpsc::Sender<RelaySendItem>, +1233} +1234 +1235/// A packet to send over the relay. +1236/// +1237/// This is nothing but a newtype, it should be constructed using [`PacketizeIter`]. This +1238/// is a packet of one or more datagrams, each prefixed with a u16-be length. This is what +1239/// the `Frame::SendPacket` of the `DerpCodec` transports and is produced by +1240/// [`PacketizeIter`] and transformed back into datagrams using [`PacketSplitIter`]. +1241#[derive(Debug, PartialEq, Eq)] +1242struct RelaySendPacket { +1243 node_id: NodeId, +1244 payload: Bytes, +1245} +1246 +1247/// A single datagram received from a relay server. +1248/// +1249/// This could be either a QUIC or DISCO packet. +1250#[derive(Debug)] +1251pub(crate) struct RelayRecvDatagram { +1252 pub(crate) url: RelayUrl, +1253 pub(crate) src: NodeId, +1254 pub(crate) buf: Bytes, +1255} +1256 +1257/// Combines datagrams into a single DISCO frame of at most MAX_PACKET_SIZE. +1258/// +1259/// The disco `iroh_relay::protos::Frame::SendPacket` frame can contain more then a single +1260/// datagram. Each datagram in this frame is prefixed with a little-endian 2-byte length +1261/// prefix. This occurs when Quinn sends a GSO transmit containing more than one datagram, +1262/// which are split using `split_packets`. +1263/// +1264/// The [`PacketSplitIter`] does the inverse and splits such packets back into individual +1265/// datagrams. +1266struct PacketizeIter<I: Iterator, const N: usize> { +1267 node_id: NodeId, +1268 iter: std::iter::Peekable<I>, +1269 buffer: BytesMut, +1270} +1271 +1272impl<I: Iterator, const N: usize> PacketizeIter<I, N> { +1273 /// Create a new new PacketizeIter from something that can be turned into an +1274 /// iterator of slices, like a `Vec<Bytes>`. +1275 fn new(node_id: NodeId, iter: impl IntoIterator<IntoIter = I>) -> Self { +1276 Self { +1277 node_id, +1278 iter: iter.into_iter().peekable(), +1279 buffer: BytesMut::with_capacity(N), +1280 } 1281 } -1282 -1283 /// Starts an [`ActiveRelayActor`] as an "iroh echo node". -1284 /// -1285 /// This actor will connect to the relay server, pretending to be an iroh node, and echo -1286 /// back any datagram it receives from the relay. This is used by the -1287 /// [`ActiveRelayNode`] under test to check connectivity works. -1288 fn start_echo_node(relay_url: RelayUrl) -> (NodeId, AbortOnDropHandle<()>) { -1289 let secret_key = SecretKey::from_bytes(&[8u8; 32]); -1290 let (recv_datagram_tx, mut recv_datagram_rx) = mpsc::channel(16); -1291 let (send_datagram_tx, send_datagram_rx) = mpsc::channel(16); -1292 let (prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8); -1293 let (inbox_tx, inbox_rx) = mpsc::channel(16); -1294 let cancel_token = CancellationToken::new(); -1295 let actor_task = start_active_relay_actor( -1296 secret_key.clone(), -1297 cancel_token.clone(), -1298 relay_url.clone(), -1299 prio_inbox_rx, -1300 inbox_rx, -1301 send_datagram_rx, -1302 recv_datagram_tx, -1303 info_span!("echo-node"), -1304 ); -1305 let echo_task = tokio::spawn({ -1306 let relay_url = relay_url.clone(); -1307 async move { -1308 loop { -1309 let datagram = recv_datagram_rx.recv().await; -1310 if let Some(recv) = datagram { -1311 let RelayRecvDatagram { -1312 url: _, -1313 src, -1314 datagrams, -1315 } = recv; -1316 info!(from = src.fmt_short(), "Received datagram"); -1317 let send = RelaySendItem { -1318 remote_node: src, -1319 url: relay_url.clone(), -1320 datagrams, -1321 }; -1322 send_datagram_tx.send(send).await.ok(); -1323 } -1324 } -1325 } -1326 .instrument(info_span!("echo-task")) -1327 }); -1328 let echo_task = AbortOnDropHandle::new(echo_task); -1329 let supervisor_task = tokio::spawn(async move { -1330 let _guard = cancel_token.drop_guard(); -1331 // move the inboxes here so it is not dropped, as this stops the actor. -1332 let _prio_inbox_tx = prio_inbox_tx; -1333 let _inbox_tx = inbox_tx; -1334 tokio::select! { -1335 biased; -1336 _ = actor_task => (), -1337 _ = echo_task => (), -1338 }; -1339 }); -1340 let supervisor_task = AbortOnDropHandle::new(supervisor_task); -1341 (secret_key.public(), supervisor_task) -1342 } -1343 -1344 /// Sends a message to the echo node, receives the response. -1345 /// -1346 /// This takes care of retry and timeout. Because we don't know when both the -1347 /// node-under-test and the echo node will be ready and datagrams aren't queued to send -1348 /// forever, we have to retry a few times. -1349 async fn send_recv_echo( -1350 item: RelaySendItem, -1351 tx: &mpsc::Sender<RelaySendItem>, -1352 rx: &mut mpsc::Receiver<RelayRecvDatagram>, -1353 ) -> Result<()> { -1354 tokio::time::timeout(Duration::from_secs(10), async move { -1355 loop { -1356 let res = tokio::time::timeout(UNDELIVERABLE_DATAGRAM_TIMEOUT, async { -1357 tx.send(item.clone()).await.context("send item")?; -1358 let RelayRecvDatagram { -1359 url: _, -1360 src: _, -1361 datagrams, -1362 } = rx.recv().await.unwrap(); -1363 -1364 assert_eq!(datagrams, item.datagrams); -1365 -1366 Ok::<_, Error>(()) -1367 }) -1368 .await; -1369 if res.is_ok() { -1370 break; -1371 } -1372 } -1373 }) -1374 .await -1375 .expect("overall timeout exceeded"); -1376 Ok(()) -1377 } -1378 -1379 #[tokio::test] -1380 #[traced_test] -1381 async fn test_active_relay_reconnect() -> Result { -1382 let (_relay_map, relay_url, _server) = test_utils::run_relay_server().await?; -1383 let (peer_node, _echo_node_task) = start_echo_node(relay_url.clone()); -1384 -1385 let secret_key = SecretKey::from_bytes(&[1u8; 32]); -1386 let (datagram_recv_tx, mut datagram_recv_rx) = mpsc::channel(16); -1387 let (send_datagram_tx, send_datagram_rx) = mpsc::channel(16); -1388 let (_prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8); -1389 let (inbox_tx, inbox_rx) = mpsc::channel(16); -1390 let cancel_token = CancellationToken::new(); -1391 let task = start_active_relay_actor( -1392 secret_key, -1393 cancel_token.clone(), -1394 relay_url.clone(), -1395 prio_inbox_rx, -1396 inbox_rx, -1397 send_datagram_rx, -1398 datagram_recv_tx.clone(), -1399 info_span!("actor-under-test"), -1400 ); -1401 -1402 // Send a datagram to our echo node. -1403 info!("first echo"); -1404 let hello_send_item = RelaySendItem { -1405 remote_node: peer_node, -1406 url: relay_url.clone(), -1407 datagrams: Datagrams::from(b"hello"), -1408 }; -1409 send_recv_echo( -1410 hello_send_item.clone(), -1411 &send_datagram_tx, -1412 &mut datagram_recv_rx, -1413 ) -1414 .await?; -1415 -1416 // Now ask to check the connection, triggering a ping but no reconnect. -1417 let (tx, rx) = oneshot::channel(); -1418 inbox_tx -1419 .send(ActiveRelayMessage::GetLocalAddr(tx)) -1420 .await -1421 .context("send get local addr msg")?; -1422 -1423 let local_addr = rx -1424 .await -1425 .context("wait for local addr msg")? -1426 .context("no local addr")?; -1427 info!(?local_addr, "check connection with addr"); -1428 inbox_tx -1429 .send(ActiveRelayMessage::CheckConnection(vec![local_addr.ip()])) -1430 .await -1431 .context("send check connection message")?; -1432 -1433 // Sync the ActiveRelayActor. Ping blocks it and we want to be sure it has handled -1434 // another inbox message before continuing. -1435 let (tx, rx) = oneshot::channel(); -1436 inbox_tx -1437 .send(ActiveRelayMessage::GetLocalAddr(tx)) -1438 .await -1439 .context("send get local addr msg")?; -1440 rx.await.context("recv send local addr msg")?; -1441 -1442 // Echo should still work. -1443 info!("second echo"); -1444 send_recv_echo( -1445 hello_send_item.clone(), -1446 &send_datagram_tx, -1447 &mut datagram_recv_rx, -1448 ) -1449 .await?; +1282} +1283 +1284impl<I: Iterator, const N: usize> Iterator for PacketizeIter<I, N> +1285where +1286 I::Item: AsRef<[u8]>, +1287{ +1288 type Item = RelaySendPacket; +1289 +1290 fn next(&mut self) -> Option<Self::Item> { +1291 use bytes::BufMut; +1292 while let Some(next_bytes) = self.iter.peek() { +1293 let next_bytes = next_bytes.as_ref(); +1294 assert!(next_bytes.len() + 2 <= N); +1295 let next_length: u16 = next_bytes.len().try_into().expect("items < 64k size"); +1296 if self.buffer.len() + next_bytes.len() + 2 > N { +1297 break; +1298 } +1299 self.buffer.put_u16_le(next_length); +1300 self.buffer.put_slice(next_bytes); +1301 self.iter.next(); +1302 } +1303 if !self.buffer.is_empty() { +1304 Some(RelaySendPacket { +1305 node_id: self.node_id, +1306 payload: self.buffer.split().freeze(), +1307 }) +1308 } else { +1309 None +1310 } +1311 } +1312} +1313 +1314/// Splits a single [`ServerToClientMsg::ReceivedPacket`] frame into datagrams. +1315/// +1316/// This splits packets joined by [`PacketizeIter`] back into individual datagrams. See +1317/// that struct for more details. +1318#[derive(Debug)] +1319struct PacketSplitIter { +1320 url: RelayUrl, +1321 src: NodeId, +1322 bytes: Bytes, +1323} +1324 +1325impl PacketSplitIter { +1326 /// Create a new PacketSplitIter from a packet. +1327 fn new(url: RelayUrl, src: NodeId, bytes: Bytes) -> Self { +1328 Self { url, src, bytes } +1329 } +1330 +1331 fn fail(&mut self) -> Option<std::io::Result<RelayRecvDatagram>> { +1332 self.bytes.clear(); +1333 Some(Err(std::io::Error::new( +1334 std::io::ErrorKind::UnexpectedEof, +1335 "", +1336 ))) +1337 } +1338} +1339 +1340impl Iterator for PacketSplitIter { +1341 type Item = std::io::Result<RelayRecvDatagram>; +1342 +1343 fn next(&mut self) -> Option<Self::Item> { +1344 use bytes::Buf; +1345 if self.bytes.has_remaining() { +1346 if self.bytes.remaining() < 2 { +1347 return self.fail(); +1348 } +1349 let len = self.bytes.get_u16_le() as usize; +1350 if self.bytes.remaining() < len { +1351 return self.fail(); +1352 } +1353 let buf = self.bytes.split_to(len); +1354 Some(Ok(RelayRecvDatagram { +1355 url: self.url.clone(), +1356 src: self.src, +1357 buf, +1358 })) +1359 } else { +1360 None +1361 } +1362 } +1363} +1364#[cfg(test)] +1365mod tests { +1366 use std::{ +1367 sync::{atomic::AtomicBool, Arc}, +1368 time::Duration, +1369 }; +1370 +1371 use bytes::Bytes; +1372 use iroh_base::{NodeId, RelayUrl, SecretKey}; +1373 use iroh_relay::PingTracker; +1374 use n0_snafu::{Error, Result, ResultExt}; +1375 use smallvec::smallvec; +1376 use tokio::sync::{mpsc, oneshot}; +1377 use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle}; +1378 use tracing::{info, info_span, Instrument}; +1379 use tracing_test::traced_test; +1380 +1381 use super::{ +1382 ActiveRelayActor, ActiveRelayActorOptions, ActiveRelayMessage, ActiveRelayPrioMessage, +1383 PacketizeIter, RelayConnectionOptions, RelayRecvDatagram, RelaySendItem, MAX_PACKET_SIZE, +1384 RELAY_INACTIVE_CLEANUP_TIME, UNDELIVERABLE_DATAGRAM_TIMEOUT, +1385 }; +1386 use crate::{dns::DnsResolver, test_utils}; +1387 +1388 #[test] +1389 fn test_packetize_iter() { +1390 let node_id = SecretKey::generate(rand::thread_rng()).public(); +1391 let empty_vec: Vec<Bytes> = Vec::new(); +1392 let mut iter = PacketizeIter::<_, MAX_PACKET_SIZE>::new(node_id, empty_vec); +1393 assert_eq!(None, iter.next()); +1394 +1395 let single_vec = vec!["Hello"]; +1396 let iter = PacketizeIter::<_, MAX_PACKET_SIZE>::new(node_id, single_vec); +1397 let result = iter.collect::<Vec<_>>(); +1398 assert_eq!(1, result.len()); +1399 assert_eq!( +1400 &[5, 0, b'H', b'e', b'l', b'l', b'o'], +1401 &result[0].payload[..] +1402 ); +1403 +1404 let spacer = vec![0u8; MAX_PACKET_SIZE - 10]; +1405 let multiple_vec = vec![&b"Hello"[..], &spacer, &b"World"[..]]; +1406 let iter = PacketizeIter::<_, MAX_PACKET_SIZE>::new(node_id, multiple_vec); +1407 let result = iter.collect::<Vec<_>>(); +1408 assert_eq!(2, result.len()); +1409 assert_eq!( +1410 &[5, 0, b'H', b'e', b'l', b'l', b'o'], +1411 &result[0].payload[..7] +1412 ); +1413 assert_eq!( +1414 &[5, 0, b'W', b'o', b'r', b'l', b'd'], +1415 &result[1].payload[..] +1416 ); +1417 } +1418 +1419 /// Starts a new [`ActiveRelayActor`]. +1420 #[allow(clippy::too_many_arguments)] +1421 fn start_active_relay_actor( +1422 secret_key: SecretKey, +1423 stop_token: CancellationToken, +1424 url: RelayUrl, +1425 prio_inbox_rx: mpsc::Receiver<ActiveRelayPrioMessage>, +1426 inbox_rx: mpsc::Receiver<ActiveRelayMessage>, +1427 relay_datagrams_send: mpsc::Receiver<RelaySendItem>, +1428 relay_datagrams_recv: mpsc::Sender<RelayRecvDatagram>, +1429 span: tracing::Span, +1430 ) -> AbortOnDropHandle<()> { +1431 let opts = ActiveRelayActorOptions { +1432 url, +1433 prio_inbox_: prio_inbox_rx, +1434 inbox: inbox_rx, +1435 relay_datagrams_send, +1436 relay_datagrams_recv, +1437 connection_opts: RelayConnectionOptions { +1438 secret_key, +1439 dns_resolver: DnsResolver::new(), +1440 proxy_url: None, +1441 prefer_ipv6: Arc::new(AtomicBool::new(true)), +1442 insecure_skip_cert_verify: true, +1443 }, +1444 stop_token, +1445 metrics: Default::default(), +1446 }; +1447 let task = tokio::spawn(ActiveRelayActor::new(opts).run().instrument(span)); +1448 AbortOnDropHandle::new(task) +1449 } 1450 -1451 // Now ask to check the connection, this will reconnect without pinging because we -1452 // do not supply any "valid" local IP addresses. -1453 info!("check connection"); -1454 inbox_tx -1455 .send(ActiveRelayMessage::CheckConnection(Vec::new())) -1456 .await -1457 .context("send check connection msg")?; -1458 -1459 // Give some time to reconnect, mostly to sort logs rather than functional. -1460 tokio::time::sleep(Duration::from_millis(10)).await; -1461 -1462 // Echo should still work. -1463 info!("third echo"); -1464 send_recv_echo( -1465 hello_send_item.clone(), -1466 &send_datagram_tx, -1467 &mut datagram_recv_rx, -1468 ) -1469 .await?; -1470 -1471 // Shut down the actor. -1472 cancel_token.cancel(); -1473 task.await.context("wait for task to finish")?; -1474 -1475 Ok(()) -1476 } -1477 -1478 #[tokio::test] -1479 #[traced_test] -1480 async fn test_active_relay_inactive() -> Result { -1481 let (_relay_map, relay_url, _server) = test_utils::run_relay_server().await?; -1482 -1483 let secret_key = SecretKey::from_bytes(&[1u8; 32]); -1484 let (datagram_recv_tx, _datagram_recv_rx) = mpsc::channel(16); -1485 let (_send_datagram_tx, send_datagram_rx) = mpsc::channel(16); -1486 let (_prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8); -1487 let (inbox_tx, inbox_rx) = mpsc::channel(16); -1488 let cancel_token = CancellationToken::new(); -1489 let mut task = start_active_relay_actor( -1490 secret_key, -1491 cancel_token.clone(), -1492 relay_url, -1493 prio_inbox_rx, -1494 inbox_rx, -1495 send_datagram_rx, -1496 datagram_recv_tx, -1497 info_span!("actor-under-test"), -1498 ); -1499 -1500 // Wait until the actor is connected to the relay server. -1501 tokio::time::timeout(Duration::from_millis(200), async { -1502 loop { -1503 let (tx, rx) = oneshot::channel(); -1504 inbox_tx.send(ActiveRelayMessage::PingServer(tx)).await.ok(); -1505 if tokio::time::timeout(Duration::from_millis(100), rx) -1506 .await -1507 .map(|resp| resp.is_ok()) -1508 .unwrap_or_default() -1509 { -1510 break; -1511 } -1512 } -1513 }) -1514 .await -1515 .context("timeout")?; -1516 -1517 // From now on, we pause time -1518 tokio::time::pause(); -1519 // We now have an idling ActiveRelayActor. If we advance time just a little it -1520 // should stay alive. -1521 info!("Stepping time forwards by RELAY_INACTIVE_CLEANUP_TIME / 2"); -1522 tokio::time::advance(RELAY_INACTIVE_CLEANUP_TIME / 2).await; -1523 -1524 assert!( -1525 tokio::time::timeout(Duration::from_millis(100), &mut task) -1526 .await -1527 .is_err(), -1528 "actor task terminated" -1529 ); -1530 -1531 // If we advance time a lot it should finish. -1532 info!("Stepping time forwards by RELAY_INACTIVE_CLEANUP_TIME"); -1533 tokio::time::advance(RELAY_INACTIVE_CLEANUP_TIME).await; -1534 assert!( -1535 tokio::time::timeout(Duration::from_millis(100), task) -1536 .await -1537 .is_ok(), -1538 "actor task still running" -1539 ); -1540 -1541 cancel_token.cancel(); +1451 /// Starts an [`ActiveRelayActor`] as an "iroh echo node". +1452 /// +1453 /// This actor will connect to the relay server, pretending to be an iroh node, and echo +1454 /// back any datagram it receives from the relay. This is used by the +1455 /// [`ActiveRelayNode`] under test to check connectivity works. +1456 fn start_echo_node(relay_url: RelayUrl) -> (NodeId, AbortOnDropHandle<()>) { +1457 let secret_key = SecretKey::from_bytes(&[8u8; 32]); +1458 let (recv_datagram_tx, mut recv_datagram_rx) = mpsc::channel(16); +1459 let (send_datagram_tx, send_datagram_rx) = mpsc::channel(16); +1460 let (prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8); +1461 let (inbox_tx, inbox_rx) = mpsc::channel(16); +1462 let cancel_token = CancellationToken::new(); +1463 let actor_task = start_active_relay_actor( +1464 secret_key.clone(), +1465 cancel_token.clone(), +1466 relay_url.clone(), +1467 prio_inbox_rx, +1468 inbox_rx, +1469 send_datagram_rx, +1470 recv_datagram_tx, +1471 info_span!("echo-node"), +1472 ); +1473 let echo_task = tokio::spawn({ +1474 let relay_url = relay_url.clone(); +1475 async move { +1476 loop { +1477 let datagram = recv_datagram_rx.recv().await; +1478 if let Some(recv) = datagram { +1479 let RelayRecvDatagram { url: _, src, buf } = recv; +1480 info!(from = src.fmt_short(), "Received datagram"); +1481 let send = RelaySendItem { +1482 remote_node: src, +1483 url: relay_url.clone(), +1484 datagrams: smallvec![buf], +1485 }; +1486 send_datagram_tx.send(send).await.ok(); +1487 } +1488 } +1489 } +1490 .instrument(info_span!("echo-task")) +1491 }); +1492 let echo_task = AbortOnDropHandle::new(echo_task); +1493 let supervisor_task = tokio::spawn(async move { +1494 let _guard = cancel_token.drop_guard(); +1495 // move the inboxes here so it is not dropped, as this stops the actor. +1496 let _prio_inbox_tx = prio_inbox_tx; +1497 let _inbox_tx = inbox_tx; +1498 tokio::select! { +1499 biased; +1500 _ = actor_task => (), +1501 _ = echo_task => (), +1502 }; +1503 }); +1504 let supervisor_task = AbortOnDropHandle::new(supervisor_task); +1505 (secret_key.public(), supervisor_task) +1506 } +1507 +1508 /// Sends a message to the echo node, receives the response. +1509 /// +1510 /// This takes care of retry and timeout. Because we don't know when both the +1511 /// node-under-test and the echo node will be ready and datagrams aren't queued to send +1512 /// forever, we have to retry a few times. +1513 async fn send_recv_echo( +1514 item: RelaySendItem, +1515 tx: &mpsc::Sender<RelaySendItem>, +1516 rx: &mut mpsc::Receiver<RelayRecvDatagram>, +1517 ) -> Result<()> { +1518 tokio::time::timeout(Duration::from_secs(10), async move { +1519 loop { +1520 let res = tokio::time::timeout(UNDELIVERABLE_DATAGRAM_TIMEOUT, async { +1521 tx.send(item.clone()).await.context("send item")?; +1522 let RelayRecvDatagram { +1523 url: _, +1524 src: _, +1525 buf, +1526 } = rx.recv().await.unwrap(); +1527 +1528 assert_eq!(buf.as_ref(), item.datagrams[0]); +1529 +1530 Ok::<_, Error>(()) +1531 }) +1532 .await; +1533 if res.is_ok() { +1534 break; +1535 } +1536 } +1537 }) +1538 .await +1539 .expect("overall timeout exceeded"); +1540 Ok(()) +1541 } 1542 -1543 Ok(()) -1544 } -1545 -1546 #[tokio::test] -1547 async fn test_ping_tracker() { -1548 tokio::time::pause(); -1549 let mut tracker = PingTracker::default(); -1550 -1551 let ping0 = tracker.new_ping(); -1552 -1553 let res = tokio::time::timeout(Duration::from_secs(1), tracker.timeout()).await; -1554 assert!(res.is_err(), "no ping timeout has elapsed yet"); -1555 -1556 tracker.pong_received(ping0); -1557 let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await; -1558 assert!(res.is_err(), "ping completed before timeout"); -1559 -1560 let _ping1 = tracker.new_ping(); -1561 -1562 let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await; -1563 assert!(res.is_ok(), "ping timeout should have happened"); -1564 -1565 let _ping2 = tracker.new_ping(); -1566 -1567 tokio::time::sleep(Duration::from_secs(10)).await; -1568 let res = tokio::time::timeout(Duration::from_millis(1), tracker.timeout()).await; -1569 assert!(res.is_ok(), "ping timeout happened in the past"); -1570 -1571 let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await; -1572 assert!(res.is_err(), "ping timeout should only happen once"); -1573 } -1574} \ No newline at end of file +1543 #[tokio::test] +1544 #[traced_test] +1545 async fn test_active_relay_reconnect() -> Result { +1546 let (_relay_map, relay_url, _server) = test_utils::run_relay_server().await?; +1547 let (peer_node, _echo_node_task) = start_echo_node(relay_url.clone()); +1548 +1549 let secret_key = SecretKey::from_bytes(&[1u8; 32]); +1550 let (datagram_recv_tx, mut datagram_recv_rx) = mpsc::channel(16); +1551 let (send_datagram_tx, send_datagram_rx) = mpsc::channel(16); +1552 let (_prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8); +1553 let (inbox_tx, inbox_rx) = mpsc::channel(16); +1554 let cancel_token = CancellationToken::new(); +1555 let task = start_active_relay_actor( +1556 secret_key, +1557 cancel_token.clone(), +1558 relay_url.clone(), +1559 prio_inbox_rx, +1560 inbox_rx, +1561 send_datagram_rx, +1562 datagram_recv_tx.clone(), +1563 info_span!("actor-under-test"), +1564 ); +1565 +1566 // Send a datagram to our echo node. +1567 info!("first echo"); +1568 let hello_send_item = RelaySendItem { +1569 remote_node: peer_node, +1570 url: relay_url.clone(), +1571 datagrams: smallvec![Bytes::from_static(b"hello")], +1572 }; +1573 send_recv_echo( +1574 hello_send_item.clone(), +1575 &send_datagram_tx, +1576 &mut datagram_recv_rx, +1577 ) +1578 .await?; +1579 +1580 // Now ask to check the connection, triggering a ping but no reconnect. +1581 let (tx, rx) = oneshot::channel(); +1582 inbox_tx +1583 .send(ActiveRelayMessage::GetLocalAddr(tx)) +1584 .await +1585 .context("send get local addr msg")?; +1586 +1587 let local_addr = rx +1588 .await +1589 .context("wait for local addr msg")? +1590 .context("no local addr")?; +1591 info!(?local_addr, "check connection with addr"); +1592 inbox_tx +1593 .send(ActiveRelayMessage::CheckConnection(vec![local_addr.ip()])) +1594 .await +1595 .context("send check connection message")?; +1596 +1597 // Sync the ActiveRelayActor. Ping blocks it and we want to be sure it has handled +1598 // another inbox message before continuing. +1599 let (tx, rx) = oneshot::channel(); +1600 inbox_tx +1601 .send(ActiveRelayMessage::GetLocalAddr(tx)) +1602 .await +1603 .context("send get local addr msg")?; +1604 rx.await.context("recv send local addr msg")?; +1605 +1606 // Echo should still work. +1607 info!("second echo"); +1608 send_recv_echo( +1609 hello_send_item.clone(), +1610 &send_datagram_tx, +1611 &mut datagram_recv_rx, +1612 ) +1613 .await?; +1614 +1615 // Now ask to check the connection, this will reconnect without pinging because we +1616 // do not supply any "valid" local IP addresses. +1617 info!("check connection"); +1618 inbox_tx +1619 .send(ActiveRelayMessage::CheckConnection(Vec::new())) +1620 .await +1621 .context("send check connection msg")?; +1622 +1623 // Give some time to reconnect, mostly to sort logs rather than functional. +1624 tokio::time::sleep(Duration::from_millis(10)).await; +1625 +1626 // Echo should still work. +1627 info!("third echo"); +1628 send_recv_echo( +1629 hello_send_item.clone(), +1630 &send_datagram_tx, +1631 &mut datagram_recv_rx, +1632 ) +1633 .await?; +1634 +1635 // Shut down the actor. +1636 cancel_token.cancel(); +1637 task.await.context("wait for task to finish")?; +1638 +1639 Ok(()) +1640 } +1641 +1642 #[tokio::test] +1643 #[traced_test] +1644 async fn test_active_relay_inactive() -> Result { +1645 let (_relay_map, relay_url, _server) = test_utils::run_relay_server().await?; +1646 +1647 let secret_key = SecretKey::from_bytes(&[1u8; 32]); +1648 let (datagram_recv_tx, _datagram_recv_rx) = mpsc::channel(16); +1649 let (_send_datagram_tx, send_datagram_rx) = mpsc::channel(16); +1650 let (_prio_inbox_tx, prio_inbox_rx) = mpsc::channel(8); +1651 let (inbox_tx, inbox_rx) = mpsc::channel(16); +1652 let cancel_token = CancellationToken::new(); +1653 let mut task = start_active_relay_actor( +1654 secret_key, +1655 cancel_token.clone(), +1656 relay_url, +1657 prio_inbox_rx, +1658 inbox_rx, +1659 send_datagram_rx, +1660 datagram_recv_tx, +1661 info_span!("actor-under-test"), +1662 ); +1663 +1664 // Wait until the actor is connected to the relay server. +1665 tokio::time::timeout(Duration::from_millis(200), async { +1666 loop { +1667 let (tx, rx) = oneshot::channel(); +1668 inbox_tx.send(ActiveRelayMessage::PingServer(tx)).await.ok(); +1669 if tokio::time::timeout(Duration::from_millis(100), rx) +1670 .await +1671 .map(|resp| resp.is_ok()) +1672 .unwrap_or_default() +1673 { +1674 break; +1675 } +1676 } +1677 }) +1678 .await +1679 .context("timeout")?; +1680 +1681 // From now on, we pause time +1682 tokio::time::pause(); +1683 // We now have an idling ActiveRelayActor. If we advance time just a little it +1684 // should stay alive. +1685 info!("Stepping time forwards by RELAY_INACTIVE_CLEANUP_TIME / 2"); +1686 tokio::time::advance(RELAY_INACTIVE_CLEANUP_TIME / 2).await; +1687 +1688 assert!( +1689 tokio::time::timeout(Duration::from_millis(100), &mut task) +1690 .await +1691 .is_err(), +1692 "actor task terminated" +1693 ); +1694 +1695 // If we advance time a lot it should finish. +1696 info!("Stepping time forwards by RELAY_INACTIVE_CLEANUP_TIME"); +1697 tokio::time::advance(RELAY_INACTIVE_CLEANUP_TIME).await; +1698 assert!( +1699 tokio::time::timeout(Duration::from_millis(100), task) +1700 .await +1701 .is_ok(), +1702 "actor task still running" +1703 ); +1704 +1705 cancel_token.cancel(); +1706 +1707 Ok(()) +1708 } +1709 +1710 #[tokio::test] +1711 async fn test_ping_tracker() { +1712 tokio::time::pause(); +1713 let mut tracker = PingTracker::default(); +1714 +1715 let ping0 = tracker.new_ping(); +1716 +1717 let res = tokio::time::timeout(Duration::from_secs(1), tracker.timeout()).await; +1718 assert!(res.is_err(), "no ping timeout has elapsed yet"); +1719 +1720 tracker.pong_received(ping0); +1721 let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await; +1722 assert!(res.is_err(), "ping completed before timeout"); +1723 +1724 let _ping1 = tracker.new_ping(); +1725 +1726 let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await; +1727 assert!(res.is_ok(), "ping timeout should have happened"); +1728 +1729 let _ping2 = tracker.new_ping(); +1730 +1731 tokio::time::sleep(Duration::from_secs(10)).await; +1732 let res = tokio::time::timeout(Duration::from_millis(1), tracker.timeout()).await; +1733 assert!(res.is_ok(), "ping timeout happened in the past"); +1734 +1735 let res = tokio::time::timeout(Duration::from_secs(10), tracker.timeout()).await; +1736 assert!(res.is_err(), "ping timeout should only happen once"); +1737 } +1738} \ No newline at end of file diff --git a/pr/3331/docs/src/iroh_relay/client/conn.rs.html b/pr/3331/docs/src/iroh_relay/client/conn.rs.html index babd20bdd9..5c37f598bd 100644 --- a/pr/3331/docs/src/iroh_relay/client/conn.rs.html +++ b/pr/3331/docs/src/iroh_relay/client/conn.rs.html @@ -19,7 +19,7 @@ 19use crate::{ 20 protos::{ 21 handshake, -22 relay::{ClientToRelayMsg, Error as ProtoError, RelayToClientMsg, MAX_PAYLOAD_SIZE}, +22 relay::{ClientToRelayMsg, Error as ProtoError, RelayToClientMsg}, 23 streams::WsBytesFramed, 24 }, 25 MAX_PACKET_SIZE, @@ -143,9 +143,9 @@ 143 } 144 145 fn start_send(mut self: Pin<&mut Self>, frame: ClientToRelayMsg) -> Result<(), Self::Error> { -146 if let ClientToRelayMsg::Datagrams { datagrams, .. } = &frame { -147 let size = datagrams.contents.len(); -148 snafu::ensure!(size <= MAX_PAYLOAD_SIZE, ExceedsMaxPacketSizeSnafu { size }); +146 if let ClientToRelayMsg::SendPacket { .. } = &frame { +147 let size = frame.encoded_len(); +148 snafu::ensure!(size <= MAX_PACKET_SIZE, ExceedsMaxPacketSizeSnafu { size }); 149 } 150 151 Pin::new(&mut self.conn) diff --git a/pr/3331/docs/src/iroh_relay/protos/common.rs.html b/pr/3331/docs/src/iroh_relay/protos/common.rs.html index 44cf958ce0..bd51beaa90 100644 --- a/pr/3331/docs/src/iroh_relay/protos/common.rs.html +++ b/pr/3331/docs/src/iroh_relay/protos/common.rs.html @@ -16,37 +16,37 @@ 16// needs to be pub due to being exposed in error types 17pub enum FrameType { 18 /// The server frame type for the challenge response -19 ServerChallenge = 1, +19 ServerChallenge = 0, 20 /// The client frame type for the authentication frame -21 ClientAuth = 2, +21 ClientAuth = 1, 22 /// The server frame type for authentication confirmation -23 ServerConfirmsAuth = 3, +23 ServerConfirmsAuth = 2, 24 /// The server frame type for authentication denial -25 ServerDeniesAuth = 4, +25 ServerDeniesAuth = 3, 26 /// 32B dest pub key + ECN byte + segment size u16 + datagrams contents -27 ClientToRelayDatagrams = 5, +27 SendPacket = 4, 28 /// 32B src pub key + ECN byte + segment size u16 + datagrams contents -29 RelayToClientDatagrams = 6, +29 RecvPacket = 6, 30 /// Sent from server to client to signal that a previous sender is no longer connected. 31 /// 32 /// That is, if A sent to B, and then if A disconnects, the server sends `FrameType::PeerGone` 33 /// to B so B can forget that a reverse path exists on that connection to get back to A 34 /// 35 /// 32B pub key of peer that's gone -36 NodeGone = 7, +36 NodeGone = 8, 37 /// Messages with these frames will be ignored. 38 /// 8 byte ping payload, to be echoed back in FrameType::Pong -39 Ping = 8, +39 Ping = 9, 40 /// 8 byte payload, the contents of ping being replied to -41 Pong = 9, +41 Pong = 10, 42 /// Sent from server to client to tell the client if their connection is unhealthy somehow. 43 /// Contains only UTF-8 bytes. -44 Health = 10, +44 Health = 11, 45 46 /// Sent from server to client for the server to declare that it's restarting. 47 /// Payload is two big endian u32 durations in milliseconds: when to reconnect, 48 /// and how long to try total. -49 Restarting = 11, +49 Restarting = 12, 50} 51 52#[common_fields({ diff --git a/pr/3331/docs/src/iroh_relay/protos/relay.rs.html b/pr/3331/docs/src/iroh_relay/protos/relay.rs.html index c77b329616..f6bda9385a 100644 --- a/pr/3331/docs/src/iroh_relay/protos/relay.rs.html +++ b/pr/3331/docs/src/iroh_relay/protos/relay.rs.html @@ -3,8 +3,8 @@ 3//! Protocol flow: 4//! * server occasionally sends [`FrameType::Ping`] 5//! * client responds to any [`FrameType::Ping`] with a [`FrameType::Pong`] -6//! * clients sends [`FrameType::ClientToRelayDatagrams`] -7//! * server then sends [`FrameType::RelayToClientDatagrams`] to recipient +6//! * clients sends [`FrameType::SendPacket`] +7//! * server then sends [`FrameType::RecvPacket`] to recipient 8//! * server sends [`FrameType::NodeGone`] when the other client disconnects 9 10use bytes::{BufMut, Bytes, BytesMut}; @@ -21,668 +21,532 @@ 21/// including its on-wire framing overhead) 22pub const MAX_PACKET_SIZE: usize = 64 * 1024; 23 -24/// Maximum size a datagram payload is allowed to be. +24/// The maximum frame size. 25/// -26/// This is [`MAX_PACKET_SIZE`] minus the length of an encoded public key minus 3 bytes, -27/// one for ECN, and two for the segment size. -28pub const MAX_PAYLOAD_SIZE: usize = MAX_PACKET_SIZE - NodeId::LENGTH - 3; +26/// This is also the minimum burst size that a rate-limiter has to accept. +27#[cfg(not(wasm_browser))] +28pub(crate) const MAX_FRAME_SIZE: usize = 1024 * 1024; 29 -30/// The maximum frame size. +30/// Interval in which we ping the relay server to ensure the connection is alive. 31/// -32/// This is also the minimum burst size that a rate-limiter has to accept. -33#[cfg(not(wasm_browser))] -34pub(crate) const MAX_FRAME_SIZE: usize = 1024 * 1024; -35 -36/// Interval in which we ping the relay server to ensure the connection is alive. -37/// -38/// The default QUIC max_idle_timeout is 30s, so setting that to half this time gives some -39/// chance of recovering. -40#[cfg(feature = "server")] -41pub(crate) const PING_INTERVAL: Duration = Duration::from_secs(15); -42 -43/// The number of packets buffered for sending per client -44#[cfg(feature = "server")] -45pub(crate) const PER_CLIENT_SEND_QUEUE_DEPTH: usize = 512; -46 -47/// Protocol send errors. -48#[common_fields({ -49 backtrace: Option<Backtrace>, -50 #[snafu(implicit)] -51 span_trace: n0_snafu::SpanTrace, -52})] -53#[allow(missing_docs)] -54#[derive(Debug, Snafu)] -55#[non_exhaustive] -56pub enum Error { -57 #[snafu(display("unexpected frame: got {got}, expected {expected}"))] -58 UnexpectedFrame { got: FrameType, expected: FrameType }, -59 #[snafu(display("Frame is too large, has {frame_len} bytes"))] -60 FrameTooLarge { frame_len: usize }, -61 #[snafu(transparent)] -62 Timeout { source: time::Elapsed }, -63 #[snafu(transparent)] -64 SerDe { source: postcard::Error }, -65 #[snafu(transparent)] -66 FrameTypeError { source: FrameTypeError }, -67 #[snafu(display("Invalid public key"))] -68 InvalidPublicKey { source: SignatureError }, -69 #[snafu(display("Invalid frame encoding"))] -70 InvalidFrame {}, -71 #[snafu(display("Invalid frame type: {frame_type}"))] -72 InvalidFrameType { frame_type: FrameType }, -73 #[snafu(display("Invalid protocol message encoding"))] -74 InvalidProtocolMessageEncoding { source: std::str::Utf8Error }, -75 #[snafu(display("Too few bytes"))] -76 TooSmall {}, -77} -78 -79/// The messages that a relay sends to clients or the clients receive from the relay. -80#[derive(derive_more::Debug, Clone, PartialEq, Eq)] -81pub enum RelayToClientMsg { -82 /// Represents datagrams sent from relays (originally sent to them by another client). -83 Datagrams { -84 /// The [`NodeId`] of the original sender. -85 remote_node_id: NodeId, -86 /// The datagrams and related metadata. -87 datagrams: Datagrams, -88 }, -89 /// Indicates that the client identified by the underlying public key had previously sent you a -90 /// packet but has now disconnected from the relay. -91 NodeGone(NodeId), -92 /// A one-way message from relay to client, declaring the connection health state. -93 Health { -94 /// If set, is a description of why the connection is unhealthy. -95 /// -96 /// If `None` means the connection is healthy again. -97 /// -98 /// The default condition is healthy, so the relay doesn't broadcast a [`RelayToClientMsg::Health`] -99 /// until a problem exists. -100 problem: String, -101 }, -102 /// A one-way message from relay to client, advertising that the relay is restarting. -103 Restarting { -104 /// An advisory duration that the client should wait before attempting to reconnect. -105 /// It might be zero. It exists for the relay to smear out the reconnects. -106 reconnect_in: Duration, -107 /// An advisory duration for how long the client should attempt to reconnect -108 /// before giving up and proceeding with its normal connection failure logic. The interval -109 /// between retries is undefined for now. A relay should not send a `try_for` duration more -110 /// than a few seconds. -111 try_for: Duration, -112 }, -113 /// Request from the relay to reply to the -114 /// other side with a [`ClientToRelayMsg::Pong`] with the given payload. -115 Ping([u8; 8]), -116 /// Reply to a [`ClientToRelayMsg::Ping`] from a client -117 /// with the payload sent previously in the ping. -118 Pong([u8; 8]), -119} -120 -121/// Messages that clients send to relays. -122#[derive(Debug, Clone, PartialEq, Eq)] -123pub enum ClientToRelayMsg { -124 /// Request from the client to the server to reply to the -125 /// other side with a [`RelayToClientMsg::Pong`] with the given payload. -126 Ping([u8; 8]), -127 /// Reply to a [`RelayToClientMsg::Ping`] from a server -128 /// with the payload sent previously in the ping. -129 Pong([u8; 8]), -130 /// Request from the client to relay datagrams to given remote node. -131 Datagrams { -132 /// The remote node to relay to. -133 dst_node_id: NodeId, -134 /// The datagrams and related metadata to relay. -135 datagrams: Datagrams, -136 }, -137} -138 -139/// One or multiple datagrams being transferred via the relay. -140/// -141/// This type is modeled after [`quinn_proto::Transmit`] -142/// (or even more similarly `quinn_udp::Transmit`, but we don't depend on that library here). -143#[derive(derive_more::Debug, Clone, PartialEq, Eq)] -144pub struct Datagrams { -145 /// Explicit congestion notification bits -146 pub ecn: Option<quinn_proto::EcnCodepoint>, -147 /// The segment size if this transmission contains multiple datagrams. -148 /// This is `None` if the transmit only contains a single datagram -149 pub segment_size: Option<u16>, -150 /// The contents of the datagram(s) -151 #[debug(skip)] -152 pub contents: Bytes, -153} -154 -155impl<T: AsRef<[u8]>> From<T> for Datagrams { -156 fn from(bytes: T) -> Self { -157 Self { -158 ecn: None, -159 segment_size: None, -160 contents: Bytes::copy_from_slice(bytes.as_ref()), -161 } -162 } -163} -164 -165impl Datagrams { -166 fn write_to<O: BufMut>(&self, mut dst: O) -> O { -167 let ecn = self.ecn.map_or(0, |ecn| ecn as u8); -168 let segment_size = self.segment_size.unwrap_or_default(); -169 dst.put_u8(ecn); -170 dst.put_u16(segment_size); -171 dst.put(self.contents.as_ref()); -172 dst -173 } -174 -175 fn encoded_len(&self) -> usize { -176 1 // ECN byte -177 + 2 // segment size -178 + self.contents.len() -179 } -180 -181 fn from_bytes(bytes: Bytes) -> Result<Self, Error> { -182 // 1 bytes ECN, 2 bytes segment size -183 snafu::ensure!(bytes.len() > 3, InvalidFrameSnafu); -184 -185 let ecn_byte = bytes[0]; -186 let ecn = quinn_proto::EcnCodepoint::from_bits(ecn_byte); -187 -188 let segment_size = u16::from_be_bytes(bytes[1..3].try_into().expect("length checked")); -189 let segment_size = if segment_size == 0 { -190 None -191 } else { -192 Some(segment_size) -193 }; -194 -195 let contents = bytes.slice(3..); -196 -197 Ok(Self { -198 ecn, -199 segment_size, -200 contents, -201 }) -202 } -203} -204 -205impl RelayToClientMsg { -206 /// Returns this frame's corresponding frame type. -207 pub fn typ(&self) -> FrameType { -208 match self { -209 Self::Datagrams { .. } => FrameType::RelayToClientDatagrams, -210 Self::NodeGone { .. } => FrameType::NodeGone, -211 Self::Ping { .. } => FrameType::Ping, -212 Self::Pong { .. } => FrameType::Pong, -213 Self::Health { .. } => FrameType::Health, -214 Self::Restarting { .. } => FrameType::Restarting, -215 } -216 } -217 -218 #[cfg(feature = "server")] -219 pub(crate) fn to_bytes(&self) -> BytesMut { -220 self.write_to(BytesMut::with_capacity(self.encoded_len())) -221 } -222 -223 /// Encodes this frame for sending over websockets. -224 /// -225 /// Specifically meant for being put into a binary websocket message frame. -226 #[cfg(feature = "server")] -227 pub(crate) fn write_to<O: BufMut>(&self, mut dst: O) -> O { -228 dst = self.typ().write_to(dst); -229 match self { -230 Self::Datagrams { -231 remote_node_id, -232 datagrams, -233 } => { -234 dst.put(remote_node_id.as_ref()); -235 dst = datagrams.write_to(dst); +32/// The default QUIC max_idle_timeout is 30s, so setting that to half this time gives some +33/// chance of recovering. +34#[cfg(feature = "server")] +35pub(crate) const PING_INTERVAL: Duration = Duration::from_secs(15); +36 +37/// The number of packets buffered for sending per client +38#[cfg(feature = "server")] +39pub(crate) const PER_CLIENT_SEND_QUEUE_DEPTH: usize = 512; +40 +41/// Protocol send errors. +42#[common_fields({ +43 backtrace: Option<Backtrace>, +44 #[snafu(implicit)] +45 span_trace: n0_snafu::SpanTrace, +46})] +47#[allow(missing_docs)] +48#[derive(Debug, Snafu)] +49#[non_exhaustive] +50pub enum Error { +51 #[snafu(display("unexpected frame: got {got}, expected {expected}"))] +52 UnexpectedFrame { got: FrameType, expected: FrameType }, +53 #[snafu(display("Frame is too large, has {frame_len} bytes"))] +54 FrameTooLarge { frame_len: usize }, +55 #[snafu(transparent)] +56 Timeout { source: time::Elapsed }, +57 #[snafu(transparent)] +58 SerDe { source: postcard::Error }, +59 #[snafu(transparent)] +60 FrameTypeError { source: FrameTypeError }, +61 #[snafu(display("Invalid public key"))] +62 InvalidPublicKey { source: SignatureError }, +63 #[snafu(display("Invalid frame encoding"))] +64 InvalidFrame {}, +65 #[snafu(display("Invalid frame type: {frame_type}"))] +66 InvalidFrameType { frame_type: FrameType }, +67 #[snafu(display("Invalid protocol message encoding"))] +68 InvalidProtocolMessageEncoding { source: std::str::Utf8Error }, +69 #[snafu(display("Too few bytes"))] +70 TooSmall {}, +71} +72 +73/// The messages that a relay sends to clients or the clients receive from the relay. +74#[derive(derive_more::Debug, Clone, PartialEq, Eq)] +75pub enum RelayToClientMsg { +76 /// Represents datagrams sent from relays (originally sent to them by another client). +77 ReceivedPacket { +78 /// The [`NodeId`] of the original sender. +79 src_key: NodeId, +80 /// The received packet bytes. +81 #[debug(skip)] +82 content: Bytes, +83 }, +84 /// Indicates that the client identified by the underlying public key had previously sent you a +85 /// packet but has now disconnected from the relay. +86 NodeGone(NodeId), +87 /// A one-way message from relay to client, declaring the connection health state. +88 Health { +89 /// If set, is a description of why the connection is unhealthy. +90 /// +91 /// If `None` means the connection is healthy again. +92 /// +93 /// The default condition is healthy, so the relay doesn't broadcast a [`RelayToClientMsg::Health`] +94 /// until a problem exists. +95 problem: String, +96 }, +97 /// A one-way message from relay to client, advertising that the relay is restarting. +98 Restarting { +99 /// An advisory duration that the client should wait before attempting to reconnect. +100 /// It might be zero. It exists for the relay to smear out the reconnects. +101 reconnect_in: Duration, +102 /// An advisory duration for how long the client should attempt to reconnect +103 /// before giving up and proceeding with its normal connection failure logic. The interval +104 /// between retries is undefined for now. A relay should not send a `try_for` duration more +105 /// than a few seconds. +106 try_for: Duration, +107 }, +108 /// Request from the relay to reply to the +109 /// other side with a [`ClientToRelayMsg::Pong`] with the given payload. +110 Ping([u8; 8]), +111 /// Reply to a [`ClientToRelayMsg::Ping`] from a client +112 /// with the payload sent previously in the ping. +113 Pong([u8; 8]), +114} +115 +116/// Messages that clients send to relays. +117#[derive(Debug, Clone, PartialEq, Eq)] +118pub enum ClientToRelayMsg { +119 /// Request from the client to the server to reply to the +120 /// other side with a [`RelayToClientMsg::Pong`] with the given payload. +121 Ping([u8; 8]), +122 /// Reply to a [`RelayToClientMsg::Ping`] from a server +123 /// with the payload sent previously in the ping. +124 Pong([u8; 8]), +125 /// Request from the client to relay datagrams to given remote node. +126 SendPacket { +127 /// The remote node to relay to. +128 dst_key: NodeId, +129 /// The datagrams and related metadata to relay. +130 packet: Bytes, +131 }, +132} +133 +134impl RelayToClientMsg { +135 /// Returns this frame's corresponding frame type. +136 pub fn typ(&self) -> FrameType { +137 match self { +138 Self::ReceivedPacket { .. } => FrameType::RecvPacket, +139 Self::NodeGone { .. } => FrameType::NodeGone, +140 Self::Ping { .. } => FrameType::Ping, +141 Self::Pong { .. } => FrameType::Pong, +142 Self::Health { .. } => FrameType::Health, +143 Self::Restarting { .. } => FrameType::Restarting, +144 } +145 } +146 +147 #[cfg(feature = "server")] +148 pub(crate) fn to_bytes(&self) -> BytesMut { +149 self.write_to(BytesMut::with_capacity(self.encoded_len())) +150 } +151 +152 /// Encodes this frame for sending over websockets. +153 /// +154 /// Specifically meant for being put into a binary websocket message frame. +155 #[cfg(feature = "server")] +156 pub(crate) fn write_to<O: BufMut>(&self, mut dst: O) -> O { +157 dst = self.typ().write_to(dst); +158 match self { +159 Self::ReceivedPacket { +160 src_key: remote_node_id, +161 content, +162 } => { +163 dst.put(remote_node_id.as_ref()); +164 dst.put(content.as_ref()); +165 } +166 Self::NodeGone(node_id) => { +167 dst.put(node_id.as_ref()); +168 } +169 Self::Ping(data) => { +170 dst.put(&data[..]); +171 } +172 Self::Pong(data) => { +173 dst.put(&data[..]); +174 } +175 Self::Health { problem } => { +176 dst.put(problem.as_ref()); +177 } +178 Self::Restarting { +179 reconnect_in, +180 try_for, +181 } => { +182 dst.put_u32(reconnect_in.as_millis() as u32); +183 dst.put_u32(try_for.as_millis() as u32); +184 } +185 } +186 dst +187 } +188 +189 #[cfg(feature = "server")] +190 pub(crate) fn encoded_len(&self) -> usize { +191 let payload_len = match self { +192 Self::ReceivedPacket { content, .. } => { +193 32 // nodeid +194 + content.len() +195 } +196 Self::NodeGone(_) => 32, +197 Self::Ping(_) | Self::Pong(_) => 8, +198 Self::Health { problem } => problem.len(), +199 Self::Restarting { .. } => { +200 4 // u32 +201 + 4 // u32 +202 } +203 }; +204 1 // frame type +205 + payload_len +206 } +207 +208 /// Tries to decode a frame received over websockets. +209 /// +210 /// Specifically, bytes received from a binary websocket message frame. +211 #[allow(clippy::result_large_err)] +212 pub(crate) fn from_bytes(mut content: Bytes, cache: &KeyCache) -> Result<Self, Error> { +213 let frame_type = FrameType::from_bytes(&mut content)?; +214 let frame_len = content.len(); +215 snafu::ensure!( +216 frame_len <= MAX_PACKET_SIZE, +217 FrameTooLargeSnafu { frame_len } +218 ); +219 +220 let res = match frame_type { +221 FrameType::RecvPacket => { +222 snafu::ensure!(content.len() >= NodeId::LENGTH, InvalidFrameSnafu); +223 +224 let src_key = cache +225 .key_from_slice(&content[..NodeId::LENGTH]) +226 .context(InvalidPublicKeySnafu)?; +227 let content = content.slice(NodeId::LENGTH..); +228 Self::ReceivedPacket { src_key, content } +229 } +230 FrameType::NodeGone => { +231 snafu::ensure!(content.len() == NodeId::LENGTH, InvalidFrameSnafu); +232 let node_id = cache +233 .key_from_slice(content.as_ref()) +234 .context(InvalidPublicKeySnafu)?; +235 Self::NodeGone(node_id) 236 } -237 Self::NodeGone(node_id) => { -238 dst.put(node_id.as_ref()); -239 } -240 Self::Ping(data) => { -241 dst.put(&data[..]); +237 FrameType::Ping => { +238 snafu::ensure!(content.len() == 8, InvalidFrameSnafu); +239 let mut data = [0u8; 8]; +240 data.copy_from_slice(&content[..8]); +241 Self::Ping(data) 242 } -243 Self::Pong(data) => { -244 dst.put(&data[..]); -245 } -246 Self::Health { problem } => { -247 dst.put(problem.as_ref()); +243 FrameType::Pong => { +244 snafu::ensure!(content.len() == 8, InvalidFrameSnafu); +245 let mut data = [0u8; 8]; +246 data.copy_from_slice(&content[..8]); +247 Self::Pong(data) 248 } -249 Self::Restarting { -250 reconnect_in, -251 try_for, -252 } => { -253 dst.put_u32(reconnect_in.as_millis() as u32); -254 dst.put_u32(try_for.as_millis() as u32); -255 } -256 } -257 dst -258 } -259 -260 #[cfg(feature = "server")] -261 pub(crate) fn encoded_len(&self) -> usize { -262 let payload_len = match self { -263 Self::Datagrams { datagrams, .. } => { -264 32 // nodeid -265 + datagrams.encoded_len() -266 } -267 Self::NodeGone(_) => 32, -268 Self::Ping(_) | Self::Pong(_) => 8, -269 Self::Health { problem } => problem.len(), -270 Self::Restarting { .. } => { -271 4 // u32 -272 + 4 // u32 -273 } -274 }; -275 1 // frame type -276 + payload_len -277 } -278 -279 /// Tries to decode a frame received over websockets. -280 /// -281 /// Specifically, bytes received from a binary websocket message frame. -282 #[allow(clippy::result_large_err)] -283 pub(crate) fn from_bytes(mut content: Bytes, cache: &KeyCache) -> Result<Self, Error> { -284 let frame_type = FrameType::from_bytes(&mut content)?; -285 let frame_len = content.len(); -286 snafu::ensure!( -287 frame_len <= MAX_PACKET_SIZE, -288 FrameTooLargeSnafu { frame_len } -289 ); +249 FrameType::Health => { +250 let problem = std::str::from_utf8(&content) +251 .context(InvalidProtocolMessageEncodingSnafu)? +252 .to_owned(); +253 Self::Health { problem } +254 } +255 FrameType::Restarting => { +256 snafu::ensure!(content.len() == 4 + 4, InvalidFrameSnafu); +257 let reconnect_in = u32::from_be_bytes( +258 content[..4] +259 .try_into() +260 .map_err(|_| InvalidFrameSnafu.build())?, +261 ); +262 let try_for = u32::from_be_bytes( +263 content[4..] +264 .try_into() +265 .map_err(|_| InvalidFrameSnafu.build())?, +266 ); +267 let reconnect_in = Duration::from_millis(reconnect_in as u64); +268 let try_for = Duration::from_millis(try_for as u64); +269 Self::Restarting { +270 reconnect_in, +271 try_for, +272 } +273 } +274 _ => { +275 return Err(InvalidFrameTypeSnafu { frame_type }.build()); +276 } +277 }; +278 Ok(res) +279 } +280} +281 +282impl ClientToRelayMsg { +283 pub(crate) fn typ(&self) -> FrameType { +284 match self { +285 Self::SendPacket { .. } => FrameType::SendPacket, +286 Self::Ping { .. } => FrameType::Ping, +287 Self::Pong { .. } => FrameType::Pong, +288 } +289 } 290 -291 let res = match frame_type { -292 FrameType::RelayToClientDatagrams => { -293 snafu::ensure!(content.len() >= NodeId::LENGTH, InvalidFrameSnafu); +291 pub(crate) fn to_bytes(&self) -> BytesMut { +292 self.write_to(BytesMut::with_capacity(self.encoded_len())) +293 } 294 -295 let remote_node_id = cache -296 .key_from_slice(&content[..NodeId::LENGTH]) -297 .context(InvalidPublicKeySnafu)?; -298 let datagrams = Datagrams::from_bytes(content.slice(NodeId::LENGTH..))?; -299 Self::Datagrams { -300 remote_node_id, -301 datagrams, -302 } -303 } -304 FrameType::NodeGone => { -305 snafu::ensure!(content.len() == NodeId::LENGTH, InvalidFrameSnafu); -306 let node_id = cache -307 .key_from_slice(content.as_ref()) -308 .context(InvalidPublicKeySnafu)?; -309 Self::NodeGone(node_id) +295 /// Encodes this frame for sending over websockets. +296 /// +297 /// Specifically meant for being put into a binary websocket message frame. +298 pub(crate) fn write_to<O: BufMut>(&self, mut dst: O) -> O { +299 dst = self.typ().write_to(dst); +300 match self { +301 Self::SendPacket { dst_key, packet } => { +302 dst.put(dst_key.as_ref()); +303 dst.put(packet.as_ref()); +304 } +305 Self::Ping(data) => { +306 dst.put(&data[..]); +307 } +308 Self::Pong(data) => { +309 dst.put(&data[..]); 310 } -311 FrameType::Ping => { -312 snafu::ensure!(content.len() == 8, InvalidFrameSnafu); -313 let mut data = [0u8; 8]; -314 data.copy_from_slice(&content[..8]); -315 Self::Ping(data) -316 } -317 FrameType::Pong => { -318 snafu::ensure!(content.len() == 8, InvalidFrameSnafu); -319 let mut data = [0u8; 8]; -320 data.copy_from_slice(&content[..8]); -321 Self::Pong(data) -322 } -323 FrameType::Health => { -324 let problem = std::str::from_utf8(&content) -325 .context(InvalidProtocolMessageEncodingSnafu)? -326 .to_owned(); -327 Self::Health { problem } -328 } -329 FrameType::Restarting => { -330 snafu::ensure!(content.len() == 4 + 4, InvalidFrameSnafu); -331 let reconnect_in = u32::from_be_bytes( -332 content[..4] -333 .try_into() -334 .map_err(|_| InvalidFrameSnafu.build())?, -335 ); -336 let try_for = u32::from_be_bytes( -337 content[4..] -338 .try_into() -339 .map_err(|_| InvalidFrameSnafu.build())?, -340 ); -341 let reconnect_in = Duration::from_millis(reconnect_in as u64); -342 let try_for = Duration::from_millis(try_for as u64); -343 Self::Restarting { -344 reconnect_in, -345 try_for, -346 } +311 } +312 dst +313 } +314 +315 pub(crate) fn encoded_len(&self) -> usize { +316 let payload_len = match self { +317 Self::Ping(_) | Self::Pong(_) => 8, +318 Self::SendPacket { packet, .. } => { +319 32 // node id +320 + packet.len() +321 } +322 }; +323 1 // frame type (all frame types currently encode as 1 byte varint) +324 + payload_len +325 } +326 +327 /// Tries to decode a frame received over websockets. +328 /// +329 /// Specifically, bytes received from a binary websocket message frame. +330 #[allow(clippy::result_large_err)] +331 #[cfg(feature = "server")] +332 pub(crate) fn from_bytes(mut content: Bytes, cache: &KeyCache) -> Result<Self, Error> { +333 let frame_type = FrameType::from_bytes(&mut content)?; +334 let frame_len = content.len(); +335 snafu::ensure!( +336 frame_len <= MAX_PACKET_SIZE, +337 FrameTooLargeSnafu { frame_len } +338 ); +339 +340 let res = match frame_type { +341 FrameType::SendPacket => { +342 let dst_key = cache +343 .key_from_slice(&content[..NodeId::LENGTH]) +344 .context(InvalidPublicKeySnafu)?; +345 let packet = content.slice(NodeId::LENGTH..); +346 Self::SendPacket { dst_key, packet } 347 } -348 _ => { -349 return Err(InvalidFrameTypeSnafu { frame_type }.build()); -350 } -351 }; -352 Ok(res) -353 } -354} -355 -356impl ClientToRelayMsg { -357 pub(crate) fn typ(&self) -> FrameType { -358 match self { -359 Self::Datagrams { .. } => FrameType::ClientToRelayDatagrams, -360 Self::Ping { .. } => FrameType::Ping, -361 Self::Pong { .. } => FrameType::Pong, -362 } -363 } -364 -365 pub(crate) fn to_bytes(&self) -> BytesMut { -366 self.write_to(BytesMut::with_capacity(self.encoded_len())) -367 } -368 -369 /// Encodes this frame for sending over websockets. -370 /// -371 /// Specifically meant for being put into a binary websocket message frame. -372 pub(crate) fn write_to<O: BufMut>(&self, mut dst: O) -> O { -373 dst = self.typ().write_to(dst); -374 match self { -375 Self::Datagrams { -376 dst_node_id, -377 datagrams, -378 } => { -379 dst.put(dst_node_id.as_ref()); -380 dst = datagrams.write_to(dst); -381 } -382 Self::Ping(data) => { -383 dst.put(&data[..]); -384 } -385 Self::Pong(data) => { -386 dst.put(&data[..]); -387 } -388 } -389 dst -390 } -391 -392 pub(crate) fn encoded_len(&self) -> usize { -393 let payload_len = match self { -394 Self::Ping(_) | Self::Pong(_) => 8, -395 Self::Datagrams { datagrams, .. } => { -396 32 // node id -397 + datagrams.encoded_len() -398 } -399 }; -400 1 // frame type (all frame types currently encode as 1 byte varint) -401 + payload_len -402 } -403 -404 /// Tries to decode a frame received over websockets. -405 /// -406 /// Specifically, bytes received from a binary websocket message frame. -407 #[allow(clippy::result_large_err)] -408 #[cfg(feature = "server")] -409 pub(crate) fn from_bytes(mut content: Bytes, cache: &KeyCache) -> Result<Self, Error> { -410 let frame_type = FrameType::from_bytes(&mut content)?; -411 let frame_len = content.len(); -412 snafu::ensure!( -413 frame_len <= MAX_PACKET_SIZE, -414 FrameTooLargeSnafu { frame_len } -415 ); -416 -417 let res = match frame_type { -418 FrameType::ClientToRelayDatagrams => { -419 let dst_node_id = cache -420 .key_from_slice(&content[..NodeId::LENGTH]) -421 .context(InvalidPublicKeySnafu)?; -422 let datagrams = Datagrams::from_bytes(content.slice(NodeId::LENGTH..))?; -423 Self::Datagrams { -424 dst_node_id, -425 datagrams, -426 } -427 } -428 FrameType::Ping => { -429 snafu::ensure!(content.len() == 8, InvalidFrameSnafu); -430 let mut data = [0u8; 8]; -431 data.copy_from_slice(&content[..8]); -432 Self::Ping(data) -433 } -434 FrameType::Pong => { -435 snafu::ensure!(content.len() == 8, InvalidFrameSnafu); -436 let mut data = [0u8; 8]; -437 data.copy_from_slice(&content[..8]); -438 Self::Pong(data) -439 } -440 _ => { -441 return Err(InvalidFrameTypeSnafu { frame_type }.build()); -442 } -443 }; -444 Ok(res) -445 } -446} +348 FrameType::Ping => { +349 snafu::ensure!(content.len() == 8, InvalidFrameSnafu); +350 let mut data = [0u8; 8]; +351 data.copy_from_slice(&content[..8]); +352 Self::Ping(data) +353 } +354 FrameType::Pong => { +355 snafu::ensure!(content.len() == 8, InvalidFrameSnafu); +356 let mut data = [0u8; 8]; +357 data.copy_from_slice(&content[..8]); +358 Self::Pong(data) +359 } +360 _ => { +361 return Err(InvalidFrameTypeSnafu { frame_type }.build()); +362 } +363 }; +364 Ok(res) +365 } +366} +367 +368#[cfg(test)] +369#[cfg(feature = "server")] +370mod tests { +371 use data_encoding::HEXLOWER; +372 use iroh_base::SecretKey; +373 use n0_snafu::Result; +374 +375 use super::*; +376 +377 fn check_expected_bytes(frames: Vec<(Vec<u8>, &str)>) { +378 for (bytes, expected_hex) in frames { +379 let stripped: Vec<u8> = expected_hex +380 .chars() +381 .filter_map(|s| { +382 if s.is_ascii_whitespace() { +383 None +384 } else { +385 Some(s as u8) +386 } +387 }) +388 .collect(); +389 let expected_bytes = HEXLOWER.decode(&stripped).unwrap(); +390 assert_eq!(HEXLOWER.encode(&bytes), HEXLOWER.encode(&expected_bytes)); +391 } +392 } +393 +394 #[test] +395 fn test_server_client_frames_snapshot() -> Result { +396 let client_key = SecretKey::from_bytes(&[42u8; 32]); +397 +398 check_expected_bytes(vec![ +399 ( +400 RelayToClientMsg::Health { +401 problem: "Hello? Yes this is dog.".into(), +402 } +403 .write_to(Vec::new()), +404 "0b 48 65 6c 6c 6f 3f 20 59 65 73 20 74 68 69 73 +405 20 69 73 20 64 6f 67 2e", +406 ), +407 ( +408 RelayToClientMsg::NodeGone(client_key.public()).write_to(Vec::new()), +409 "08 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e +410 a7 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d +411 61", +412 ), +413 ( +414 RelayToClientMsg::Ping([42u8; 8]).write_to(Vec::new()), +415 "09 2a 2a 2a 2a 2a 2a 2a 2a", +416 ), +417 ( +418 RelayToClientMsg::Pong([42u8; 8]).write_to(Vec::new()), +419 "0a 2a 2a 2a 2a 2a 2a 2a 2a", +420 ), +421 ( +422 RelayToClientMsg::ReceivedPacket { +423 src_key: client_key.public(), +424 content: "Hello World!".into(), +425 } +426 .write_to(Vec::new()), +427 "06 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e +428 a7 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d +429 61 48 65 6c 6c 6f 20 57 6f 72 6c 64 21", +430 ), +431 ( +432 RelayToClientMsg::Restarting { +433 reconnect_in: Duration::from_millis(10), +434 try_for: Duration::from_millis(20), +435 } +436 .write_to(Vec::new()), +437 "0c 00 00 00 0a 00 00 00 14", +438 ), +439 ]); +440 +441 Ok(()) +442 } +443 +444 #[test] +445 fn test_client_server_frames_snapshot() -> Result { +446 let client_key = SecretKey::from_bytes(&[42u8; 32]); 447 -448#[cfg(test)] -449#[cfg(feature = "server")] -450mod tests { -451 use data_encoding::HEXLOWER; -452 use iroh_base::SecretKey; -453 use n0_snafu::Result; -454 -455 use super::*; -456 -457 fn check_expected_bytes(frames: Vec<(Vec<u8>, &str)>) { -458 for (bytes, expected_hex) in frames { -459 let stripped: Vec<u8> = expected_hex -460 .chars() -461 .filter_map(|s| { -462 if s.is_ascii_whitespace() { -463 None -464 } else { -465 Some(s as u8) -466 } -467 }) -468 .collect(); -469 let expected_bytes = HEXLOWER.decode(&stripped).unwrap(); -470 assert_eq!(HEXLOWER.encode(&bytes), HEXLOWER.encode(&expected_bytes)); -471 } -472 } -473 -474 #[test] -475 fn test_server_client_frames_snapshot() -> Result { -476 let client_key = SecretKey::from_bytes(&[42u8; 32]); +448 check_expected_bytes(vec![ +449 ( +450 ClientToRelayMsg::Ping([42u8; 8]).write_to(Vec::new()), +451 "09 2a 2a 2a 2a 2a 2a 2a 2a", +452 ), +453 ( +454 ClientToRelayMsg::Pong([42u8; 8]).write_to(Vec::new()), +455 "0a 2a 2a 2a 2a 2a 2a 2a 2a", +456 ), +457 ( +458 ClientToRelayMsg::SendPacket { +459 dst_key: client_key.public(), +460 packet: "Goodbye!".into(), +461 } +462 .write_to(Vec::new()), +463 "04 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e +464 a7 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d +465 61 47 6f 6f 64 62 79 65 21", +466 ), +467 ]); +468 +469 Ok(()) +470 } +471} +472 +473#[cfg(all(test, feature = "server"))] +474mod proptests { +475 use iroh_base::SecretKey; +476 use proptest::prelude::*; 477 -478 check_expected_bytes(vec![ -479 ( -480 RelayToClientMsg::Health { -481 problem: "Hello? Yes this is dog.".into(), -482 } -483 .write_to(Vec::new()), -484 "0a 48 65 6c 6c 6f 3f 20 59 65 73 20 74 68 69 73 -485 20 69 73 20 64 6f 67 2e", -486 ), -487 ( -488 RelayToClientMsg::NodeGone(client_key.public()).write_to(Vec::new()), -489 "07 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e -490 a7 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d -491 61", -492 ), -493 ( -494 RelayToClientMsg::Ping([42u8; 8]).write_to(Vec::new()), -495 "08 2a 2a 2a 2a 2a 2a 2a 2a", -496 ), -497 ( -498 RelayToClientMsg::Pong([42u8; 8]).write_to(Vec::new()), -499 "09 2a 2a 2a 2a 2a 2a 2a 2a", -500 ), -501 ( -502 RelayToClientMsg::Datagrams { -503 remote_node_id: client_key.public(), -504 datagrams: Datagrams { -505 ecn: Some(quinn::EcnCodepoint::Ce), -506 segment_size: Some(6), -507 contents: "Hello World!".into(), -508 }, -509 } -510 .write_to(Vec::new()), -511 // frame type -512 // public key first 16 bytes -513 // public key second 16 bytes -514 // ECN byte -515 // segment size -516 // hello world contents bytes -517 "06 -518 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e a7 -519 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d 61 -520 03 -521 00 06 -522 48 65 6c 6c 6f 20 57 6f 72 6c 64 21", -523 ), -524 ( -525 RelayToClientMsg::Restarting { -526 reconnect_in: Duration::from_millis(10), -527 try_for: Duration::from_millis(20), -528 } -529 .write_to(Vec::new()), -530 "0b 00 00 00 0a 00 00 00 14", -531 ), -532 ]); -533 -534 Ok(()) -535 } -536 -537 #[test] -538 fn test_client_server_frames_snapshot() -> Result { -539 let client_key = SecretKey::from_bytes(&[42u8; 32]); -540 -541 check_expected_bytes(vec![ -542 ( -543 ClientToRelayMsg::Ping([42u8; 8]).write_to(Vec::new()), -544 "08 2a 2a 2a 2a 2a 2a 2a 2a", -545 ), -546 ( -547 ClientToRelayMsg::Pong([42u8; 8]).write_to(Vec::new()), -548 "09 2a 2a 2a 2a 2a 2a 2a 2a", -549 ), -550 ( -551 ClientToRelayMsg::Datagrams { -552 dst_node_id: client_key.public(), -553 datagrams: Datagrams { -554 ecn: Some(quinn::EcnCodepoint::Ce), -555 segment_size: Some(6), -556 contents: "Hello World!".into(), -557 }, -558 } -559 .write_to(Vec::new()), -560 // frame type -561 // public key first 16 bytes -562 // public key second 16 bytes -563 // ECN byte -564 // segment size -565 // hello world contents -566 "05 -567 19 7f 6b 23 e1 6c 85 32 c6 ab c8 38 fa cd 5e a7 -568 89 be 0c 76 b2 92 03 34 03 9b fa 8b 3d 36 8d 61 -569 03 -570 00 06 -571 48 65 6c 6c 6f 20 57 6f 72 6c 64 21", -572 ), -573 ]); -574 -575 Ok(()) -576 } -577} -578 -579#[cfg(all(test, feature = "server"))] -580mod proptests { -581 use iroh_base::SecretKey; -582 use proptest::prelude::*; -583 -584 use super::*; -585 -586 fn secret_key() -> impl Strategy<Value = SecretKey> { -587 prop::array::uniform32(any::<u8>()).prop_map(SecretKey::from) -588 } -589 -590 fn key() -> impl Strategy<Value = NodeId> { -591 secret_key().prop_map(|key| key.public()) -592 } -593 -594 fn ecn() -> impl Strategy<Value = Option<quinn_proto::EcnCodepoint>> { -595 (0..=3).prop_map(|n| match n { -596 1 => Some(quinn_proto::EcnCodepoint::Ce), -597 2 => Some(quinn_proto::EcnCodepoint::Ect0), -598 3 => Some(quinn_proto::EcnCodepoint::Ect1), -599 _ => None, -600 }) -601 } -602 -603 fn datagrams() -> impl Strategy<Value = Datagrams> { -604 ( -605 ecn(), -606 prop::option::of(MAX_PAYLOAD_SIZE / 20..MAX_PAYLOAD_SIZE), -607 prop::collection::vec(any::<u8>(), 0..MAX_PAYLOAD_SIZE), -608 ) -609 .prop_map(|(ecn, segment_size, data)| Datagrams { -610 ecn, -611 segment_size: segment_size.map(|ss| std::cmp::min(data.len(), ss) as u16), -612 contents: Bytes::from(data), -613 }) -614 } -615 -616 /// Generates a random valid frame -617 fn server_client_frame() -> impl Strategy<Value = RelayToClientMsg> { -618 let recv_packet = (key(), datagrams()).prop_map(|(remote_node_id, datagrams)| { -619 RelayToClientMsg::Datagrams { -620 remote_node_id, -621 datagrams, -622 } -623 }); -624 let node_gone = key().prop_map(RelayToClientMsg::NodeGone); -625 let ping = prop::array::uniform8(any::<u8>()).prop_map(RelayToClientMsg::Ping); -626 let pong = prop::array::uniform8(any::<u8>()).prop_map(RelayToClientMsg::Pong); -627 let health = ".{0,65536}" -628 .prop_filter("exceeds MAX_PAYLOAD_SIZE", |s| { -629 s.len() < MAX_PAYLOAD_SIZE // a single unicode character can match a regex "." but take up multiple bytes -630 }) -631 .prop_map(|problem| RelayToClientMsg::Health { problem }); -632 let restarting = (any::<u32>(), any::<u32>()).prop_map(|(reconnect_in, try_for)| { -633 RelayToClientMsg::Restarting { -634 reconnect_in: Duration::from_millis(reconnect_in.into()), -635 try_for: Duration::from_millis(try_for.into()), -636 } -637 }); -638 prop_oneof![recv_packet, node_gone, ping, pong, health, restarting] -639 } -640 -641 fn client_server_frame() -> impl Strategy<Value = ClientToRelayMsg> { -642 let send_packet = -643 (key(), datagrams()).prop_map(|(dst_node_id, datagrams)| ClientToRelayMsg::Datagrams { -644 dst_node_id, -645 datagrams, -646 }); -647 let ping = prop::array::uniform8(any::<u8>()).prop_map(ClientToRelayMsg::Ping); -648 let pong = prop::array::uniform8(any::<u8>()).prop_map(ClientToRelayMsg::Pong); -649 prop_oneof![send_packet, ping, pong] -650 } -651 -652 proptest! { -653 #[test] -654 fn server_client_frame_roundtrip(frame in server_client_frame()) { -655 let encoded = frame.to_bytes().freeze(); -656 let decoded = RelayToClientMsg::from_bytes(encoded, &KeyCache::test()).unwrap(); -657 prop_assert_eq!(frame, decoded); -658 } -659 -660 #[test] -661 fn client_server_frame_roundtrip(frame in client_server_frame()) { -662 let encoded = frame.to_bytes().freeze(); -663 let decoded = ClientToRelayMsg::from_bytes(encoded, &KeyCache::test()).unwrap(); -664 prop_assert_eq!(frame, decoded); -665 } -666 -667 #[test] -668 fn server_client_frame_encoded_len(frame in server_client_frame()) { -669 let claimed_encoded_len = frame.encoded_len(); -670 let actual_encoded_len = frame.to_bytes().len(); -671 prop_assert_eq!(claimed_encoded_len, actual_encoded_len); -672 } -673 -674 #[test] -675 fn client_server_frame_encoded_len(frame in client_server_frame()) { -676 let claimed_encoded_len = frame.encoded_len(); -677 let actual_encoded_len = frame.to_bytes().len(); -678 prop_assert_eq!(claimed_encoded_len, actual_encoded_len); -679 } -680 -681 #[test] -682 fn datagrams_encoded_len(datagrams in datagrams()) { -683 let claimed_encoded_len = datagrams.encoded_len(); -684 let actual_encoded_len = datagrams.write_to(Vec::new()).len(); -685 prop_assert_eq!(claimed_encoded_len, actual_encoded_len); -686 } -687 } -688} \ No newline at end of file +478 use super::*; +479 +480 fn secret_key() -> impl Strategy<Value = SecretKey> { +481 prop::array::uniform32(any::<u8>()).prop_map(SecretKey::from) +482 } +483 +484 fn key() -> impl Strategy<Value = NodeId> { +485 secret_key().prop_map(|key| key.public()) +486 } +487 +488 /// Generates random data, up to the maximum packet size minus the given number of bytes +489 fn data(consumed: usize) -> impl Strategy<Value = Bytes> { +490 let len = MAX_PACKET_SIZE - consumed; +491 prop::collection::vec(any::<u8>(), 0..len).prop_map(Bytes::from) +492 } +493 +494 /// Generates a random valid frame +495 fn server_client_frame() -> impl Strategy<Value = RelayToClientMsg> { +496 let recv_packet = (key(), data(32)) +497 .prop_map(|(src_key, content)| RelayToClientMsg::ReceivedPacket { src_key, content }); +498 let node_gone = key().prop_map(|node_id| RelayToClientMsg::NodeGone(node_id)); +499 let ping = prop::array::uniform8(any::<u8>()).prop_map(RelayToClientMsg::Ping); +500 let pong = prop::array::uniform8(any::<u8>()).prop_map(RelayToClientMsg::Pong); +501 let health = ".{0,65536}" +502 .prop_filter("exceeds max payload size", |s| { +503 s.len() < 65536 // a single unicode character can match a regex "." but take up multiple bytes +504 }) +505 .prop_map(|problem| RelayToClientMsg::Health { problem }); +506 let restarting = (any::<u32>(), any::<u32>()).prop_map(|(reconnect_in, try_for)| { +507 RelayToClientMsg::Restarting { +508 reconnect_in: Duration::from_millis(reconnect_in.into()), +509 try_for: Duration::from_millis(try_for.into()), +510 } +511 }); +512 prop_oneof![recv_packet, node_gone, ping, pong, health, restarting] +513 } +514 +515 fn client_server_frame() -> impl Strategy<Value = ClientToRelayMsg> { +516 let send_packet = (key(), data(32)) +517 .prop_map(|(dst_key, packet)| ClientToRelayMsg::SendPacket { dst_key, packet }); +518 let ping = prop::array::uniform8(any::<u8>()).prop_map(ClientToRelayMsg::Ping); +519 let pong = prop::array::uniform8(any::<u8>()).prop_map(ClientToRelayMsg::Pong); +520 prop_oneof![send_packet, ping, pong] +521 } +522 +523 proptest! { +524 #[test] +525 fn server_client_frame_roundtrip(frame in server_client_frame()) { +526 let encoded = frame.to_bytes().freeze(); +527 let decoded = RelayToClientMsg::from_bytes(encoded, &KeyCache::test()).unwrap(); +528 prop_assert_eq!(frame, decoded); +529 } +530 +531 #[test] +532 fn client_server_frame_roundtrip(frame in client_server_frame()) { +533 let encoded = frame.to_bytes().freeze(); +534 let decoded = ClientToRelayMsg::from_bytes(encoded, &KeyCache::test()).unwrap(); +535 prop_assert_eq!(frame, decoded); +536 } +537 +538 #[test] +539 fn server_client_frame_encoded_len(frame in server_client_frame()) { +540 let claimed_encoded_len = frame.encoded_len(); +541 let actual_encoded_len = frame.to_bytes().len(); +542 prop_assert_eq!(claimed_encoded_len, actual_encoded_len); +543 } +544 +545 #[test] +546 fn client_server_frame_encoded_len(frame in client_server_frame()) { +547 let claimed_encoded_len = frame.encoded_len(); +548 let actual_encoded_len = frame.to_bytes().len(); +549 prop_assert_eq!(claimed_encoded_len, actual_encoded_len); +550 } +551 } +552} \ No newline at end of file diff --git a/pr/3331/docs/src/iroh_relay/server.rs.html b/pr/3331/docs/src/iroh_relay/server.rs.html index 11574d6cb2..25f98a16a4 100644 --- a/pr/3331/docs/src/iroh_relay/server.rs.html +++ b/pr/3331/docs/src/iroh_relay/server.rs.html @@ -750,316 +750,305 @@ 750mod tests { 751 use std::{net::Ipv4Addr, time::Duration}; 752 -753 use http::StatusCode; -754 use iroh_base::{NodeId, RelayUrl, SecretKey}; -755 use n0_future::{FutureExt, SinkExt, StreamExt}; -756 use n0_snafu::Result; -757 use tracing::{info, instrument}; -758 use tracing_test::traced_test; -759 -760 use super::{ -761 Access, AccessConfig, RelayConfig, Server, ServerConfig, SpawnError, -762 NO_CONTENT_CHALLENGE_HEADER, NO_CONTENT_RESPONSE_HEADER, -763 }; -764 use crate::{ -765 client::{ClientBuilder, ConnectError}, -766 dns::DnsResolver, -767 protos::{ -768 handshake, -769 relay::{ClientToRelayMsg, Datagrams, RelayToClientMsg}, -770 }, -771 }; -772 -773 async fn spawn_local_relay() -> std::result::Result<Server, SpawnError> { -774 Server::spawn(ServerConfig::<(), ()> { -775 relay: Some(RelayConfig::<(), ()> { -776 http_bind_addr: (Ipv4Addr::LOCALHOST, 0).into(), -777 tls: None, -778 limits: Default::default(), -779 key_cache_capacity: Some(1024), -780 access: AccessConfig::Everyone, -781 }), -782 quic: None, -783 metrics_addr: None, -784 }) -785 .await -786 } -787 -788 #[instrument] -789 async fn try_send_recv( -790 client_a: &mut crate::client::Client, -791 client_b: &mut crate::client::Client, -792 b_key: NodeId, -793 msg: Datagrams, -794 ) -> Result<RelayToClientMsg> { -795 // try resend 10 times -796 for _ in 0..10 { -797 client_a -798 .send(ClientToRelayMsg::Datagrams { -799 dst_node_id: b_key, -800 datagrams: msg.clone(), -801 }) -802 .await?; -803 let Ok(res) = tokio::time::timeout(Duration::from_millis(500), client_b.next()).await -804 else { -805 continue; -806 }; -807 let res = res.expect("stream finished")?; -808 return Ok(res); -809 } -810 panic!("failed to send and recv message"); -811 } -812 -813 fn dns_resolver() -> DnsResolver { -814 DnsResolver::new() -815 } -816 -817 #[tokio::test] -818 #[traced_test] -819 async fn test_no_services() { -820 let mut server = Server::spawn(ServerConfig::<(), ()>::default()) -821 .await -822 .unwrap(); -823 let res = tokio::time::timeout(Duration::from_secs(5), server.task_handle()) -824 .await -825 .expect("timeout, server not finished") -826 .expect("server task JoinError"); -827 assert!(res.is_err()); -828 } -829 -830 #[tokio::test] -831 #[traced_test] -832 async fn test_conflicting_bind() { -833 let mut server = Server::spawn(ServerConfig::<(), ()> { -834 relay: Some(RelayConfig { -835 http_bind_addr: (Ipv4Addr::LOCALHOST, 1234).into(), -836 tls: None, -837 limits: Default::default(), -838 key_cache_capacity: Some(1024), -839 access: AccessConfig::Everyone, -840 }), -841 quic: None, -842 metrics_addr: Some((Ipv4Addr::LOCALHOST, 1234).into()), -843 }) -844 .await -845 .unwrap(); -846 let res = tokio::time::timeout(Duration::from_secs(5), server.task_handle()) -847 .await -848 .expect("timeout, server not finished") -849 .expect("server task JoinError"); -850 assert!(res.is_err()); // AddrInUse -851 } -852 -853 #[tokio::test] -854 #[traced_test] -855 async fn test_root_handler() { -856 let server = spawn_local_relay().await.unwrap(); -857 let url = format!("http://{}", server.http_addr().unwrap()); -858 -859 let response = reqwest::get(&url).await.unwrap(); -860 assert_eq!(response.status(), 200); -861 let body = response.text().await.unwrap(); -862 assert!(body.contains("iroh.computer")); -863 } -864 -865 #[tokio::test] -866 #[traced_test] -867 async fn test_captive_portal_service() { -868 let server = spawn_local_relay().await.unwrap(); -869 let url = format!("http://{}/generate_204", server.http_addr().unwrap()); -870 let challenge = "123az__."; -871 -872 let client = reqwest::Client::new(); -873 let response = client -874 .get(&url) -875 .header(NO_CONTENT_CHALLENGE_HEADER, challenge) -876 .send() -877 .await -878 .unwrap(); -879 assert_eq!(response.status(), StatusCode::NO_CONTENT); -880 let header = response.headers().get(NO_CONTENT_RESPONSE_HEADER).unwrap(); -881 assert_eq!(header.to_str().unwrap(), format!("response {challenge}")); -882 let body = response.text().await.unwrap(); -883 assert!(body.is_empty()); -884 } -885 -886 #[tokio::test] -887 #[traced_test] -888 async fn test_relay_clients() -> Result<()> { -889 let server = spawn_local_relay().await?; -890 -891 let relay_url = format!("http://{}", server.http_addr().unwrap()); -892 let relay_url: RelayUrl = relay_url.parse()?; -893 -894 // set up client a -895 let a_secret_key = SecretKey::generate(rand::thread_rng()); -896 let a_key = a_secret_key.public(); -897 let resolver = dns_resolver(); -898 info!("client a build & connect"); -899 let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver.clone()) -900 .connect() -901 .await?; -902 -903 // set up client b -904 let b_secret_key = SecretKey::generate(rand::thread_rng()); -905 let b_key = b_secret_key.public(); -906 info!("client b build & connect"); -907 let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver.clone()) -908 .connect() -909 .await?; -910 -911 info!("sending a -> b"); -912 -913 // send message from a to b -914 let msg = Datagrams::from("hello, b"); -915 let res = try_send_recv(&mut client_a, &mut client_b, b_key, msg.clone()).await?; -916 let RelayToClientMsg::Datagrams { -917 remote_node_id, -918 datagrams, -919 } = res -920 else { -921 panic!("client_b received unexpected message {res:?}"); -922 }; +753 use bytes::Bytes; +754 use http::StatusCode; +755 use iroh_base::{NodeId, RelayUrl, SecretKey}; +756 use n0_future::{FutureExt, SinkExt, StreamExt}; +757 use n0_snafu::Result; +758 use tracing::{info, instrument}; +759 use tracing_test::traced_test; +760 +761 use super::{ +762 Access, AccessConfig, RelayConfig, Server, ServerConfig, SpawnError, +763 NO_CONTENT_CHALLENGE_HEADER, NO_CONTENT_RESPONSE_HEADER, +764 }; +765 use crate::{ +766 client::{ClientBuilder, ConnectError}, +767 dns::DnsResolver, +768 protos::{ +769 handshake, +770 relay::{ClientToRelayMsg, RelayToClientMsg}, +771 }, +772 }; +773 +774 async fn spawn_local_relay() -> std::result::Result<Server, SpawnError> { +775 Server::spawn(ServerConfig::<(), ()> { +776 relay: Some(RelayConfig::<(), ()> { +777 http_bind_addr: (Ipv4Addr::LOCALHOST, 0).into(), +778 tls: None, +779 limits: Default::default(), +780 key_cache_capacity: Some(1024), +781 access: AccessConfig::Everyone, +782 }), +783 quic: None, +784 metrics_addr: None, +785 }) +786 .await +787 } +788 +789 #[instrument] +790 async fn try_send_recv( +791 client_a: &mut crate::client::Client, +792 client_b: &mut crate::client::Client, +793 b_key: NodeId, +794 msg: Bytes, +795 ) -> Result<RelayToClientMsg> { +796 // try resend 10 times +797 for _ in 0..10 { +798 client_a +799 .send(ClientToRelayMsg::SendPacket { +800 dst_key: b_key, +801 packet: msg.clone(), +802 }) +803 .await?; +804 let Ok(res) = tokio::time::timeout(Duration::from_millis(500), client_b.next()).await +805 else { +806 continue; +807 }; +808 let res = res.expect("stream finished")?; +809 return Ok(res); +810 } +811 panic!("failed to send and recv message"); +812 } +813 +814 fn dns_resolver() -> DnsResolver { +815 DnsResolver::new() +816 } +817 +818 #[tokio::test] +819 #[traced_test] +820 async fn test_no_services() { +821 let mut server = Server::spawn(ServerConfig::<(), ()>::default()) +822 .await +823 .unwrap(); +824 let res = tokio::time::timeout(Duration::from_secs(5), server.task_handle()) +825 .await +826 .expect("timeout, server not finished") +827 .expect("server task JoinError"); +828 assert!(res.is_err()); +829 } +830 +831 #[tokio::test] +832 #[traced_test] +833 async fn test_conflicting_bind() { +834 let mut server = Server::spawn(ServerConfig::<(), ()> { +835 relay: Some(RelayConfig { +836 http_bind_addr: (Ipv4Addr::LOCALHOST, 1234).into(), +837 tls: None, +838 limits: Default::default(), +839 key_cache_capacity: Some(1024), +840 access: AccessConfig::Everyone, +841 }), +842 quic: None, +843 metrics_addr: Some((Ipv4Addr::LOCALHOST, 1234).into()), +844 }) +845 .await +846 .unwrap(); +847 let res = tokio::time::timeout(Duration::from_secs(5), server.task_handle()) +848 .await +849 .expect("timeout, server not finished") +850 .expect("server task JoinError"); +851 assert!(res.is_err()); // AddrInUse +852 } +853 +854 #[tokio::test] +855 #[traced_test] +856 async fn test_root_handler() { +857 let server = spawn_local_relay().await.unwrap(); +858 let url = format!("http://{}", server.http_addr().unwrap()); +859 +860 let response = reqwest::get(&url).await.unwrap(); +861 assert_eq!(response.status(), 200); +862 let body = response.text().await.unwrap(); +863 assert!(body.contains("iroh.computer")); +864 } +865 +866 #[tokio::test] +867 #[traced_test] +868 async fn test_captive_portal_service() { +869 let server = spawn_local_relay().await.unwrap(); +870 let url = format!("http://{}/generate_204", server.http_addr().unwrap()); +871 let challenge = "123az__."; +872 +873 let client = reqwest::Client::new(); +874 let response = client +875 .get(&url) +876 .header(NO_CONTENT_CHALLENGE_HEADER, challenge) +877 .send() +878 .await +879 .unwrap(); +880 assert_eq!(response.status(), StatusCode::NO_CONTENT); +881 let header = response.headers().get(NO_CONTENT_RESPONSE_HEADER).unwrap(); +882 assert_eq!(header.to_str().unwrap(), format!("response {challenge}")); +883 let body = response.text().await.unwrap(); +884 assert!(body.is_empty()); +885 } +886 +887 #[tokio::test] +888 #[traced_test] +889 async fn test_relay_clients() -> Result<()> { +890 let server = spawn_local_relay().await?; +891 +892 let relay_url = format!("http://{}", server.http_addr().unwrap()); +893 let relay_url: RelayUrl = relay_url.parse()?; +894 +895 // set up client a +896 let a_secret_key = SecretKey::generate(rand::thread_rng()); +897 let a_key = a_secret_key.public(); +898 let resolver = dns_resolver(); +899 info!("client a build & connect"); +900 let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver.clone()) +901 .connect() +902 .await?; +903 +904 // set up client b +905 let b_secret_key = SecretKey::generate(rand::thread_rng()); +906 let b_key = b_secret_key.public(); +907 info!("client b build & connect"); +908 let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver.clone()) +909 .connect() +910 .await?; +911 +912 info!("sending a -> b"); +913 +914 // send message from a to b +915 let msg = Bytes::from_static(b"hello, b"); +916 let res = try_send_recv(&mut client_a, &mut client_b, b_key, msg.clone()).await?; +917 let RelayToClientMsg::ReceivedPacket { src_key, content } = res else { +918 panic!("client_b received unexpected message {res:?}"); +919 }; +920 +921 assert_eq!(a_key, src_key); +922 assert_eq!(msg, content); 923 -924 assert_eq!(a_key, remote_node_id); -925 assert_eq!(msg, datagrams); -926 -927 info!("sending b -> a"); -928 // send message from b to a -929 let msg = Datagrams::from("howdy, a"); -930 let res = try_send_recv(&mut client_b, &mut client_a, a_key, msg.clone()).await?; -931 -932 let RelayToClientMsg::Datagrams { -933 remote_node_id, -934 datagrams, -935 } = res -936 else { -937 panic!("client_a received unexpected message {res:?}"); -938 }; -939 -940 assert_eq!(b_key, remote_node_id); -941 assert_eq!(msg, datagrams); -942 -943 Ok(()) -944 } -945 -946 #[tokio::test] -947 #[traced_test] -948 async fn test_relay_access_control() -> Result<()> { -949 let current_span = tracing::info_span!("this is a test"); -950 let _guard = current_span.enter(); -951 -952 let a_secret_key = SecretKey::generate(rand::thread_rng()); -953 let a_key = a_secret_key.public(); -954 -955 let server = Server::spawn(ServerConfig::<(), ()> { -956 relay: Some(RelayConfig::<(), ()> { -957 http_bind_addr: (Ipv4Addr::LOCALHOST, 0).into(), -958 tls: None, -959 limits: Default::default(), -960 key_cache_capacity: Some(1024), -961 access: AccessConfig::Restricted(Box::new(move |node_id| { -962 async move { -963 info!("checking {}", node_id); -964 // reject node a -965 if node_id == a_key { -966 Access::Deny -967 } else { -968 Access::Allow -969 } -970 } -971 .boxed() -972 })), -973 }), -974 quic: None, -975 metrics_addr: None, -976 }) -977 .await?; -978 -979 let relay_url = format!("http://{}", server.http_addr().unwrap()); -980 let relay_url: RelayUrl = relay_url.parse()?; -981 -982 // set up client a -983 let resolver = dns_resolver(); -984 let result = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver) -985 .connect() -986 .await; -987 -988 assert!( -989 matches!(result, Err(ConnectError::Handshake { source: handshake::Error::ServerDeniedAuth { reason, .. }, .. }) if reason == "not authorized") -990 ); -991 -992 // test that another client has access -993 -994 // set up client b -995 let b_secret_key = SecretKey::generate(rand::thread_rng()); -996 let b_key = b_secret_key.public(); -997 -998 let resolver = dns_resolver(); -999 let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver) -1000 .connect() -1001 .await?; -1002 -1003 // set up client c -1004 let c_secret_key = SecretKey::generate(rand::thread_rng()); -1005 let c_key = c_secret_key.public(); -1006 -1007 let resolver = dns_resolver(); -1008 let mut client_c = ClientBuilder::new(relay_url.clone(), c_secret_key, resolver) -1009 .connect() -1010 .await?; -1011 -1012 // send message from b to c -1013 let msg = Datagrams::from("hello, c"); -1014 let res = try_send_recv(&mut client_b, &mut client_c, c_key, msg.clone()).await?; +924 info!("sending b -> a"); +925 // send message from b to a +926 let msg = Bytes::from_static(b"howdy, a"); +927 let res = try_send_recv(&mut client_b, &mut client_a, a_key, msg.clone()).await?; +928 +929 let RelayToClientMsg::ReceivedPacket { src_key, content } = res else { +930 panic!("client_a received unexpected message {res:?}"); +931 }; +932 +933 assert_eq!(b_key, src_key); +934 assert_eq!(msg, content); +935 +936 Ok(()) +937 } +938 +939 #[tokio::test] +940 #[traced_test] +941 async fn test_relay_access_control() -> Result<()> { +942 let current_span = tracing::info_span!("this is a test"); +943 let _guard = current_span.enter(); +944 +945 let a_secret_key = SecretKey::generate(rand::thread_rng()); +946 let a_key = a_secret_key.public(); +947 +948 let server = Server::spawn(ServerConfig::<(), ()> { +949 relay: Some(RelayConfig::<(), ()> { +950 http_bind_addr: (Ipv4Addr::LOCALHOST, 0).into(), +951 tls: None, +952 limits: Default::default(), +953 key_cache_capacity: Some(1024), +954 access: AccessConfig::Restricted(Box::new(move |node_id| { +955 async move { +956 info!("checking {}", node_id); +957 // reject node a +958 if node_id == a_key { +959 Access::Deny +960 } else { +961 Access::Allow +962 } +963 } +964 .boxed() +965 })), +966 }), +967 quic: None, +968 metrics_addr: None, +969 }) +970 .await?; +971 +972 let relay_url = format!("http://{}", server.http_addr().unwrap()); +973 let relay_url: RelayUrl = relay_url.parse()?; +974 +975 // set up client a +976 let resolver = dns_resolver(); +977 let result = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver) +978 .connect() +979 .await; +980 +981 assert!( +982 matches!(result, Err(ConnectError::Handshake { source: handshake::Error::ServerDeniedAuth { reason, .. }, .. }) if reason == "not authorized") +983 ); +984 +985 // test that another client has access +986 +987 // set up client b +988 let b_secret_key = SecretKey::generate(rand::thread_rng()); +989 let b_key = b_secret_key.public(); +990 +991 let resolver = dns_resolver(); +992 let mut client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver) +993 .connect() +994 .await?; +995 +996 // set up client c +997 let c_secret_key = SecretKey::generate(rand::thread_rng()); +998 let c_key = c_secret_key.public(); +999 +1000 let resolver = dns_resolver(); +1001 let mut client_c = ClientBuilder::new(relay_url.clone(), c_secret_key, resolver) +1002 .connect() +1003 .await?; +1004 +1005 // send message from b to c +1006 let msg = Bytes::from_static(b"hello, c"); +1007 let res = try_send_recv(&mut client_b, &mut client_c, c_key, msg.clone()).await?; +1008 +1009 if let RelayToClientMsg::ReceivedPacket { src_key, content } = res { +1010 assert_eq!(b_key, src_key); +1011 assert_eq!(msg, content); +1012 } else { +1013 panic!("client_c received unexpected message {res:?}"); +1014 } 1015 -1016 if let RelayToClientMsg::Datagrams { -1017 remote_node_id, -1018 datagrams, -1019 } = res -1020 { -1021 assert_eq!(b_key, remote_node_id); -1022 assert_eq!(msg, datagrams); -1023 } else { -1024 panic!("client_c received unexpected message {res:?}"); -1025 } -1026 -1027 Ok(()) -1028 } -1029 -1030 #[tokio::test] -1031 #[traced_test] -1032 async fn test_relay_clients_full() -> Result<()> { -1033 let server = spawn_local_relay().await.unwrap(); -1034 let relay_url = format!("http://{}", server.http_addr().unwrap()); -1035 let relay_url: RelayUrl = relay_url.parse().unwrap(); -1036 -1037 // set up client a -1038 let a_secret_key = SecretKey::generate(rand::thread_rng()); -1039 let resolver = dns_resolver(); -1040 let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver.clone()) -1041 .connect() -1042 .await?; -1043 -1044 // set up client b -1045 let b_secret_key = SecretKey::generate(rand::thread_rng()); -1046 let b_key = b_secret_key.public(); -1047 let _client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver.clone()) -1048 .connect() -1049 .await?; -1050 -1051 // send messages from a to b, without b receiving anything. -1052 // we should still keep succeeding to send, even if the packet won't be forwarded -1053 // by the relay server because the server's send queue for b fills up. -1054 let msg = Datagrams::from("hello, b"); -1055 for _i in 0..1000 { -1056 client_a -1057 .send(ClientToRelayMsg::Datagrams { -1058 dst_node_id: b_key, -1059 datagrams: msg.clone(), -1060 }) -1061 .await?; -1062 } -1063 Ok(()) -1064 } -1065} \ No newline at end of file +1016 Ok(()) +1017 } +1018 +1019 #[tokio::test] +1020 #[traced_test] +1021 async fn test_relay_clients_full() -> Result<()> { +1022 let server = spawn_local_relay().await.unwrap(); +1023 let relay_url = format!("http://{}", server.http_addr().unwrap()); +1024 let relay_url: RelayUrl = relay_url.parse().unwrap(); +1025 +1026 // set up client a +1027 let a_secret_key = SecretKey::generate(rand::thread_rng()); +1028 let resolver = dns_resolver(); +1029 let mut client_a = ClientBuilder::new(relay_url.clone(), a_secret_key, resolver.clone()) +1030 .connect() +1031 .await?; +1032 +1033 // set up client b +1034 let b_secret_key = SecretKey::generate(rand::thread_rng()); +1035 let b_key = b_secret_key.public(); +1036 let _client_b = ClientBuilder::new(relay_url.clone(), b_secret_key, resolver.clone()) +1037 .connect() +1038 .await?; +1039 +1040 // send messages from a to b, without b receiving anything. +1041 // we should still keep succeeding to send, even if the packet won't be forwarded +1042 // by the relay server because the server's send queue for b fills up. +1043 let msg = Bytes::from_static(b"hello, b"); +1044 for _i in 0..1000 { +1045 client_a +1046 .send(ClientToRelayMsg::SendPacket { +1047 dst_key: b_key, +1048 packet: msg.clone(), +1049 }) +1050 .await?; +1051 } +1052 Ok(()) +1053 } +1054} \ No newline at end of file diff --git a/pr/3331/docs/src/iroh_relay/server/client.rs.html b/pr/3331/docs/src/iroh_relay/server/client.rs.html index 766eb2f294..01cdc6f927 100644 --- a/pr/3331/docs/src/iroh_relay/server/client.rs.html +++ b/pr/3331/docs/src/iroh_relay/server/client.rs.html @@ -2,775 +2,762 @@ 2 3use std::{collections::HashSet, sync::Arc, time::Duration}; 4 -5use iroh_base::NodeId; -6use n0_future::{SinkExt, StreamExt}; -7use nested_enum_utils::common_fields; -8use rand::Rng; -9use snafu::{Backtrace, GenerateImplicitData, Snafu}; -10use time::{Date, OffsetDateTime}; -11use tokio::{ -12 sync::mpsc::{self, error::TrySendError}, -13 time::MissedTickBehavior, -14}; -15use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle}; -16use tracing::{debug, trace, warn, Instrument}; -17 -18use crate::{ -19 protos::{ -20 disco, -21 relay::{ClientToRelayMsg, Datagrams, RelayToClientMsg, PING_INTERVAL}, -22 streams::StreamError, -23 }, -24 server::{ -25 clients::Clients, -26 metrics::Metrics, -27 streams::{RecvError, RelayedStream}, -28 }, -29 PingTracker, -30}; -31 -32/// A request to write a dataframe to a Client -33#[derive(Debug, Clone)] -34pub(super) struct Packet { -35 /// The sender of the packet -36 src: NodeId, -37 /// The data packet bytes. -38 data: Datagrams, -39} -40 -41/// Configuration for a [`Client`]. -42#[derive(Debug)] -43pub(super) struct Config { -44 pub(super) node_id: NodeId, -45 pub(super) stream: RelayedStream, -46 pub(super) write_timeout: Duration, -47 pub(super) channel_capacity: usize, -48} -49 -50/// The [`Server`] side representation of a [`Client`]'s connection. -51/// -52/// [`Server`]: crate::server::Server -53/// [`Client`]: crate::client::Client -54#[derive(Debug)] -55pub(super) struct Client { -56 /// Identity of the connected peer. -57 node_id: NodeId, -58 /// Connection identifier. -59 connection_id: u64, -60 /// Used to close the connection loop. -61 done: CancellationToken, -62 /// Actor handle. -63 handle: AbortOnDropHandle<()>, -64 /// Queue of packets intended for the client. -65 send_queue: mpsc::Sender<Packet>, -66 /// Queue of disco packets intended for the client. -67 disco_send_queue: mpsc::Sender<Packet>, -68 /// Channel to notify the client that a previous sender has disconnected. -69 peer_gone: mpsc::Sender<NodeId>, -70} -71 -72impl Client { -73 /// Creates a client from a connection & starts a read and write loop to handle io to and from -74 /// the client -75 /// Call [`Client::shutdown`] to close the read and write loops before dropping the [`Client`] -76 pub(super) fn new( -77 config: Config, -78 connection_id: u64, -79 clients: &Clients, -80 metrics: Arc<Metrics>, -81 ) -> Client { -82 let Config { -83 node_id, -84 stream, -85 write_timeout, -86 channel_capacity, -87 } = config; -88 -89 let done = CancellationToken::new(); -90 let (send_queue_s, send_queue_r) = mpsc::channel(channel_capacity); -91 -92 let (disco_send_queue_s, disco_send_queue_r) = mpsc::channel(channel_capacity); -93 let (peer_gone_s, peer_gone_r) = mpsc::channel(channel_capacity); -94 -95 let actor = Actor { -96 stream, -97 timeout: write_timeout, -98 send_queue: send_queue_r, -99 disco_send_queue: disco_send_queue_r, -100 node_gone: peer_gone_r, -101 node_id, -102 connection_id, -103 clients: clients.clone(), -104 client_counter: ClientCounter::default(), -105 ping_tracker: PingTracker::default(), -106 metrics, -107 }; -108 -109 // start io loop -110 let io_done = done.clone(); -111 let handle = tokio::task::spawn(actor.run(io_done).instrument(tracing::info_span!( -112 "client-connection-actor", -113 remote_node = %node_id.fmt_short(), -114 connection_id = connection_id -115 ))); -116 -117 Client { -118 node_id, -119 connection_id, -120 handle: AbortOnDropHandle::new(handle), -121 done, -122 send_queue: send_queue_s, -123 disco_send_queue: disco_send_queue_s, -124 peer_gone: peer_gone_s, -125 } -126 } -127 -128 pub(super) fn connection_id(&self) -> u64 { -129 self.connection_id -130 } -131 -132 /// Shutdown the reader and writer loops and closes the connection. -133 /// -134 /// Any shutdown errors will be logged as warnings. -135 pub(super) async fn shutdown(self) { -136 self.start_shutdown(); -137 if let Err(e) = self.handle.await { -138 warn!( -139 remote_node = %self.node_id.fmt_short(), -140 "error closing actor loop: {e:#?}", -141 ); -142 }; -143 } -144 -145 /// Starts the process of shutdown. -146 pub(super) fn start_shutdown(&self) { -147 self.done.cancel(); -148 } -149 -150 pub(super) fn try_send_packet( -151 &self, -152 src: NodeId, -153 data: Datagrams, -154 ) -> Result<(), TrySendError<Packet>> { -155 self.send_queue.try_send(Packet { src, data }) -156 } -157 -158 pub(super) fn try_send_disco_packet( -159 &self, -160 src: NodeId, -161 data: Datagrams, -162 ) -> Result<(), TrySendError<Packet>> { -163 self.disco_send_queue.try_send(Packet { src, data }) -164 } -165 -166 pub(super) fn try_send_peer_gone(&self, key: NodeId) -> Result<(), TrySendError<NodeId>> { -167 self.peer_gone.try_send(key) -168 } -169} -170 -171/// Error for [`Actor::handle_frame`] -172#[common_fields({ -173 backtrace: Option<Backtrace>, -174})] -175#[allow(missing_docs)] -176#[derive(Debug, Snafu)] -177#[non_exhaustive] -178pub enum HandleFrameError { -179 #[snafu(transparent)] -180 ForwardPacket { source: ForwardPacketError }, -181 #[snafu(display("Stream terminated"))] -182 StreamTerminated {}, -183 #[snafu(transparent)] -184 Recv { source: RecvError }, -185 #[snafu(transparent)] -186 Send { source: WriteFrameError }, -187} -188 -189/// Error for [`Actor::write_frame`] -190#[common_fields({ -191 backtrace: Option<Backtrace>, -192})] -193#[allow(missing_docs)] -194#[derive(Debug, Snafu)] -195#[non_exhaustive] -196pub enum WriteFrameError { -197 #[snafu(transparent)] -198 Stream { source: StreamError }, -199 #[snafu(transparent)] -200 Timeout { source: tokio::time::error::Elapsed }, -201} -202 -203/// Run error -204#[common_fields({ -205 backtrace: Option<Backtrace>, -206})] -207#[allow(missing_docs)] -208#[derive(Debug, Snafu)] -209#[non_exhaustive] -210pub enum RunError { -211 #[snafu(transparent)] -212 ForwardPacket { source: ForwardPacketError }, -213 #[snafu(display("Flush"))] -214 Flush { -215 #[snafu(implicit)] -216 span_trace: n0_snafu::SpanTrace, -217 }, -218 #[snafu(transparent)] -219 HandleFrame { source: HandleFrameError }, -220 #[snafu(display("Server.disco_send_queue dropped"))] -221 DiscoSendQueuePacketDrop { -222 #[snafu(implicit)] -223 span_trace: n0_snafu::SpanTrace, -224 }, -225 #[snafu(display("Failed to send disco packet"))] -226 DiscoPacketSend { -227 source: WriteFrameError, -228 #[snafu(implicit)] -229 span_trace: n0_snafu::SpanTrace, -230 }, -231 #[snafu(display("Server.send_queue dropped"))] -232 SendQueuePacketDrop { -233 #[snafu(implicit)] -234 span_trace: n0_snafu::SpanTrace, -235 }, -236 #[snafu(display("Failed to send packet"))] -237 PacketSend { -238 source: WriteFrameError, -239 #[snafu(implicit)] -240 span_trace: n0_snafu::SpanTrace, -241 }, -242 #[snafu(display("Server.node_gone dropped"))] -243 NodeGoneDrop { -244 #[snafu(implicit)] -245 span_trace: n0_snafu::SpanTrace, -246 }, -247 #[snafu(display("NodeGone write frame failed"))] -248 NodeGoneWriteFrame { -249 source: WriteFrameError, -250 #[snafu(implicit)] -251 span_trace: n0_snafu::SpanTrace, -252 }, -253 #[snafu(display("Keep alive write frame failed"))] -254 KeepAliveWriteFrame { -255 source: WriteFrameError, -256 #[snafu(implicit)] -257 span_trace: n0_snafu::SpanTrace, -258 }, -259 #[snafu(display("Tick flush"))] -260 TickFlush { -261 #[snafu(implicit)] -262 span_trace: n0_snafu::SpanTrace, -263 }, -264} -265 -266/// Manages all the reads and writes to this client. It periodically sends a `KEEP_ALIVE` -267/// message to the client to keep the connection alive. -268/// -269/// Call `run` to manage the input and output to and from the connection and the server. -270/// Once it hits its first write error or error receiving off a channel, -271/// it errors on return. -272/// If writes do not complete in the given `timeout`, it will also error. -273/// -274/// On the "write" side, the [`Actor`] can send the client: -275/// - a KEEP_ALIVE frame -276/// - a PEER_GONE frame to inform the client that a peer they have previously sent messages to -277/// is gone from the network -278/// - packets from other peers -279/// -280/// On the "read" side, it can: -281/// - receive a ping and write a pong back -282/// to speak to the node ID associated with that client. -283#[derive(Debug)] -284struct Actor { -285 /// IO Stream to talk to the client -286 stream: RelayedStream, -287 /// Maximum time we wait to complete a write to the client -288 timeout: Duration, -289 /// Packets queued to send to the client -290 send_queue: mpsc::Receiver<Packet>, -291 /// Important packets queued to send to the client -292 disco_send_queue: mpsc::Receiver<Packet>, -293 /// Notify the client that a previous sender has disconnected -294 node_gone: mpsc::Receiver<NodeId>, -295 /// [`NodeId`] of this client -296 node_id: NodeId, -297 /// Connection identifier. -298 connection_id: u64, -299 /// Reference to the other connected clients. -300 clients: Clients, -301 /// Statistics about the connected clients -302 client_counter: ClientCounter, -303 ping_tracker: PingTracker, -304 metrics: Arc<Metrics>, -305} -306 -307impl Actor { -308 async fn run(mut self, done: CancellationToken) { -309 // Note the accept and disconnects metrics must be in a pair. Technically the -310 // connection is accepted long before this in the HTTP server, but it is clearer to -311 // handle the metric here. -312 self.metrics.accepts.inc(); -313 if self.client_counter.update(self.node_id) { -314 self.metrics.unique_client_keys.inc(); -315 } -316 match self.run_inner(done).await { -317 Err(e) => { -318 warn!("actor errored {e:#}, exiting"); -319 } -320 Ok(()) => { -321 debug!("actor finished, exiting"); -322 } -323 } -324 -325 self.clients.unregister(self.connection_id, self.node_id); -326 self.metrics.disconnects.inc(); -327 } -328 -329 async fn run_inner(&mut self, done: CancellationToken) -> Result<(), RunError> { -330 use snafu::ResultExt; -331 -332 // Add some jitter to ping pong interactions, to avoid all pings being sent at the same time -333 let next_interval = || { -334 let random_secs = rand::rngs::OsRng.gen_range(1..=5); -335 Duration::from_secs(random_secs) + PING_INTERVAL -336 }; -337 -338 let mut ping_interval = tokio::time::interval(next_interval()); -339 // ticks immediately -340 ping_interval.set_missed_tick_behavior(MissedTickBehavior::Delay); -341 ping_interval.tick().await; -342 -343 loop { -344 tokio::select! { -345 biased; -346 -347 _ = done.cancelled() => { -348 trace!("actor loop cancelled, exiting"); -349 // final flush -350 self.stream.flush().await.map_err(|_| FlushSnafu.build())?; -351 break; -352 } -353 maybe_frame = self.stream.next() => { -354 self.handle_frame(maybe_frame).await?; -355 // reset the ping interval, we just received a message -356 ping_interval.reset(); -357 } -358 // First priority, disco packets -359 packet = self.disco_send_queue.recv() => { -360 let packet = packet.ok_or(DiscoSendQueuePacketDropSnafu.build())?; -361 self.send_disco_packet(packet).await.context(DiscoPacketSendSnafu)?; -362 } -363 // Second priority, sending regular packets -364 packet = self.send_queue.recv() => { -365 let packet = packet.ok_or(SendQueuePacketDropSnafu.build())?; -366 self.send_packet(packet).await.context(PacketSendSnafu)?; -367 } -368 // Last priority, sending left nodes -369 node_id = self.node_gone.recv() => { -370 let node_id = node_id.ok_or(NodeGoneDropSnafu.build())?; -371 trace!("node_id gone: {:?}", node_id); -372 self.write_frame(RelayToClientMsg::NodeGone(node_id)).await.context(NodeGoneWriteFrameSnafu)?; -373 } -374 _ = self.ping_tracker.timeout() => { -375 trace!("pong timed out"); -376 break; -377 } -378 _ = ping_interval.tick() => { -379 trace!("keep alive ping"); -380 // new interval -381 ping_interval.reset_after(next_interval()); -382 let data = self.ping_tracker.new_ping(); -383 self.write_frame(RelayToClientMsg::Ping(data)).await.context(KeepAliveWriteFrameSnafu)?; -384 } -385 } -386 -387 self.stream -388 .flush() -389 .await -390 .map_err(|_| TickFlushSnafu.build())?; -391 } -392 Ok(()) -393 } -394 -395 /// Writes the given frame to the connection. -396 /// -397 /// Errors if the send does not happen within the `timeout` duration -398 async fn write_frame(&mut self, frame: RelayToClientMsg) -> Result<(), WriteFrameError> { -399 tokio::time::timeout(self.timeout, self.stream.send(frame)).await??; -400 Ok(()) -401 } -402 -403 /// Writes contents to the client in a `RECV_PACKET` frame. -404 /// -405 /// Errors if the send does not happen within the `timeout` duration -406 /// Does not flush. -407 async fn send_raw(&mut self, packet: Packet) -> Result<(), WriteFrameError> { -408 let remote_node_id = packet.src; -409 let datagrams = packet.data; -410 -411 if let Ok(len) = datagrams.contents.len().try_into() { -412 self.metrics.bytes_sent.inc_by(len); -413 } -414 self.write_frame(RelayToClientMsg::Datagrams { -415 remote_node_id, -416 datagrams, -417 }) -418 .await -419 } -420 -421 async fn send_packet(&mut self, packet: Packet) -> Result<(), WriteFrameError> { -422 trace!("send packet"); -423 match self.send_raw(packet).await { -424 Ok(()) => { -425 self.metrics.send_packets_sent.inc(); -426 Ok(()) -427 } -428 Err(err) => { -429 self.metrics.send_packets_dropped.inc(); -430 Err(err) -431 } -432 } -433 } -434 -435 async fn send_disco_packet(&mut self, packet: Packet) -> Result<(), WriteFrameError> { -436 trace!("send disco packet"); -437 match self.send_raw(packet).await { -438 Ok(()) => { -439 self.metrics.disco_packets_sent.inc(); -440 Ok(()) -441 } -442 Err(err) => { -443 self.metrics.disco_packets_dropped.inc(); -444 Err(err) -445 } -446 } -447 } -448 -449 /// Handles frame read results. -450 async fn handle_frame( -451 &mut self, -452 maybe_frame: Option<Result<ClientToRelayMsg, RecvError>>, -453 ) -> Result<(), HandleFrameError> { -454 trace!(?maybe_frame, "handle incoming frame"); -455 let frame = match maybe_frame { -456 Some(frame) => frame?, -457 None => return Err(StreamTerminatedSnafu.build()), -458 }; -459 -460 match frame { -461 ClientToRelayMsg::Datagrams { -462 dst_node_id: dst_key, -463 datagrams, -464 } => { -465 let packet_len = datagrams.contents.len(); -466 if let Err(err @ ForwardPacketError { .. }) = -467 self.handle_frame_send_packet(dst_key, datagrams) -468 { -469 warn!("failed to handle send packet frame: {err:#}"); -470 } -471 self.metrics.bytes_recv.inc_by(packet_len as u64); -472 } -473 ClientToRelayMsg::Ping(data) => { -474 self.metrics.got_ping.inc(); -475 // TODO: add rate limiter -476 self.write_frame(RelayToClientMsg::Pong(data)).await?; -477 self.metrics.sent_pong.inc(); -478 } -479 ClientToRelayMsg::Pong(data) => { -480 self.ping_tracker.pong_received(data); -481 } -482 } -483 Ok(()) -484 } -485 -486 fn handle_frame_send_packet( -487 &self, -488 dst: NodeId, -489 data: Datagrams, -490 ) -> Result<(), ForwardPacketError> { -491 if disco::looks_like_disco_wrapper(&data.contents) { -492 self.metrics.disco_packets_recv.inc(); -493 self.clients -494 .send_disco_packet(dst, data, self.node_id, &self.metrics)?; -495 } else { -496 self.metrics.send_packets_recv.inc(); -497 self.clients -498 .send_packet(dst, data, self.node_id, &self.metrics)?; -499 } -500 Ok(()) -501 } -502} -503 -504#[derive(Debug)] -505pub(crate) enum PacketScope { -506 Disco, -507 Data, -508} -509 -510#[derive(Debug)] -511pub(crate) enum SendError { -512 Full, -513 Closed, -514} -515 -516#[derive(Debug, Snafu)] -517#[snafu(display("failed to forward {scope:?} packet: {reason:?}"))] -518pub(crate) struct ForwardPacketError { -519 scope: PacketScope, -520 reason: SendError, -521 backtrace: Option<snafu::Backtrace>, -522} -523 -524impl ForwardPacketError { -525 pub(crate) fn new(scope: PacketScope, reason: SendError) -> Self { -526 Self { -527 scope, -528 reason, -529 backtrace: GenerateImplicitData::generate(), -530 } -531 } -532} -533 -534/// Tracks how many unique nodes have been seen during the last day. -535#[derive(Debug)] -536struct ClientCounter { -537 clients: HashSet<NodeId>, -538 last_clear_date: Date, +5use bytes::Bytes; +6use iroh_base::NodeId; +7use n0_future::{SinkExt, StreamExt}; +8use nested_enum_utils::common_fields; +9use rand::Rng; +10use snafu::{Backtrace, GenerateImplicitData, Snafu}; +11use time::{Date, OffsetDateTime}; +12use tokio::{ +13 sync::mpsc::{self, error::TrySendError}, +14 time::MissedTickBehavior, +15}; +16use tokio_util::{sync::CancellationToken, task::AbortOnDropHandle}; +17use tracing::{debug, trace, warn, Instrument}; +18 +19use crate::{ +20 protos::{ +21 disco, +22 relay::{ClientToRelayMsg, RelayToClientMsg, PING_INTERVAL}, +23 streams::StreamError, +24 }, +25 server::{ +26 clients::Clients, +27 metrics::Metrics, +28 streams::{RecvError, RelayedStream}, +29 }, +30 PingTracker, +31}; +32 +33/// A request to write a dataframe to a Client +34#[derive(Debug, Clone)] +35pub(super) struct Packet { +36 /// The sender of the packet +37 src: NodeId, +38 /// The data packet bytes. +39 data: Bytes, +40} +41 +42/// Configuration for a [`Client`]. +43#[derive(Debug)] +44pub(super) struct Config { +45 pub(super) node_id: NodeId, +46 pub(super) stream: RelayedStream, +47 pub(super) write_timeout: Duration, +48 pub(super) channel_capacity: usize, +49} +50 +51/// The [`Server`] side representation of a [`Client`]'s connection. +52/// +53/// [`Server`]: crate::server::Server +54/// [`Client`]: crate::client::Client +55#[derive(Debug)] +56pub(super) struct Client { +57 /// Identity of the connected peer. +58 node_id: NodeId, +59 /// Connection identifier. +60 connection_id: u64, +61 /// Used to close the connection loop. +62 done: CancellationToken, +63 /// Actor handle. +64 handle: AbortOnDropHandle<()>, +65 /// Queue of packets intended for the client. +66 send_queue: mpsc::Sender<Packet>, +67 /// Queue of disco packets intended for the client. +68 disco_send_queue: mpsc::Sender<Packet>, +69 /// Channel to notify the client that a previous sender has disconnected. +70 peer_gone: mpsc::Sender<NodeId>, +71} +72 +73impl Client { +74 /// Creates a client from a connection & starts a read and write loop to handle io to and from +75 /// the client +76 /// Call [`Client::shutdown`] to close the read and write loops before dropping the [`Client`] +77 pub(super) fn new( +78 config: Config, +79 connection_id: u64, +80 clients: &Clients, +81 metrics: Arc<Metrics>, +82 ) -> Client { +83 let Config { +84 node_id, +85 stream, +86 write_timeout, +87 channel_capacity, +88 } = config; +89 +90 let done = CancellationToken::new(); +91 let (send_queue_s, send_queue_r) = mpsc::channel(channel_capacity); +92 +93 let (disco_send_queue_s, disco_send_queue_r) = mpsc::channel(channel_capacity); +94 let (peer_gone_s, peer_gone_r) = mpsc::channel(channel_capacity); +95 +96 let actor = Actor { +97 stream, +98 timeout: write_timeout, +99 send_queue: send_queue_r, +100 disco_send_queue: disco_send_queue_r, +101 node_gone: peer_gone_r, +102 node_id, +103 connection_id, +104 clients: clients.clone(), +105 client_counter: ClientCounter::default(), +106 ping_tracker: PingTracker::default(), +107 metrics, +108 }; +109 +110 // start io loop +111 let io_done = done.clone(); +112 let handle = tokio::task::spawn(actor.run(io_done).instrument(tracing::info_span!( +113 "client-connection-actor", +114 remote_node = %node_id.fmt_short(), +115 connection_id = connection_id +116 ))); +117 +118 Client { +119 node_id, +120 connection_id, +121 handle: AbortOnDropHandle::new(handle), +122 done, +123 send_queue: send_queue_s, +124 disco_send_queue: disco_send_queue_s, +125 peer_gone: peer_gone_s, +126 } +127 } +128 +129 pub(super) fn connection_id(&self) -> u64 { +130 self.connection_id +131 } +132 +133 /// Shutdown the reader and writer loops and closes the connection. +134 /// +135 /// Any shutdown errors will be logged as warnings. +136 pub(super) async fn shutdown(self) { +137 self.start_shutdown(); +138 if let Err(e) = self.handle.await { +139 warn!( +140 remote_node = %self.node_id.fmt_short(), +141 "error closing actor loop: {e:#?}", +142 ); +143 }; +144 } +145 +146 /// Starts the process of shutdown. +147 pub(super) fn start_shutdown(&self) { +148 self.done.cancel(); +149 } +150 +151 pub(super) fn try_send_packet( +152 &self, +153 src: NodeId, +154 data: Bytes, +155 ) -> Result<(), TrySendError<Packet>> { +156 self.send_queue.try_send(Packet { src, data }) +157 } +158 +159 pub(super) fn try_send_disco_packet( +160 &self, +161 src: NodeId, +162 data: Bytes, +163 ) -> Result<(), TrySendError<Packet>> { +164 self.disco_send_queue.try_send(Packet { src, data }) +165 } +166 +167 pub(super) fn try_send_peer_gone(&self, key: NodeId) -> Result<(), TrySendError<NodeId>> { +168 self.peer_gone.try_send(key) +169 } +170} +171 +172/// Error for [`Actor::handle_frame`] +173#[common_fields({ +174 backtrace: Option<Backtrace>, +175})] +176#[allow(missing_docs)] +177#[derive(Debug, Snafu)] +178#[non_exhaustive] +179pub enum HandleFrameError { +180 #[snafu(transparent)] +181 ForwardPacket { source: ForwardPacketError }, +182 #[snafu(display("Stream terminated"))] +183 StreamTerminated {}, +184 #[snafu(transparent)] +185 Recv { source: RecvError }, +186 #[snafu(transparent)] +187 Send { source: WriteFrameError }, +188} +189 +190/// Error for [`Actor::write_frame`] +191#[common_fields({ +192 backtrace: Option<Backtrace>, +193})] +194#[allow(missing_docs)] +195#[derive(Debug, Snafu)] +196#[non_exhaustive] +197pub enum WriteFrameError { +198 #[snafu(transparent)] +199 Stream { source: StreamError }, +200 #[snafu(transparent)] +201 Timeout { source: tokio::time::error::Elapsed }, +202} +203 +204/// Run error +205#[common_fields({ +206 backtrace: Option<Backtrace>, +207})] +208#[allow(missing_docs)] +209#[derive(Debug, Snafu)] +210#[non_exhaustive] +211pub enum RunError { +212 #[snafu(transparent)] +213 ForwardPacket { source: ForwardPacketError }, +214 #[snafu(display("Flush"))] +215 Flush { +216 #[snafu(implicit)] +217 span_trace: n0_snafu::SpanTrace, +218 }, +219 #[snafu(transparent)] +220 HandleFrame { source: HandleFrameError }, +221 #[snafu(display("Server.disco_send_queue dropped"))] +222 DiscoSendQueuePacketDrop { +223 #[snafu(implicit)] +224 span_trace: n0_snafu::SpanTrace, +225 }, +226 #[snafu(display("Failed to send disco packet"))] +227 DiscoPacketSend { +228 source: WriteFrameError, +229 #[snafu(implicit)] +230 span_trace: n0_snafu::SpanTrace, +231 }, +232 #[snafu(display("Server.send_queue dropped"))] +233 SendQueuePacketDrop { +234 #[snafu(implicit)] +235 span_trace: n0_snafu::SpanTrace, +236 }, +237 #[snafu(display("Failed to send packet"))] +238 PacketSend { +239 source: WriteFrameError, +240 #[snafu(implicit)] +241 span_trace: n0_snafu::SpanTrace, +242 }, +243 #[snafu(display("Server.node_gone dropped"))] +244 NodeGoneDrop { +245 #[snafu(implicit)] +246 span_trace: n0_snafu::SpanTrace, +247 }, +248 #[snafu(display("NodeGone write frame failed"))] +249 NodeGoneWriteFrame { +250 source: WriteFrameError, +251 #[snafu(implicit)] +252 span_trace: n0_snafu::SpanTrace, +253 }, +254 #[snafu(display("Keep alive write frame failed"))] +255 KeepAliveWriteFrame { +256 source: WriteFrameError, +257 #[snafu(implicit)] +258 span_trace: n0_snafu::SpanTrace, +259 }, +260 #[snafu(display("Tick flush"))] +261 TickFlush { +262 #[snafu(implicit)] +263 span_trace: n0_snafu::SpanTrace, +264 }, +265} +266 +267/// Manages all the reads and writes to this client. It periodically sends a `KEEP_ALIVE` +268/// message to the client to keep the connection alive. +269/// +270/// Call `run` to manage the input and output to and from the connection and the server. +271/// Once it hits its first write error or error receiving off a channel, +272/// it errors on return. +273/// If writes do not complete in the given `timeout`, it will also error. +274/// +275/// On the "write" side, the [`Actor`] can send the client: +276/// - a KEEP_ALIVE frame +277/// - a PEER_GONE frame to inform the client that a peer they have previously sent messages to +278/// is gone from the network +279/// - packets from other peers +280/// +281/// On the "read" side, it can: +282/// - receive a ping and write a pong back +283/// to speak to the node ID associated with that client. +284#[derive(Debug)] +285struct Actor { +286 /// IO Stream to talk to the client +287 stream: RelayedStream, +288 /// Maximum time we wait to complete a write to the client +289 timeout: Duration, +290 /// Packets queued to send to the client +291 send_queue: mpsc::Receiver<Packet>, +292 /// Important packets queued to send to the client +293 disco_send_queue: mpsc::Receiver<Packet>, +294 /// Notify the client that a previous sender has disconnected +295 node_gone: mpsc::Receiver<NodeId>, +296 /// [`NodeId`] of this client +297 node_id: NodeId, +298 /// Connection identifier. +299 connection_id: u64, +300 /// Reference to the other connected clients. +301 clients: Clients, +302 /// Statistics about the connected clients +303 client_counter: ClientCounter, +304 ping_tracker: PingTracker, +305 metrics: Arc<Metrics>, +306} +307 +308impl Actor { +309 async fn run(mut self, done: CancellationToken) { +310 // Note the accept and disconnects metrics must be in a pair. Technically the +311 // connection is accepted long before this in the HTTP server, but it is clearer to +312 // handle the metric here. +313 self.metrics.accepts.inc(); +314 if self.client_counter.update(self.node_id) { +315 self.metrics.unique_client_keys.inc(); +316 } +317 match self.run_inner(done).await { +318 Err(e) => { +319 warn!("actor errored {e:#}, exiting"); +320 } +321 Ok(()) => { +322 debug!("actor finished, exiting"); +323 } +324 } +325 +326 self.clients.unregister(self.connection_id, self.node_id); +327 self.metrics.disconnects.inc(); +328 } +329 +330 async fn run_inner(&mut self, done: CancellationToken) -> Result<(), RunError> { +331 use snafu::ResultExt; +332 +333 // Add some jitter to ping pong interactions, to avoid all pings being sent at the same time +334 let next_interval = || { +335 let random_secs = rand::rngs::OsRng.gen_range(1..=5); +336 Duration::from_secs(random_secs) + PING_INTERVAL +337 }; +338 +339 let mut ping_interval = tokio::time::interval(next_interval()); +340 // ticks immediately +341 ping_interval.set_missed_tick_behavior(MissedTickBehavior::Delay); +342 ping_interval.tick().await; +343 +344 loop { +345 tokio::select! { +346 biased; +347 +348 _ = done.cancelled() => { +349 trace!("actor loop cancelled, exiting"); +350 // final flush +351 self.stream.flush().await.map_err(|_| FlushSnafu.build())?; +352 break; +353 } +354 maybe_frame = self.stream.next() => { +355 self.handle_frame(maybe_frame).await?; +356 // reset the ping interval, we just received a message +357 ping_interval.reset(); +358 } +359 // First priority, disco packets +360 packet = self.disco_send_queue.recv() => { +361 let packet = packet.ok_or(DiscoSendQueuePacketDropSnafu.build())?; +362 self.send_disco_packet(packet).await.context(DiscoPacketSendSnafu)?; +363 } +364 // Second priority, sending regular packets +365 packet = self.send_queue.recv() => { +366 let packet = packet.ok_or(SendQueuePacketDropSnafu.build())?; +367 self.send_packet(packet).await.context(PacketSendSnafu)?; +368 } +369 // Last priority, sending left nodes +370 node_id = self.node_gone.recv() => { +371 let node_id = node_id.ok_or(NodeGoneDropSnafu.build())?; +372 trace!("node_id gone: {:?}", node_id); +373 self.write_frame(RelayToClientMsg::NodeGone(node_id)).await.context(NodeGoneWriteFrameSnafu)?; +374 } +375 _ = self.ping_tracker.timeout() => { +376 trace!("pong timed out"); +377 break; +378 } +379 _ = ping_interval.tick() => { +380 trace!("keep alive ping"); +381 // new interval +382 ping_interval.reset_after(next_interval()); +383 let data = self.ping_tracker.new_ping(); +384 self.write_frame(RelayToClientMsg::Ping(data)).await.context(KeepAliveWriteFrameSnafu)?; +385 } +386 } +387 +388 self.stream +389 .flush() +390 .await +391 .map_err(|_| TickFlushSnafu.build())?; +392 } +393 Ok(()) +394 } +395 +396 /// Writes the given frame to the connection. +397 /// +398 /// Errors if the send does not happen within the `timeout` duration +399 async fn write_frame(&mut self, frame: RelayToClientMsg) -> Result<(), WriteFrameError> { +400 tokio::time::timeout(self.timeout, self.stream.send(frame)).await??; +401 Ok(()) +402 } +403 +404 /// Writes contents to the client in a `RECV_PACKET` frame. +405 /// +406 /// Errors if the send does not happen within the `timeout` duration +407 /// Does not flush. +408 async fn send_raw(&mut self, packet: Packet) -> Result<(), WriteFrameError> { +409 let src_key = packet.src; +410 let content = packet.data; +411 +412 if let Ok(len) = content.len().try_into() { +413 self.metrics.bytes_sent.inc_by(len); +414 } +415 self.write_frame(RelayToClientMsg::ReceivedPacket { src_key, content }) +416 .await +417 } +418 +419 async fn send_packet(&mut self, packet: Packet) -> Result<(), WriteFrameError> { +420 trace!("send packet"); +421 match self.send_raw(packet).await { +422 Ok(()) => { +423 self.metrics.send_packets_sent.inc(); +424 Ok(()) +425 } +426 Err(err) => { +427 self.metrics.send_packets_dropped.inc(); +428 Err(err) +429 } +430 } +431 } +432 +433 async fn send_disco_packet(&mut self, packet: Packet) -> Result<(), WriteFrameError> { +434 trace!("send disco packet"); +435 match self.send_raw(packet).await { +436 Ok(()) => { +437 self.metrics.disco_packets_sent.inc(); +438 Ok(()) +439 } +440 Err(err) => { +441 self.metrics.disco_packets_dropped.inc(); +442 Err(err) +443 } +444 } +445 } +446 +447 /// Handles frame read results. +448 async fn handle_frame( +449 &mut self, +450 maybe_frame: Option<Result<ClientToRelayMsg, RecvError>>, +451 ) -> Result<(), HandleFrameError> { +452 trace!(?maybe_frame, "handle incoming frame"); +453 let frame = match maybe_frame { +454 Some(frame) => frame?, +455 None => return Err(StreamTerminatedSnafu.build()), +456 }; +457 +458 match frame { +459 ClientToRelayMsg::SendPacket { dst_key, packet } => { +460 let packet_len = packet.len(); +461 if let Err(err @ ForwardPacketError { .. }) = +462 self.handle_frame_send_packet(dst_key, packet) +463 { +464 warn!("failed to handle send packet frame: {err:#}"); +465 } +466 self.metrics.bytes_recv.inc_by(packet_len as u64); +467 } +468 ClientToRelayMsg::Ping(data) => { +469 self.metrics.got_ping.inc(); +470 // TODO: add rate limiter +471 self.write_frame(RelayToClientMsg::Pong(data)).await?; +472 self.metrics.sent_pong.inc(); +473 } +474 ClientToRelayMsg::Pong(data) => { +475 self.ping_tracker.pong_received(data); +476 } +477 } +478 Ok(()) +479 } +480 +481 fn handle_frame_send_packet(&self, dst: NodeId, data: Bytes) -> Result<(), ForwardPacketError> { +482 if disco::looks_like_disco_wrapper(&data) { +483 self.metrics.disco_packets_recv.inc(); +484 self.clients +485 .send_disco_packet(dst, data, self.node_id, &self.metrics)?; +486 } else { +487 self.metrics.send_packets_recv.inc(); +488 self.clients +489 .send_packet(dst, data, self.node_id, &self.metrics)?; +490 } +491 Ok(()) +492 } +493} +494 +495#[derive(Debug)] +496pub(crate) enum PacketScope { +497 Disco, +498 Data, +499} +500 +501#[derive(Debug)] +502pub(crate) enum SendError { +503 Full, +504 Closed, +505} +506 +507#[derive(Debug, Snafu)] +508#[snafu(display("failed to forward {scope:?} packet: {reason:?}"))] +509pub(crate) struct ForwardPacketError { +510 scope: PacketScope, +511 reason: SendError, +512 backtrace: Option<snafu::Backtrace>, +513} +514 +515impl ForwardPacketError { +516 pub(crate) fn new(scope: PacketScope, reason: SendError) -> Self { +517 Self { +518 scope, +519 reason, +520 backtrace: GenerateImplicitData::generate(), +521 } +522 } +523} +524 +525/// Tracks how many unique nodes have been seen during the last day. +526#[derive(Debug)] +527struct ClientCounter { +528 clients: HashSet<NodeId>, +529 last_clear_date: Date, +530} +531 +532impl Default for ClientCounter { +533 fn default() -> Self { +534 Self { +535 clients: HashSet::new(), +536 last_clear_date: OffsetDateTime::now_utc().date(), +537 } +538 } 539} 540 -541impl Default for ClientCounter { -542 fn default() -> Self { -543 Self { -544 clients: HashSet::new(), -545 last_clear_date: OffsetDateTime::now_utc().date(), -546 } -547 } -548} +541impl ClientCounter { +542 fn check_and_clear(&mut self) { +543 let today = OffsetDateTime::now_utc().date(); +544 if today != self.last_clear_date { +545 self.clients.clear(); +546 self.last_clear_date = today; +547 } +548 } 549 -550impl ClientCounter { -551 fn check_and_clear(&mut self) { -552 let today = OffsetDateTime::now_utc().date(); -553 if today != self.last_clear_date { -554 self.clients.clear(); -555 self.last_clear_date = today; -556 } -557 } -558 -559 /// Marks this node as seen, returns whether it is new today or not. -560 fn update(&mut self, client: NodeId) -> bool { -561 self.check_and_clear(); -562 self.clients.insert(client) -563 } -564} -565 -566#[cfg(test)] -567mod tests { -568 use iroh_base::SecretKey; -569 use n0_future::Stream; -570 use n0_snafu::{Result, ResultExt}; -571 use tracing::info; -572 use tracing_test::traced_test; -573 -574 use super::*; -575 use crate::{client::conn::Conn, protos::common::FrameType}; -576 -577 async fn recv_frame< -578 E: snafu::Error + Sync + Send + 'static, -579 S: Stream<Item = Result<RelayToClientMsg, E>> + Unpin, -580 >( -581 frame_type: FrameType, -582 mut stream: S, -583 ) -> Result<RelayToClientMsg> { -584 match stream.next().await { -585 Some(Ok(frame)) => { -586 if frame_type != frame.typ() { -587 snafu::whatever!( -588 "Unexpected frame, got {}, but expected {}", -589 frame.typ(), -590 frame_type -591 ); -592 } -593 Ok(frame) -594 } -595 Some(Err(err)) => Err(err).e(), -596 None => snafu::whatever!("Unexpected EOF, expected frame {frame_type}"), -597 } -598 } -599 -600 #[tokio::test] -601 #[traced_test] -602 async fn test_client_actor_basic() -> Result { -603 let (send_queue_s, send_queue_r) = mpsc::channel(10); -604 let (disco_send_queue_s, disco_send_queue_r) = mpsc::channel(10); -605 let (peer_gone_s, peer_gone_r) = mpsc::channel(10); -606 -607 let node_id = SecretKey::generate(rand::thread_rng()).public(); -608 let (io, io_rw) = tokio::io::duplex(1024); -609 let mut io_rw = Conn::test(io_rw); -610 let stream = RelayedStream::test(io); -611 -612 let clients = Clients::default(); -613 let metrics = Arc::new(Metrics::default()); -614 let actor = Actor { -615 stream, -616 timeout: Duration::from_secs(1), -617 send_queue: send_queue_r, -618 disco_send_queue: disco_send_queue_r, -619 node_gone: peer_gone_r, -620 connection_id: 0, -621 node_id, -622 clients: clients.clone(), -623 client_counter: ClientCounter::default(), -624 ping_tracker: PingTracker::default(), -625 metrics, -626 }; -627 -628 let done = CancellationToken::new(); -629 let io_done = done.clone(); -630 let handle = tokio::task::spawn(async move { actor.run(io_done).await }); -631 -632 // Write tests -633 println!("-- write"); -634 let data = b"hello world!"; -635 -636 // send packet -637 println!(" send packet"); -638 let packet = Packet { -639 src: node_id, -640 data: Datagrams::from(&data[..]), -641 }; -642 send_queue_s.send(packet.clone()).await.context("send")?; -643 let frame = recv_frame(FrameType::RelayToClientDatagrams, &mut io_rw) -644 .await -645 .e()?; -646 assert_eq!( -647 frame, -648 RelayToClientMsg::Datagrams { -649 remote_node_id: node_id, -650 datagrams: data.to_vec().into() -651 } -652 ); -653 -654 // send disco packet -655 println!(" send disco packet"); -656 disco_send_queue_s -657 .send(packet.clone()) -658 .await -659 .context("send")?; -660 let frame = recv_frame(FrameType::RelayToClientDatagrams, &mut io_rw) -661 .await -662 .e()?; -663 assert_eq!( -664 frame, -665 RelayToClientMsg::Datagrams { -666 remote_node_id: node_id, -667 datagrams: data.to_vec().into() -668 } -669 ); +550 /// Marks this node as seen, returns whether it is new today or not. +551 fn update(&mut self, client: NodeId) -> bool { +552 self.check_and_clear(); +553 self.clients.insert(client) +554 } +555} +556 +557#[cfg(test)] +558mod tests { +559 use iroh_base::SecretKey; +560 use n0_future::Stream; +561 use n0_snafu::{Result, ResultExt}; +562 use tracing::info; +563 use tracing_test::traced_test; +564 +565 use super::*; +566 use crate::{client::conn::Conn, protos::common::FrameType}; +567 +568 async fn recv_frame< +569 E: snafu::Error + Sync + Send + 'static, +570 S: Stream<Item = Result<RelayToClientMsg, E>> + Unpin, +571 >( +572 frame_type: FrameType, +573 mut stream: S, +574 ) -> Result<RelayToClientMsg> { +575 match stream.next().await { +576 Some(Ok(frame)) => { +577 if frame_type != frame.typ() { +578 snafu::whatever!( +579 "Unexpected frame, got {}, but expected {}", +580 frame.typ(), +581 frame_type +582 ); +583 } +584 Ok(frame) +585 } +586 Some(Err(err)) => Err(err).e(), +587 None => snafu::whatever!("Unexpected EOF, expected frame {frame_type}"), +588 } +589 } +590 +591 #[tokio::test] +592 #[traced_test] +593 async fn test_client_actor_basic() -> Result { +594 let (send_queue_s, send_queue_r) = mpsc::channel(10); +595 let (disco_send_queue_s, disco_send_queue_r) = mpsc::channel(10); +596 let (peer_gone_s, peer_gone_r) = mpsc::channel(10); +597 +598 let node_id = SecretKey::generate(rand::thread_rng()).public(); +599 let (io, io_rw) = tokio::io::duplex(1024); +600 let mut io_rw = Conn::test(io_rw); +601 let stream = RelayedStream::test(io); +602 +603 let clients = Clients::default(); +604 let metrics = Arc::new(Metrics::default()); +605 let actor = Actor { +606 stream, +607 timeout: Duration::from_secs(1), +608 send_queue: send_queue_r, +609 disco_send_queue: disco_send_queue_r, +610 node_gone: peer_gone_r, +611 connection_id: 0, +612 node_id, +613 clients: clients.clone(), +614 client_counter: ClientCounter::default(), +615 ping_tracker: PingTracker::default(), +616 metrics, +617 }; +618 +619 let done = CancellationToken::new(); +620 let io_done = done.clone(); +621 let handle = tokio::task::spawn(async move { actor.run(io_done).await }); +622 +623 // Write tests +624 println!("-- write"); +625 let data = b"hello world!"; +626 +627 // send packet +628 println!(" send packet"); +629 let packet = Packet { +630 src: node_id, +631 data: Bytes::from(&data[..]), +632 }; +633 send_queue_s.send(packet.clone()).await.context("send")?; +634 let frame = recv_frame(FrameType::RecvPacket, &mut io_rw).await.e()?; +635 assert_eq!( +636 frame, +637 RelayToClientMsg::ReceivedPacket { +638 src_key: node_id, +639 content: data.to_vec().into() +640 } +641 ); +642 +643 // send disco packet +644 println!(" send disco packet"); +645 disco_send_queue_s +646 .send(packet.clone()) +647 .await +648 .context("send")?; +649 let frame = recv_frame(FrameType::RecvPacket, &mut io_rw).await.e()?; +650 assert_eq!( +651 frame, +652 RelayToClientMsg::ReceivedPacket { +653 src_key: node_id, +654 content: data.to_vec().into() +655 } +656 ); +657 +658 // send peer_gone +659 println!("send peer gone"); +660 peer_gone_s.send(node_id).await.context("send")?; +661 let frame = recv_frame(FrameType::NodeGone, &mut io_rw).await.e()?; +662 assert_eq!(frame, RelayToClientMsg::NodeGone(node_id)); +663 +664 // Read tests +665 println!("--read"); +666 +667 // send ping, expect pong +668 let data = b"pingpong"; +669 io_rw.send(ClientToRelayMsg::Ping(*data)).await?; 670 -671 // send peer_gone -672 println!("send peer gone"); -673 peer_gone_s.send(node_id).await.context("send")?; -674 let frame = recv_frame(FrameType::NodeGone, &mut io_rw).await.e()?; -675 assert_eq!(frame, RelayToClientMsg::NodeGone(node_id)); -676 -677 // Read tests -678 println!("--read"); -679 -680 // send ping, expect pong -681 let data = b"pingpong"; -682 io_rw.send(ClientToRelayMsg::Ping(*data)).await?; -683 -684 // recv pong -685 println!(" recv pong"); -686 let frame = recv_frame(FrameType::Pong, &mut io_rw).await?; -687 assert_eq!(frame, RelayToClientMsg::Pong(*data)); +671 // recv pong +672 println!(" recv pong"); +673 let frame = recv_frame(FrameType::Pong, &mut io_rw).await?; +674 assert_eq!(frame, RelayToClientMsg::Pong(*data)); +675 +676 let target = SecretKey::generate(rand::thread_rng()).public(); +677 +678 // send packet +679 println!(" send packet"); +680 let data = b"hello world!"; +681 io_rw +682 .send(ClientToRelayMsg::SendPacket { +683 dst_key: target, +684 packet: Bytes::from_static(data), +685 }) +686 .await +687 .context("send")?; 688 -689 let target = SecretKey::generate(rand::thread_rng()).public(); -690 -691 // send packet -692 println!(" send packet"); -693 let data = b"hello world!"; -694 io_rw -695 .send(ClientToRelayMsg::Datagrams { -696 dst_node_id: target, -697 datagrams: Datagrams::from(data), -698 }) -699 .await -700 .context("send")?; -701 -702 // send disco packet -703 println!(" send disco packet"); -704 // starts with `MAGIC` & key, then data -705 let mut disco_data = disco::MAGIC.as_bytes().to_vec(); -706 disco_data.extend_from_slice(target.as_bytes()); -707 disco_data.extend_from_slice(data); -708 io_rw -709 .send(ClientToRelayMsg::Datagrams { -710 dst_node_id: target, -711 datagrams: disco_data.clone().into(), -712 }) -713 .await -714 .context("send")?; -715 -716 done.cancel(); -717 handle.await.context("join")?; -718 Ok(()) -719 } -720 -721 #[tokio::test(start_paused = true)] -722 #[traced_test] -723 async fn test_rate_limit() -> Result { -724 const LIMIT: u32 = 50; -725 const MAX_FRAMES: u32 = 100; -726 -727 // Build the rate limited stream. -728 let (io_read, io_write) = tokio::io::duplex((LIMIT * MAX_FRAMES) as _); -729 let mut frame_writer = Conn::test(io_write); -730 // Rate limiter allowing LIMIT bytes/s -731 let mut stream = RelayedStream::test_limited(io_read, LIMIT / 10, LIMIT)?; -732 -733 // Prepare a frame to send, assert its size. -734 let data = Datagrams::from(b"hello world!!1"); -735 let target = SecretKey::generate(rand::thread_rng()).public(); -736 let frame = ClientToRelayMsg::Datagrams { -737 dst_node_id: target, -738 datagrams: data.clone(), -739 }; -740 let frame_len = frame.to_bytes().len(); -741 assert_eq!(frame_len, LIMIT as usize); -742 -743 // Send a frame, it should arrive. -744 info!("-- send packet"); -745 frame_writer.send(frame.clone()).await.context("send")?; -746 frame_writer.flush().await.context("flush")?; -747 let recv_frame = tokio::time::timeout(Duration::from_millis(500), stream.next()) -748 .await -749 .expect("timeout") -750 .expect("option") -751 .expect("ok"); -752 assert_eq!(recv_frame, frame); -753 -754 // Next frame does not arrive. -755 info!("-- send packet"); -756 frame_writer.send(frame.clone()).await.context("send")?; -757 frame_writer.flush().await.context("flush")?; -758 let res = tokio::time::timeout(Duration::from_millis(100), stream.next()).await; -759 assert!(res.is_err(), "expecting a timeout"); -760 info!("-- timeout happened"); -761 -762 // Wait long enough. -763 info!("-- sleep"); -764 tokio::time::sleep(Duration::from_secs(1)).await; -765 -766 // Frame arrives. -767 let recv_frame = tokio::time::timeout(Duration::from_millis(500), stream.next()) -768 .await -769 .expect("timeout") -770 .expect("option") -771 .expect("ok"); -772 assert_eq!(recv_frame, frame); -773 -774 Ok(()) -775 } -776} \ No newline at end of file +689 // send disco packet +690 println!(" send disco packet"); +691 // starts with `MAGIC` & key, then data +692 let mut disco_data = disco::MAGIC.as_bytes().to_vec(); +693 disco_data.extend_from_slice(target.as_bytes()); +694 disco_data.extend_from_slice(data); +695 io_rw +696 .send(ClientToRelayMsg::SendPacket { +697 dst_key: target, +698 packet: disco_data.clone().into(), +699 }) +700 .await +701 .context("send")?; +702 +703 done.cancel(); +704 handle.await.context("join")?; +705 Ok(()) +706 } +707 +708 #[tokio::test(start_paused = true)] +709 #[traced_test] +710 async fn test_rate_limit() -> Result { +711 const LIMIT: u32 = 50; +712 const MAX_FRAMES: u32 = 100; +713 +714 // Build the rate limited stream. +715 let (io_read, io_write) = tokio::io::duplex((LIMIT * MAX_FRAMES) as _); +716 let mut frame_writer = Conn::test(io_write); +717 // Rate limiter allowing LIMIT bytes/s +718 let mut stream = RelayedStream::test_limited(io_read, LIMIT / 10, LIMIT)?; +719 +720 // Prepare a frame to send, assert its size. +721 let data = Bytes::from_static(b"hello world!1eins"); +722 let target = SecretKey::generate(rand::thread_rng()).public(); +723 let frame = ClientToRelayMsg::SendPacket { +724 dst_key: target, +725 packet: data.clone(), +726 }; +727 let frame_len = frame.to_bytes().len(); +728 assert_eq!(frame_len, LIMIT as usize); +729 +730 // Send a frame, it should arrive. +731 info!("-- send packet"); +732 frame_writer.send(frame.clone()).await.context("send")?; +733 frame_writer.flush().await.context("flush")?; +734 let recv_frame = tokio::time::timeout(Duration::from_millis(500), stream.next()) +735 .await +736 .expect("timeout") +737 .expect("option") +738 .expect("ok"); +739 assert_eq!(recv_frame, frame); +740 +741 // Next frame does not arrive. +742 info!("-- send packet"); +743 frame_writer.send(frame.clone()).await.context("send")?; +744 frame_writer.flush().await.context("flush")?; +745 let res = tokio::time::timeout(Duration::from_millis(100), stream.next()).await; +746 assert!(res.is_err(), "expecting a timeout"); +747 info!("-- timeout happened"); +748 +749 // Wait long enough. +750 info!("-- sleep"); +751 tokio::time::sleep(Duration::from_secs(1)).await; +752 +753 // Frame arrives. +754 let recv_frame = tokio::time::timeout(Duration::from_millis(500), stream.next()) +755 .await +756 .expect("timeout") +757 .expect("option") +758 .expect("ok"); +759 assert_eq!(recv_frame, frame); +760 +761 Ok(()) +762 } +763} \ No newline at end of file diff --git a/pr/3331/docs/src/iroh_relay/server/clients.rs.html b/pr/3331/docs/src/iroh_relay/server/clients.rs.html index c81936be5b..08460a4869 100644 --- a/pr/3331/docs/src/iroh_relay/server/clients.rs.html +++ b/pr/3331/docs/src/iroh_relay/server/clients.rs.html @@ -9,292 +9,290 @@ 9 }, 10}; 11 -12use dashmap::DashMap; -13use iroh_base::NodeId; -14use tokio::sync::mpsc::error::TrySendError; -15use tracing::{debug, trace}; -16 -17use super::client::{Client, Config, ForwardPacketError}; -18use crate::{ -19 protos::relay::Datagrams, -20 server::{ -21 client::{PacketScope, SendError}, -22 metrics::Metrics, -23 }, -24}; -25 -26/// Manages the connections to all currently connected clients. -27#[derive(Debug, Default, Clone)] -28pub(super) struct Clients(Arc<Inner>); -29 -30#[derive(Debug, Default)] -31struct Inner { -32 /// The list of all currently connected clients. -33 clients: DashMap<NodeId, Client>, -34 /// Map of which client has sent where -35 sent_to: DashMap<NodeId, HashSet<NodeId>>, -36 /// Connection ID Counter -37 next_connection_id: AtomicU64, -38} -39 -40impl Clients { -41 pub async fn shutdown(&self) { -42 let keys: Vec<_> = self.0.clients.iter().map(|x| *x.key()).collect(); -43 trace!("shutting down {} clients", keys.len()); -44 let clients = keys.into_iter().filter_map(|k| self.0.clients.remove(&k)); -45 -46 n0_future::join_all(clients.map(|(_, client)| async move { client.shutdown().await })) -47 .await; -48 } -49 -50 /// Builds the client handler and starts the read & write loops for the connection. -51 pub async fn register(&self, client_config: Config, metrics: Arc<Metrics>) { -52 let node_id = client_config.node_id; -53 let connection_id = self.get_connection_id(); -54 trace!(remote_node = node_id.fmt_short(), "registering client"); -55 -56 let client = Client::new(client_config, connection_id, self, metrics); -57 if let Some(old_client) = self.0.clients.insert(node_id, client) { -58 debug!( -59 remote_node = node_id.fmt_short(), -60 "multiple connections found, pruning old connection", -61 ); -62 old_client.shutdown().await; -63 } -64 } -65 -66 fn get_connection_id(&self) -> u64 { -67 self.0.next_connection_id.fetch_add(1, Ordering::Relaxed) -68 } -69 -70 /// Removes the client from the map of clients, & sends a notification -71 /// to each client that peers has sent data to, to let them know that -72 /// peer is gone from the network. -73 /// -74 /// Must be passed a matching connection_id. -75 pub(super) fn unregister(&self, connection_id: u64, node_id: NodeId) { -76 trace!( -77 node_id = node_id.fmt_short(), -78 connection_id, -79 "unregistering client" -80 ); -81 -82 if let Some((_, client)) = self -83 .0 -84 .clients -85 .remove_if(&node_id, |_, c| c.connection_id() == connection_id) -86 { -87 if let Some((_, sent_to)) = self.0.sent_to.remove(&node_id) { -88 for key in sent_to { -89 match client.try_send_peer_gone(key) { -90 Ok(_) => {} -91 Err(TrySendError::Full(_)) => { -92 debug!( -93 dst = key.fmt_short(), -94 "client too busy to receive packet, dropping packet" -95 ); -96 } -97 Err(TrySendError::Closed(_)) => { -98 debug!( -99 dst = key.fmt_short(), -100 "can no longer write to client, dropping packet" -101 ); -102 } -103 } -104 } -105 } -106 } -107 } -108 -109 /// Attempt to send a packet to client with [`NodeId`] `dst`. -110 pub(super) fn send_packet( -111 &self, -112 dst: NodeId, -113 data: Datagrams, -114 src: NodeId, -115 metrics: &Metrics, -116 ) -> Result<(), ForwardPacketError> { -117 let Some(client) = self.0.clients.get(&dst) else { -118 debug!(dst = dst.fmt_short(), "no connected client, dropped packet"); -119 metrics.send_packets_dropped.inc(); -120 return Ok(()); -121 }; -122 match client.try_send_packet(src, data) { -123 Ok(_) => { -124 // Record sent_to relationship -125 self.0.sent_to.entry(src).or_default().insert(dst); -126 Ok(()) -127 } -128 Err(TrySendError::Full(_)) => { -129 debug!( -130 dst = dst.fmt_short(), -131 "client too busy to receive packet, dropping packet" -132 ); -133 Err(ForwardPacketError::new(PacketScope::Data, SendError::Full)) -134 } -135 Err(TrySendError::Closed(_)) => { -136 debug!( -137 dst = dst.fmt_short(), -138 "can no longer write to client, dropping message and pruning connection" -139 ); -140 client.start_shutdown(); -141 Err(ForwardPacketError::new( -142 PacketScope::Data, -143 SendError::Closed, -144 )) -145 } -146 } -147 } -148 -149 /// Attempt to send a disco packet to client with [`NodeId`] `dst`. -150 pub(super) fn send_disco_packet( -151 &self, -152 dst: NodeId, -153 data: Datagrams, -154 src: NodeId, -155 metrics: &Metrics, -156 ) -> Result<(), ForwardPacketError> { -157 let Some(client) = self.0.clients.get(&dst) else { -158 debug!( -159 dst = dst.fmt_short(), -160 "no connected client, dropped disco packet" -161 ); -162 metrics.disco_packets_dropped.inc(); -163 return Ok(()); -164 }; -165 match client.try_send_disco_packet(src, data) { -166 Ok(_) => { -167 // Record sent_to relationship -168 self.0.sent_to.entry(src).or_default().insert(dst); -169 Ok(()) -170 } -171 Err(TrySendError::Full(_)) => { -172 debug!( -173 dst = dst.fmt_short(), -174 "client too busy to receive disco packet, dropping packet" -175 ); -176 Err(ForwardPacketError::new(PacketScope::Disco, SendError::Full)) -177 } -178 Err(TrySendError::Closed(_)) => { -179 debug!( -180 dst = dst.fmt_short(), -181 "can no longer write to client, dropping disco message and pruning connection" -182 ); -183 client.start_shutdown(); -184 Err(ForwardPacketError::new( -185 PacketScope::Disco, -186 SendError::Closed, -187 )) -188 } -189 } -190 } -191} -192 -193#[cfg(test)] -194mod tests { -195 use std::time::Duration; -196 -197 use iroh_base::SecretKey; -198 use n0_future::{Stream, StreamExt}; -199 use n0_snafu::{Result, ResultExt}; -200 -201 use super::*; -202 use crate::{ -203 client::conn::Conn, -204 protos::{common::FrameType, relay::RelayToClientMsg}, -205 server::streams::RelayedStream, -206 }; -207 -208 async fn recv_frame< -209 E: snafu::Error + Sync + Send + 'static, -210 S: Stream<Item = Result<RelayToClientMsg, E>> + Unpin, -211 >( -212 frame_type: FrameType, -213 mut stream: S, -214 ) -> Result<RelayToClientMsg> { -215 match stream.next().await { -216 Some(Ok(frame)) => { -217 if frame_type != frame.typ() { -218 snafu::whatever!( -219 "Unexpected frame, got {}, but expected {}", -220 frame.typ(), -221 frame_type -222 ); -223 } -224 Ok(frame) -225 } -226 Some(Err(err)) => Err(err).e(), -227 None => snafu::whatever!("Unexpected EOF, expected frame {frame_type}"), -228 } -229 } -230 -231 fn test_client_builder(key: NodeId) -> (Config, Conn) { -232 let (server, client) = tokio::io::duplex(1024); -233 ( -234 Config { -235 node_id: key, -236 stream: RelayedStream::test(server), -237 write_timeout: Duration::from_secs(1), -238 channel_capacity: 10, -239 }, -240 Conn::test(client), -241 ) -242 } -243 -244 #[tokio::test] -245 async fn test_clients() -> Result { -246 let a_key = SecretKey::generate(rand::thread_rng()).public(); -247 let b_key = SecretKey::generate(rand::thread_rng()).public(); +12use bytes::Bytes; +13use dashmap::DashMap; +14use iroh_base::NodeId; +15use tokio::sync::mpsc::error::TrySendError; +16use tracing::{debug, trace}; +17 +18use super::client::{Client, Config, ForwardPacketError}; +19use crate::server::{ +20 client::{PacketScope, SendError}, +21 metrics::Metrics, +22}; +23 +24/// Manages the connections to all currently connected clients. +25#[derive(Debug, Default, Clone)] +26pub(super) struct Clients(Arc<Inner>); +27 +28#[derive(Debug, Default)] +29struct Inner { +30 /// The list of all currently connected clients. +31 clients: DashMap<NodeId, Client>, +32 /// Map of which client has sent where +33 sent_to: DashMap<NodeId, HashSet<NodeId>>, +34 /// Connection ID Counter +35 next_connection_id: AtomicU64, +36} +37 +38impl Clients { +39 pub async fn shutdown(&self) { +40 let keys: Vec<_> = self.0.clients.iter().map(|x| *x.key()).collect(); +41 trace!("shutting down {} clients", keys.len()); +42 let clients = keys.into_iter().filter_map(|k| self.0.clients.remove(&k)); +43 +44 n0_future::join_all(clients.map(|(_, client)| async move { client.shutdown().await })) +45 .await; +46 } +47 +48 /// Builds the client handler and starts the read & write loops for the connection. +49 pub async fn register(&self, client_config: Config, metrics: Arc<Metrics>) { +50 let node_id = client_config.node_id; +51 let connection_id = self.get_connection_id(); +52 trace!(remote_node = node_id.fmt_short(), "registering client"); +53 +54 let client = Client::new(client_config, connection_id, self, metrics); +55 if let Some(old_client) = self.0.clients.insert(node_id, client) { +56 debug!( +57 remote_node = node_id.fmt_short(), +58 "multiple connections found, pruning old connection", +59 ); +60 old_client.shutdown().await; +61 } +62 } +63 +64 fn get_connection_id(&self) -> u64 { +65 self.0.next_connection_id.fetch_add(1, Ordering::Relaxed) +66 } +67 +68 /// Removes the client from the map of clients, & sends a notification +69 /// to each client that peers has sent data to, to let them know that +70 /// peer is gone from the network. +71 /// +72 /// Must be passed a matching connection_id. +73 pub(super) fn unregister(&self, connection_id: u64, node_id: NodeId) { +74 trace!( +75 node_id = node_id.fmt_short(), +76 connection_id, +77 "unregistering client" +78 ); +79 +80 if let Some((_, client)) = self +81 .0 +82 .clients +83 .remove_if(&node_id, |_, c| c.connection_id() == connection_id) +84 { +85 if let Some((_, sent_to)) = self.0.sent_to.remove(&node_id) { +86 for key in sent_to { +87 match client.try_send_peer_gone(key) { +88 Ok(_) => {} +89 Err(TrySendError::Full(_)) => { +90 debug!( +91 dst = key.fmt_short(), +92 "client too busy to receive packet, dropping packet" +93 ); +94 } +95 Err(TrySendError::Closed(_)) => { +96 debug!( +97 dst = key.fmt_short(), +98 "can no longer write to client, dropping packet" +99 ); +100 } +101 } +102 } +103 } +104 } +105 } +106 +107 /// Attempt to send a packet to client with [`NodeId`] `dst`. +108 pub(super) fn send_packet( +109 &self, +110 dst: NodeId, +111 data: Bytes, +112 src: NodeId, +113 metrics: &Metrics, +114 ) -> Result<(), ForwardPacketError> { +115 let Some(client) = self.0.clients.get(&dst) else { +116 debug!(dst = dst.fmt_short(), "no connected client, dropped packet"); +117 metrics.send_packets_dropped.inc(); +118 return Ok(()); +119 }; +120 match client.try_send_packet(src, data) { +121 Ok(_) => { +122 // Record sent_to relationship +123 self.0.sent_to.entry(src).or_default().insert(dst); +124 Ok(()) +125 } +126 Err(TrySendError::Full(_)) => { +127 debug!( +128 dst = dst.fmt_short(), +129 "client too busy to receive packet, dropping packet" +130 ); +131 Err(ForwardPacketError::new(PacketScope::Data, SendError::Full)) +132 } +133 Err(TrySendError::Closed(_)) => { +134 debug!( +135 dst = dst.fmt_short(), +136 "can no longer write to client, dropping message and pruning connection" +137 ); +138 client.start_shutdown(); +139 Err(ForwardPacketError::new( +140 PacketScope::Data, +141 SendError::Closed, +142 )) +143 } +144 } +145 } +146 +147 /// Attempt to send a disco packet to client with [`NodeId`] `dst`. +148 pub(super) fn send_disco_packet( +149 &self, +150 dst: NodeId, +151 data: Bytes, +152 src: NodeId, +153 metrics: &Metrics, +154 ) -> Result<(), ForwardPacketError> { +155 let Some(client) = self.0.clients.get(&dst) else { +156 debug!( +157 dst = dst.fmt_short(), +158 "no connected client, dropped disco packet" +159 ); +160 metrics.disco_packets_dropped.inc(); +161 return Ok(()); +162 }; +163 match client.try_send_disco_packet(src, data) { +164 Ok(_) => { +165 // Record sent_to relationship +166 self.0.sent_to.entry(src).or_default().insert(dst); +167 Ok(()) +168 } +169 Err(TrySendError::Full(_)) => { +170 debug!( +171 dst = dst.fmt_short(), +172 "client too busy to receive disco packet, dropping packet" +173 ); +174 Err(ForwardPacketError::new(PacketScope::Disco, SendError::Full)) +175 } +176 Err(TrySendError::Closed(_)) => { +177 debug!( +178 dst = dst.fmt_short(), +179 "can no longer write to client, dropping disco message and pruning connection" +180 ); +181 client.start_shutdown(); +182 Err(ForwardPacketError::new( +183 PacketScope::Disco, +184 SendError::Closed, +185 )) +186 } +187 } +188 } +189} +190 +191#[cfg(test)] +192mod tests { +193 use std::time::Duration; +194 +195 use iroh_base::SecretKey; +196 use n0_future::{Stream, StreamExt}; +197 use n0_snafu::{Result, ResultExt}; +198 +199 use super::*; +200 use crate::{ +201 client::conn::Conn, +202 protos::{common::FrameType, relay::RelayToClientMsg}, +203 server::streams::RelayedStream, +204 }; +205 +206 async fn recv_frame< +207 E: snafu::Error + Sync + Send + 'static, +208 S: Stream<Item = Result<RelayToClientMsg, E>> + Unpin, +209 >( +210 frame_type: FrameType, +211 mut stream: S, +212 ) -> Result<RelayToClientMsg> { +213 match stream.next().await { +214 Some(Ok(frame)) => { +215 if frame_type != frame.typ() { +216 snafu::whatever!( +217 "Unexpected frame, got {}, but expected {}", +218 frame.typ(), +219 frame_type +220 ); +221 } +222 Ok(frame) +223 } +224 Some(Err(err)) => Err(err).e(), +225 None => snafu::whatever!("Unexpected EOF, expected frame {frame_type}"), +226 } +227 } +228 +229 fn test_client_builder(key: NodeId) -> (Config, Conn) { +230 let (server, client) = tokio::io::duplex(1024); +231 ( +232 Config { +233 node_id: key, +234 stream: RelayedStream::test(server), +235 write_timeout: Duration::from_secs(1), +236 channel_capacity: 10, +237 }, +238 Conn::test(client), +239 ) +240 } +241 +242 #[tokio::test] +243 async fn test_clients() -> Result { +244 let a_key = SecretKey::generate(rand::thread_rng()).public(); +245 let b_key = SecretKey::generate(rand::thread_rng()).public(); +246 +247 let (builder_a, mut a_rw) = test_client_builder(a_key); 248 -249 let (builder_a, mut a_rw) = test_client_builder(a_key); -250 -251 let clients = Clients::default(); -252 let metrics = Arc::new(Metrics::default()); -253 clients.register(builder_a, metrics.clone()).await; -254 -255 // send packet -256 let data = b"hello world!"; -257 clients.send_packet(a_key, Datagrams::from(&data[..]), b_key, &metrics)?; -258 let frame = recv_frame(FrameType::RelayToClientDatagrams, &mut a_rw).await?; -259 assert_eq!( -260 frame, -261 RelayToClientMsg::Datagrams { -262 remote_node_id: b_key, -263 datagrams: data.to_vec().into(), -264 } -265 ); -266 -267 // send disco packet -268 clients.send_disco_packet(a_key, Datagrams::from(&data[..]), b_key, &metrics)?; -269 let frame = recv_frame(FrameType::RelayToClientDatagrams, &mut a_rw).await?; -270 assert_eq!( -271 frame, -272 RelayToClientMsg::Datagrams { -273 remote_node_id: b_key, -274 datagrams: data.to_vec().into(), -275 } -276 ); -277 -278 { -279 let client = clients.0.clients.get(&a_key).unwrap(); -280 // shutdown client a, this should trigger the removal from the clients list -281 client.start_shutdown(); -282 } -283 -284 // need to wait a moment for the removal to be processed -285 let c = clients.clone(); -286 tokio::time::timeout(Duration::from_secs(1), async move { -287 loop { -288 if !c.0.clients.contains_key(&a_key) { -289 break; -290 } -291 tokio::time::sleep(Duration::from_millis(100)).await; -292 } -293 }) -294 .await -295 .context("timeout")?; -296 clients.shutdown().await; -297 -298 Ok(()) -299 } -300} \ No newline at end of file +249 let clients = Clients::default(); +250 let metrics = Arc::new(Metrics::default()); +251 clients.register(builder_a, metrics.clone()).await; +252 +253 // send packet +254 let data = b"hello world!"; +255 clients.send_packet(a_key, Bytes::from_static(&data[..]), b_key, &metrics)?; +256 let frame = recv_frame(FrameType::RecvPacket, &mut a_rw).await?; +257 assert_eq!( +258 frame, +259 RelayToClientMsg::ReceivedPacket { +260 src_key: b_key, +261 content: data.to_vec().into(), +262 } +263 ); +264 +265 // send disco packet +266 clients.send_disco_packet(a_key, Bytes::from_static(&data[..]), b_key, &metrics)?; +267 let frame = recv_frame(FrameType::RecvPacket, &mut a_rw).await?; +268 assert_eq!( +269 frame, +270 RelayToClientMsg::ReceivedPacket { +271 src_key: b_key, +272 content: data.to_vec().into(), +273 } +274 ); +275 +276 { +277 let client = clients.0.clients.get(&a_key).unwrap(); +278 // shutdown client a, this should trigger the removal from the clients list +279 client.start_shutdown(); +280 } +281 +282 // need to wait a moment for the removal to be processed +283 let c = clients.clone(); +284 tokio::time::timeout(Duration::from_secs(1), async move { +285 loop { +286 if !c.0.clients.contains_key(&a_key) { +287 break; +288 } +289 tokio::time::sleep(Duration::from_millis(100)).await; +290 } +291 }) +292 .await +293 .context("timeout")?; +294 clients.shutdown().await; +295 +296 Ok(()) +297 } +298} \ No newline at end of file diff --git a/pr/3331/docs/src/iroh_relay/server/http_server.rs.html b/pr/3331/docs/src/iroh_relay/server/http_server.rs.html index e305b5a9ce..d6d8532821 100644 --- a/pr/3331/docs/src/iroh_relay/server/http_server.rs.html +++ b/pr/3331/docs/src/iroh_relay/server/http_server.rs.html @@ -879,7 +879,7 @@ 879 use crate::{ 880 client::{conn::Conn, Client, ClientBuilder, ConnectError}, 881 dns::DnsResolver, -882 protos::relay::{ClientToRelayMsg, Datagrams, RelayToClientMsg}, +882 protos::relay::{ClientToRelayMsg, RelayToClientMsg}, 883 }; 884 885 pub(crate) fn make_tls_config() -> TlsConfig { @@ -947,11 +947,11 @@ 947 assert!(matches!(pong, RelayToClientMsg::Pong { .. })); 948 949 info!("sending message from a to b"); -950 let msg = Datagrams::from(b"hi there, client b!"); +950 let msg = Bytes::from_static(b"hi there, client b!"); 951 client_a -952 .send(ClientToRelayMsg::Datagrams { -953 dst_node_id: b_key, -954 datagrams: msg.clone(), +952 .send(ClientToRelayMsg::SendPacket { +953 dst_key: b_key, +954 packet: msg.clone(), 955 }) 956 .await?; 957 info!("waiting for message from a on b"); @@ -961,11 +961,11 @@ 961 assert_eq!(msg, got_msg); 962 963 info!("sending message from b to a"); -964 let msg = Datagrams::from(b"right back at ya, client b!"); +964 let msg = Bytes::from_static(b"right back at ya, client b!"); 965 client_b -966 .send(ClientToRelayMsg::Datagrams { -967 dst_node_id: a_key, -968 datagrams: msg.clone(), +966 .send(ClientToRelayMsg::SendPacket { +967 dst_key: a_key, +968 packet: msg.clone(), 969 }) 970 .await?; 971 info!("waiting for message b on a"); @@ -996,7 +996,7 @@ 996 997 fn process_msg( 998 msg: Option<Result<RelayToClientMsg, crate::client::RecvError>>, -999 ) -> Option<(PublicKey, Datagrams)> { +999 ) -> Option<(PublicKey, Bytes)> { 1000 match msg { 1001 Some(Err(e)) => { 1002 info!("client `recv` error {e}"); @@ -1004,12 +1004,12 @@ 1004 } 1005 Some(Ok(msg)) => { 1006 info!("got message on: {msg:?}"); -1007 if let RelayToClientMsg::Datagrams { -1008 remote_node_id: source, -1009 datagrams, +1007 if let RelayToClientMsg::ReceivedPacket { +1008 src_key: source, +1009 content, 1010 } = msg 1011 { -1012 Some((source, datagrams)) +1012 Some((source, content)) 1013 } else { 1014 None 1015 } @@ -1067,11 +1067,11 @@ 1067 assert!(matches!(pong, RelayToClientMsg::Pong { .. })); 1068 1069 info!("sending message from a to b"); -1070 let msg = Datagrams::from(b"hi there, client b!"); +1070 let msg = Bytes::from_static(b"hi there, client b!"); 1071 client_a -1072 .send(ClientToRelayMsg::Datagrams { -1073 dst_node_id: b_key, -1074 datagrams: msg.clone(), +1072 .send(ClientToRelayMsg::SendPacket { +1073 dst_key: b_key, +1074 packet: msg.clone(), 1075 }) 1076 .await?; 1077 info!("waiting for message from a on b"); @@ -1081,11 +1081,11 @@ 1081 assert_eq!(msg, got_msg); 1082 1083 info!("sending message from b to a"); -1084 let msg = Datagrams::from(b"right back at ya, client b!"); +1084 let msg = Bytes::from_static(b"right back at ya, client b!"); 1085 client_b -1086 .send(ClientToRelayMsg::Datagrams { -1087 dst_node_id: a_key, -1088 datagrams: msg.clone(), +1086 .send(ClientToRelayMsg::SendPacket { +1087 dst_key: a_key, +1088 packet: msg.clone(), 1089 }) 1090 .await?; 1091 info!("waiting for message b on a"); @@ -1144,201 +1144,183 @@ 1144 handler_task.await.context("join")??; 1145 1146 info!("Send message from A to B."); -1147 let msg = Datagrams::from(b"hello client b!!"); +1147 let msg = Bytes::from_static(b"hello client b!!"); 1148 client_a -1149 .send(ClientToRelayMsg::Datagrams { -1150 dst_node_id: public_key_b, -1151 datagrams: msg.clone(), +1149 .send(ClientToRelayMsg::SendPacket { +1150 dst_key: public_key_b, +1151 packet: msg.clone(), 1152 }) 1153 .await?; 1154 match client_b.next().await.unwrap()? { -1155 RelayToClientMsg::Datagrams { -1156 remote_node_id, -1157 datagrams, -1158 } => { -1159 assert_eq!(public_key_a, remote_node_id); -1160 assert_eq!(msg, datagrams); +1155 RelayToClientMsg::ReceivedPacket { src_key, content } => { +1156 assert_eq!(public_key_a, src_key); +1157 assert_eq!(msg, content); +1158 } +1159 msg => { +1160 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); 1161 } -1162 msg => { -1163 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); -1164 } -1165 } -1166 -1167 info!("Send message from B to A."); -1168 let msg = Datagrams::from(b"nice to meet you client a!!"); -1169 client_b -1170 .send(ClientToRelayMsg::Datagrams { -1171 dst_node_id: public_key_a, -1172 datagrams: msg.clone(), -1173 }) -1174 .await?; -1175 match client_a.next().await.unwrap()? { -1176 RelayToClientMsg::Datagrams { -1177 remote_node_id, -1178 datagrams, -1179 } => { -1180 assert_eq!(public_key_b, remote_node_id); -1181 assert_eq!(msg, datagrams); -1182 } -1183 msg => { -1184 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); -1185 } -1186 } -1187 -1188 info!("Close the server and clients"); -1189 service.shutdown().await; -1190 tokio::time::sleep(Duration::from_secs(1)).await; -1191 -1192 info!("Fail to send message from A to B."); -1193 let res = client_a -1194 .send(ClientToRelayMsg::Datagrams { -1195 dst_node_id: public_key_b, -1196 datagrams: Datagrams::from(b"try to send"), -1197 }) -1198 .await; -1199 assert!(res.is_err()); -1200 assert!(client_b.next().await.is_none()); -1201 Ok(()) -1202 } -1203 -1204 #[tokio::test] -1205 async fn test_server_replace_client() -> Result { -1206 info!("Create the server."); -1207 let service = RelayService::new( -1208 Default::default(), -1209 Default::default(), -1210 None, -1211 KeyCache::test(), -1212 AccessConfig::Everyone, -1213 Default::default(), -1214 ); -1215 -1216 info!("Create client A and connect it to the server."); -1217 let key_a = SecretKey::generate(rand::thread_rng()); -1218 let public_key_a = key_a.public(); -1219 let (client_a, rw_a) = tokio::io::duplex(10); -1220 let s = service.clone(); -1221 let handler_task = -1222 tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(rw_a), None).await }); -1223 let mut client_a = make_test_client(client_a, &key_a).await?; -1224 handler_task.await.context("join")??; -1225 -1226 info!("Create client B and connect it to the server."); -1227 let key_b = SecretKey::generate(rand::thread_rng()); -1228 let public_key_b = key_b.public(); -1229 let (client_b, rw_b) = tokio::io::duplex(10); -1230 let s = service.clone(); -1231 let handler_task = -1232 tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(rw_b), None).await }); -1233 let mut client_b = make_test_client(client_b, &key_b).await?; -1234 handler_task.await.context("join")??; -1235 -1236 info!("Send message from A to B."); -1237 let msg = Datagrams::from(b"hello client b!!"); -1238 client_a -1239 .send(ClientToRelayMsg::Datagrams { -1240 dst_node_id: public_key_b, -1241 datagrams: msg.clone(), -1242 }) -1243 .await?; -1244 match client_b.next().await.expect("eos")? { -1245 RelayToClientMsg::Datagrams { -1246 remote_node_id, -1247 datagrams, -1248 } => { -1249 assert_eq!(public_key_a, remote_node_id); -1250 assert_eq!(msg, datagrams); -1251 } -1252 msg => { -1253 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); -1254 } -1255 } -1256 -1257 info!("Send message from B to A."); -1258 let msg = Datagrams::from(b"nice to meet you client a!!"); -1259 client_b -1260 .send(ClientToRelayMsg::Datagrams { -1261 dst_node_id: public_key_a, -1262 datagrams: msg.clone(), -1263 }) -1264 .await?; -1265 match client_a.next().await.expect("eos")? { -1266 RelayToClientMsg::Datagrams { -1267 remote_node_id, -1268 datagrams, -1269 } => { -1270 assert_eq!(public_key_b, remote_node_id); -1271 assert_eq!(msg, datagrams); -1272 } -1273 msg => { -1274 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); -1275 } -1276 } -1277 -1278 info!("Create client B and connect it to the server"); -1279 let (new_client_b, new_rw_b) = tokio::io::duplex(10); -1280 let s = service.clone(); -1281 let handler_task = -1282 tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(new_rw_b), None).await }); -1283 let mut new_client_b = make_test_client(new_client_b, &key_b).await?; -1284 handler_task.await.context("join")??; -1285 -1286 // assert!(client_b.recv().await.is_err()); -1287 -1288 info!("Send message from A to B."); -1289 let msg = Datagrams::from(b"are you still there, b?!"); -1290 client_a -1291 .send(ClientToRelayMsg::Datagrams { -1292 dst_node_id: public_key_b, -1293 datagrams: msg.clone(), -1294 }) -1295 .await?; -1296 match new_client_b.next().await.expect("eos")? { -1297 RelayToClientMsg::Datagrams { -1298 remote_node_id, -1299 datagrams, -1300 } => { -1301 assert_eq!(public_key_a, remote_node_id); -1302 assert_eq!(msg, datagrams); -1303 } -1304 msg => { -1305 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); +1162 } +1163 +1164 info!("Send message from B to A."); +1165 let msg = Bytes::from_static(b"nice to meet you client a!!"); +1166 client_b +1167 .send(ClientToRelayMsg::SendPacket { +1168 dst_key: public_key_a, +1169 packet: msg.clone(), +1170 }) +1171 .await?; +1172 match client_a.next().await.unwrap()? { +1173 RelayToClientMsg::ReceivedPacket { src_key, content } => { +1174 assert_eq!(public_key_b, src_key); +1175 assert_eq!(msg, content); +1176 } +1177 msg => { +1178 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); +1179 } +1180 } +1181 +1182 info!("Close the server and clients"); +1183 service.shutdown().await; +1184 tokio::time::sleep(Duration::from_secs(1)).await; +1185 +1186 info!("Fail to send message from A to B."); +1187 let res = client_a +1188 .send(ClientToRelayMsg::SendPacket { +1189 dst_key: public_key_b, +1190 packet: Bytes::from_static(b"try to send"), +1191 }) +1192 .await; +1193 assert!(res.is_err()); +1194 assert!(client_b.next().await.is_none()); +1195 Ok(()) +1196 } +1197 +1198 #[tokio::test] +1199 async fn test_server_replace_client() -> Result { +1200 info!("Create the server."); +1201 let service = RelayService::new( +1202 Default::default(), +1203 Default::default(), +1204 None, +1205 KeyCache::test(), +1206 AccessConfig::Everyone, +1207 Default::default(), +1208 ); +1209 +1210 info!("Create client A and connect it to the server."); +1211 let key_a = SecretKey::generate(rand::thread_rng()); +1212 let public_key_a = key_a.public(); +1213 let (client_a, rw_a) = tokio::io::duplex(10); +1214 let s = service.clone(); +1215 let handler_task = +1216 tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(rw_a), None).await }); +1217 let mut client_a = make_test_client(client_a, &key_a).await?; +1218 handler_task.await.context("join")??; +1219 +1220 info!("Create client B and connect it to the server."); +1221 let key_b = SecretKey::generate(rand::thread_rng()); +1222 let public_key_b = key_b.public(); +1223 let (client_b, rw_b) = tokio::io::duplex(10); +1224 let s = service.clone(); +1225 let handler_task = +1226 tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(rw_b), None).await }); +1227 let mut client_b = make_test_client(client_b, &key_b).await?; +1228 handler_task.await.context("join")??; +1229 +1230 info!("Send message from A to B."); +1231 let msg = Bytes::from_static(b"hello client b!!"); +1232 client_a +1233 .send(ClientToRelayMsg::SendPacket { +1234 dst_key: public_key_b, +1235 packet: msg.clone(), +1236 }) +1237 .await?; +1238 match client_b.next().await.expect("eos")? { +1239 RelayToClientMsg::ReceivedPacket { src_key, content } => { +1240 assert_eq!(public_key_a, src_key); +1241 assert_eq!(msg, content); +1242 } +1243 msg => { +1244 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); +1245 } +1246 } +1247 +1248 info!("Send message from B to A."); +1249 let msg = Bytes::from_static(b"nice to meet you client a!!"); +1250 client_b +1251 .send(ClientToRelayMsg::SendPacket { +1252 dst_key: public_key_a, +1253 packet: msg.clone(), +1254 }) +1255 .await?; +1256 match client_a.next().await.expect("eos")? { +1257 RelayToClientMsg::ReceivedPacket { src_key, content } => { +1258 assert_eq!(public_key_b, src_key); +1259 assert_eq!(msg, content); +1260 } +1261 msg => { +1262 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); +1263 } +1264 } +1265 +1266 info!("Create client B and connect it to the server"); +1267 let (new_client_b, new_rw_b) = tokio::io::duplex(10); +1268 let s = service.clone(); +1269 let handler_task = +1270 tokio::spawn(async move { s.0.accept(MaybeTlsStream::Test(new_rw_b), None).await }); +1271 let mut new_client_b = make_test_client(new_client_b, &key_b).await?; +1272 handler_task.await.context("join")??; +1273 +1274 // assert!(client_b.recv().await.is_err()); +1275 +1276 info!("Send message from A to B."); +1277 let msg = Bytes::from_static(b"are you still there, b?!"); +1278 client_a +1279 .send(ClientToRelayMsg::SendPacket { +1280 dst_key: public_key_b, +1281 packet: msg.clone(), +1282 }) +1283 .await?; +1284 match new_client_b.next().await.expect("eos")? { +1285 RelayToClientMsg::ReceivedPacket { src_key, content } => { +1286 assert_eq!(public_key_a, src_key); +1287 assert_eq!(msg, content); +1288 } +1289 msg => { +1290 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); +1291 } +1292 } +1293 +1294 info!("Send message from B to A."); +1295 let msg = Bytes::from_static(b"just had a spot of trouble but I'm back now,a!!"); +1296 new_client_b +1297 .send(ClientToRelayMsg::SendPacket { +1298 dst_key: public_key_a, +1299 packet: msg.clone(), +1300 }) +1301 .await?; +1302 match client_a.next().await.expect("eos")? { +1303 RelayToClientMsg::ReceivedPacket { src_key, content } => { +1304 assert_eq!(public_key_b, src_key); +1305 assert_eq!(msg, content); 1306 } -1307 } -1308 -1309 info!("Send message from B to A."); -1310 let msg = Datagrams::from(b"just had a spot of trouble but I'm back now,a!!"); -1311 new_client_b -1312 .send(ClientToRelayMsg::Datagrams { -1313 dst_node_id: public_key_a, -1314 datagrams: msg.clone(), -1315 }) -1316 .await?; -1317 match client_a.next().await.expect("eos")? { -1318 RelayToClientMsg::Datagrams { -1319 remote_node_id, -1320 datagrams, -1321 } => { -1322 assert_eq!(public_key_b, remote_node_id); -1323 assert_eq!(msg, datagrams); -1324 } -1325 msg => { -1326 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); -1327 } -1328 } -1329 -1330 info!("Close the server and clients"); -1331 service.shutdown().await; -1332 -1333 info!("Sending message from A to B fails"); -1334 let res = client_a -1335 .send(ClientToRelayMsg::Datagrams { -1336 dst_node_id: public_key_b, -1337 datagrams: Datagrams::from(b"try to send"), -1338 }) -1339 .await; -1340 assert!(res.is_err()); -1341 assert!(new_client_b.next().await.is_none()); -1342 Ok(()) -1343 } -1344} \ No newline at end of file +1307 msg => { +1308 whatever!("expected ReceivedDatagrams msg, got {msg:?}"); +1309 } +1310 } +1311 +1312 info!("Close the server and clients"); +1313 service.shutdown().await; +1314 +1315 info!("Sending message from A to B fails"); +1316 let res = client_a +1317 .send(ClientToRelayMsg::SendPacket { +1318 dst_key: public_key_b, +1319 packet: Bytes::from_static(b"try to send"), +1320 }) +1321 .await; +1322 assert!(res.is_err()); +1323 assert!(new_client_b.next().await.is_none()); +1324 Ok(()) +1325 } +1326} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/clone/trait.Clone.js b/pr/3331/docs/trait.impl/core/clone/trait.Clone.js index b4ba613205..6874fcf85f 100644 --- a/pr/3331/docs/trait.impl/core/clone/trait.Clone.js +++ b/pr/3331/docs/trait.impl/core/clone/trait.Clone.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Clone for ConnectionType"],["impl Clone for ControlMsg"],["impl Clone for DirectAddrType"],["impl Clone for PathSelection"],["impl Clone for RelayMode"],["impl Clone for Source"],["impl Clone for Probe"],["impl Clone for DhtDiscovery"],["impl Clone for PkarrPublisher"],["impl Clone for PkarrRelayClient"],["impl Clone for PkarrResolver"],["impl Clone for StaticProvider"],["impl Clone for DiscoveryItem"],["impl Clone for ConnectOptions"],["impl Clone for Connection"],["impl Clone for DirectAddr"],["impl Clone for DirectAddrInfo"],["impl Clone for Endpoint"],["impl Clone for RemoteInfo"],["impl Clone for EndpointMetrics"],["impl Clone for Options"],["impl Clone for QuicConfig"],["impl Clone for RelayLatencies"],["impl Clone for Report"],["impl Clone for Router"],["impl<P: Clone + ProtocolHandler + Clone> Clone for AccessLimit<P>"]]],["iroh_base",[["impl Clone for NodeAddr"],["impl Clone for PublicKey"],["impl Clone for RelayUrl"],["impl Clone for SecretKey"],["impl Clone for NodeTicket"]]],["iroh_bench",[["impl Clone for Commands"],["impl Clone for Opt"],["impl Clone for Opt"]]],["iroh_dns_server",[["impl Clone for CertMode"],["impl Clone for RateLimitConfig"],["impl Clone for StoreConfig"],["impl Clone for DnsConfig"],["impl Clone for DnsHandler"],["impl Clone for Handle"],["impl Clone for HttpConfig"],["impl Clone for HttpsConfig"],["impl Clone for AppState"],["impl Clone for ZoneStore"]]],["iroh_relay",[["impl Clone for FrameType"],["impl Clone for ClientToRelayMsg"],["impl Clone for RelayToClientMsg"],["impl Clone for Access"],["impl Clone for ClientBuilder"],["impl Clone for DnsResolver"],["impl Clone for TXT"],["impl Clone for TxtLookup"],["impl Clone for NodeData"],["impl Clone for NodeInfo"],["impl Clone for UserData"],["impl Clone for Datagrams"],["impl Clone for QuicClient"],["impl Clone for ClientRateLimit"],["impl Clone for RelayMetrics"],["impl Clone for RelayMap"],["impl Clone for RelayNode"],["impl Clone for RelayQuicConfig"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Clone for ConnectionType"],["impl Clone for ControlMsg"],["impl Clone for DirectAddrType"],["impl Clone for PathSelection"],["impl Clone for RelayMode"],["impl Clone for Source"],["impl Clone for Probe"],["impl Clone for DhtDiscovery"],["impl Clone for PkarrPublisher"],["impl Clone for PkarrRelayClient"],["impl Clone for PkarrResolver"],["impl Clone for StaticProvider"],["impl Clone for DiscoveryItem"],["impl Clone for ConnectOptions"],["impl Clone for Connection"],["impl Clone for DirectAddr"],["impl Clone for DirectAddrInfo"],["impl Clone for Endpoint"],["impl Clone for RemoteInfo"],["impl Clone for EndpointMetrics"],["impl Clone for Options"],["impl Clone for QuicConfig"],["impl Clone for RelayLatencies"],["impl Clone for Report"],["impl Clone for Router"],["impl<P: Clone + ProtocolHandler + Clone> Clone for AccessLimit<P>"]]],["iroh_base",[["impl Clone for NodeAddr"],["impl Clone for PublicKey"],["impl Clone for RelayUrl"],["impl Clone for SecretKey"],["impl Clone for NodeTicket"]]],["iroh_bench",[["impl Clone for Commands"],["impl Clone for Opt"],["impl Clone for Opt"]]],["iroh_dns_server",[["impl Clone for CertMode"],["impl Clone for RateLimitConfig"],["impl Clone for StoreConfig"],["impl Clone for DnsConfig"],["impl Clone for DnsHandler"],["impl Clone for Handle"],["impl Clone for HttpConfig"],["impl Clone for HttpsConfig"],["impl Clone for AppState"],["impl Clone for ZoneStore"]]],["iroh_relay",[["impl Clone for FrameType"],["impl Clone for ClientToRelayMsg"],["impl Clone for RelayToClientMsg"],["impl Clone for Access"],["impl Clone for ClientBuilder"],["impl Clone for DnsResolver"],["impl Clone for TXT"],["impl Clone for TxtLookup"],["impl Clone for NodeData"],["impl Clone for NodeInfo"],["impl Clone for UserData"],["impl Clone for QuicClient"],["impl Clone for ClientRateLimit"],["impl Clone for RelayMetrics"],["impl Clone for RelayMap"],["impl Clone for RelayNode"],["impl Clone for RelayQuicConfig"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[7704,1333,770,2860,5071]} \ No newline at end of file +//{"start":57,"fragment_lengths":[7704,1333,770,2860,4780]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/cmp/trait.Eq.js b/pr/3331/docs/trait.impl/core/cmp/trait.Eq.js index 4a3fd50fda..db2174c982 100644 --- a/pr/3331/docs/trait.impl/core/cmp/trait.Eq.js +++ b/pr/3331/docs/trait.impl/core/cmp/trait.Eq.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Eq for ConnectionType"],["impl Eq for ControlMsg"],["impl Eq for DirectAddrType"],["impl Eq for PathSelection"],["impl Eq for RelayMode"],["impl Eq for Source"],["impl Eq for Probe"],["impl Eq for DirectAddr"],["impl Eq for DirectAddrInfo"],["impl Eq for RemoteInfo"],["impl Eq for RelayLatencies"],["impl Eq for Report"]]],["iroh_base",[["impl Eq for NodeAddr"],["impl Eq for PublicKey"],["impl Eq for RelayUrl"],["impl Eq for NodeTicket"]]],["iroh_dns_server",[["impl Eq for CertMode"]]],["iroh_relay",[["impl Eq for FrameType"],["impl Eq for ClientToRelayMsg"],["impl Eq for RelayToClientMsg"],["impl Eq for Access"],["impl Eq for NodeData"],["impl Eq for NodeInfo"],["impl Eq for UserData"],["impl Eq for Datagrams"],["impl Eq for RelayMap"],["impl Eq for RelayNode"],["impl Eq for RelayQuicConfig"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Eq for ConnectionType"],["impl Eq for ControlMsg"],["impl Eq for DirectAddrType"],["impl Eq for PathSelection"],["impl Eq for RelayMode"],["impl Eq for Source"],["impl Eq for Probe"],["impl Eq for DirectAddr"],["impl Eq for DirectAddrInfo"],["impl Eq for RemoteInfo"],["impl Eq for RelayLatencies"],["impl Eq for Report"]]],["iroh_base",[["impl Eq for NodeAddr"],["impl Eq for PublicKey"],["impl Eq for RelayUrl"],["impl Eq for NodeTicket"]]],["iroh_dns_server",[["impl Eq for CertMode"]]],["iroh_relay",[["impl Eq for FrameType"],["impl Eq for ClientToRelayMsg"],["impl Eq for RelayToClientMsg"],["impl Eq for Access"],["impl Eq for NodeData"],["impl Eq for NodeInfo"],["impl Eq for UserData"],["impl Eq for RelayMap"],["impl Eq for RelayNode"],["impl Eq for RelayQuicConfig"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[3115,1020,284,2974]} \ No newline at end of file +//{"start":57,"fragment_lengths":[3115,1020,284,2696]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/cmp/trait.PartialEq.js b/pr/3331/docs/trait.impl/core/cmp/trait.PartialEq.js index 7a9f8d1950..a7984e7cbd 100644 --- a/pr/3331/docs/trait.impl/core/cmp/trait.PartialEq.js +++ b/pr/3331/docs/trait.impl/core/cmp/trait.PartialEq.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl PartialEq for ConnectionType"],["impl PartialEq for ControlMsg"],["impl PartialEq for DirectAddrType"],["impl PartialEq for PathSelection"],["impl PartialEq for RelayMode"],["impl PartialEq for Source"],["impl PartialEq for Probe"],["impl PartialEq for DirectAddr"],["impl PartialEq for DirectAddrInfo"],["impl PartialEq for RemoteInfo"],["impl PartialEq for RelayLatencies"],["impl PartialEq for Report"]]],["iroh_base",[["impl PartialEq for NodeAddr"],["impl PartialEq for PublicKey"],["impl PartialEq for RelayUrl"],["impl PartialEq for NodeTicket"]]],["iroh_dns_server",[["impl PartialEq for CertMode"]]],["iroh_relay",[["impl PartialEq for FrameType"],["impl PartialEq for ClientToRelayMsg"],["impl PartialEq for RelayToClientMsg"],["impl PartialEq for Access"],["impl PartialEq for NodeData"],["impl PartialEq for NodeInfo"],["impl PartialEq for UserData"],["impl PartialEq for Datagrams"],["impl PartialEq for RelayMap"],["impl PartialEq for RelayNode"],["impl PartialEq for RelayQuicConfig"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl PartialEq for ConnectionType"],["impl PartialEq for ControlMsg"],["impl PartialEq for DirectAddrType"],["impl PartialEq for PathSelection"],["impl PartialEq for RelayMode"],["impl PartialEq for Source"],["impl PartialEq for Probe"],["impl PartialEq for DirectAddr"],["impl PartialEq for DirectAddrInfo"],["impl PartialEq for RemoteInfo"],["impl PartialEq for RelayLatencies"],["impl PartialEq for Report"]]],["iroh_base",[["impl PartialEq for NodeAddr"],["impl PartialEq for PublicKey"],["impl PartialEq for RelayUrl"],["impl PartialEq for NodeTicket"]]],["iroh_dns_server",[["impl PartialEq for CertMode"]]],["iroh_relay",[["impl PartialEq for FrameType"],["impl PartialEq for ClientToRelayMsg"],["impl PartialEq for RelayToClientMsg"],["impl PartialEq for Access"],["impl PartialEq for NodeData"],["impl PartialEq for NodeInfo"],["impl PartialEq for UserData"],["impl PartialEq for RelayMap"],["impl PartialEq for RelayNode"],["impl PartialEq for RelayQuicConfig"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[3367,1104,305,3205]} \ No newline at end of file +//{"start":57,"fragment_lengths":[3367,1104,305,2906]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/convert/trait.From.js b/pr/3331/docs/trait.impl/core/convert/trait.From.js index ae52029726..f95a206dd3 100644 --- a/pr/3331/docs/trait.impl/core/convert/trait.From.js +++ b/pr/3331/docs/trait.impl/core/convert/trait.From.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl From<IntoDiscoveryError> for BindError"],["impl From<PkarrError> for DiscoveryError"],["impl From<AddNodeAddrError> for ConnectWithOptsError"],["impl From<ConnectWithOptsError> for ConnectError"],["impl From<ConnectionError> for AlpnError"],["impl From<ConnectionError> for ConnectError"],["impl From<ConnectionError> for AcceptError"],["impl From<Box<dyn Error + Send + Sync>> for AcceptError"],["impl From<Error> for AcceptError"],["impl From<DiscoveryItem> for NodeInfo"],["impl From<ClosedStream> for AcceptError"],["impl From<RemoteInfo> for NodeAddr"],["impl From<RemoteNodeIdError> for AcceptError"],["impl<T> From<T> for ConcurrentDiscovery
where\n T: IntoIterator<Item = Box<dyn Discovery>>,
"],["impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>"]]],["iroh_base",[["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["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 ParseError"],["impl From<Error> for KeyParsingError"],["impl From<Error> for ParseError"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<DialError> for ConnectError"],["impl From<DnsError> for DialError"],["impl From<DecodingError> for ParseError"],["impl From<FrameType> for u32"],["impl From<FrameType> for VarInt"],["impl From<FrameTypeError> for Error"],["impl From<FrameTypeError> for Error"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Error> for DialError"],["impl From<NodeAddr> for NodeData"],["impl From<NodeAddr> for NodeInfo"],["impl From<RelayUrl> for RelayMap"],["impl From<RelayUrl> for RelayNode"],["impl From<NodeInfo> for NodeAddr"],["impl From<RelayNode> for RelayMap"],["impl From<ConnectError> for Error"],["impl From<ConnectionError> for Error"],["impl From<Elapsed> for DialError"],["impl From<Elapsed> for DnsError"],["impl From<Elapsed> for Error"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<JoinError> for SupervisorError"],["impl From<RecvError> for Error"],["impl From<ResolveError> for DnsError"],["impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver"],["impl From<SignedPacketBuildError> for EncodingError"],["impl From<TxtLookup> for TxtLookup"],["impl<T: AsRef<[u8]>> From<T> for Datagrams"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl From<IntoDiscoveryError> for BindError"],["impl From<PkarrError> for DiscoveryError"],["impl From<AddNodeAddrError> for ConnectWithOptsError"],["impl From<ConnectWithOptsError> for ConnectError"],["impl From<ConnectionError> for AlpnError"],["impl From<ConnectionError> for ConnectError"],["impl From<ConnectionError> for AcceptError"],["impl From<Box<dyn Error + Send + Sync>> for AcceptError"],["impl From<Error> for AcceptError"],["impl From<DiscoveryItem> for NodeInfo"],["impl From<ClosedStream> for AcceptError"],["impl From<RemoteInfo> for NodeAddr"],["impl From<RemoteNodeIdError> for AcceptError"],["impl<T> From<T> for ConcurrentDiscovery
where\n T: IntoIterator<Item = Box<dyn Discovery>>,
"],["impl<T: ProtocolHandler> From<T> for Box<dyn DynProtocolHandler>"]]],["iroh_base",[["impl From<(PublicKey, Option<RelayUrl>, &[SocketAddr])> for NodeAddr"],["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 ParseError"],["impl From<Error> for KeyParsingError"],["impl From<Error> for ParseError"],["impl From<SigningKey> for SecretKey"],["impl From<VerifyingKey> for PublicKey"],["impl From<[u8; 32]> for SecretKey"]]],["iroh_relay",[["impl From<DialError> for ConnectError"],["impl From<DnsError> for DialError"],["impl From<DecodingError> for ParseError"],["impl From<FrameType> for u32"],["impl From<FrameType> for VarInt"],["impl From<FrameTypeError> for Error"],["impl From<FrameTypeError> for Error"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Error> for DialError"],["impl From<NodeAddr> for NodeData"],["impl From<NodeAddr> for NodeInfo"],["impl From<RelayUrl> for RelayMap"],["impl From<RelayUrl> for RelayNode"],["impl From<NodeInfo> for NodeAddr"],["impl From<RelayNode> for RelayMap"],["impl From<ConnectError> for Error"],["impl From<ConnectionError> for Error"],["impl From<Elapsed> for DialError"],["impl From<Elapsed> for DnsError"],["impl From<Elapsed> for Error"],["impl From<Error> for ConnectError"],["impl From<Error> for RecvError"],["impl From<Error> for SendError"],["impl From<Error> for Error"],["impl From<Error> for Error"],["impl From<JoinError> for SupervisorError"],["impl From<RecvError> for Error"],["impl From<ResolveError> for DnsError"],["impl From<Resolver<GenericConnector<TokioRuntimeProvider>>> for DnsResolver"],["impl From<SignedPacketBuildError> for EncodingError"],["impl From<TxtLookup> for TxtLookup"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[7257,4938,11762]} \ No newline at end of file +//{"start":57,"fragment_lengths":[7257,4938,11208]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/fmt/trait.Debug.js b/pr/3331/docs/trait.impl/core/fmt/trait.Debug.js index 96d174d276..ca1a6f630e 100644 --- a/pr/3331/docs/trait.impl/core/fmt/trait.Debug.js +++ b/pr/3331/docs/trait.impl/core/fmt/trait.Debug.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Debug for DiscoveryError"],["impl Debug for IntoDiscoveryError"],["impl Debug for PkarrError"],["impl Debug for AddNodeAddrError"],["impl Debug for AlpnError"],["impl Debug for BindError"],["impl Debug for ConnectError"],["impl Debug for ConnectWithOptsError"],["impl Debug for ConnectionType"],["impl Debug for ControlMsg"],["impl Debug for DirectAddrType"],["impl Debug for GetMappingAddressError"],["impl Debug for PathSelection"],["impl Debug for RelayMode"],["impl Debug for Source"],["impl Debug for Probe"],["impl Debug for AcceptError"],["impl Debug for DnsDiscovery"],["impl Debug for DnsDiscoveryBuilder"],["impl Debug for MdnsDiscovery"],["impl Debug for MdnsDiscoveryBuilder"],["impl Debug for Builder"],["impl Debug for DhtDiscovery"],["impl Debug for PkarrPublisher"],["impl Debug for PkarrPublisherBuilder"],["impl Debug for PkarrRelayClient"],["impl Debug for PkarrResolver"],["impl Debug for PkarrResolverBuilder"],["impl Debug for StaticProvider"],["impl Debug for ConcurrentDiscovery"],["impl Debug for DiscoveryItem"],["impl Debug for Lagged"],["impl Debug for Builder"],["impl Debug for ConnectOptions"],["impl Debug for Connecting"],["impl Debug for Connection"],["impl Debug for DirectAddr"],["impl Debug for DirectAddrInfo"],["impl Debug for Endpoint"],["impl Debug for Incoming"],["impl Debug for IncomingFuture"],["impl Debug for RemoteInfo"],["impl Debug for RemoteNodeIdError"],["impl Debug for ZeroRttAccepted"],["impl Debug for EndpointMetrics"],["impl Debug for Metrics"],["impl Debug for Metrics"],["impl Debug for Options"],["impl Debug for QuicConfig"],["impl Debug for RelayLatencies"],["impl Debug for Report"],["impl Debug for Router"],["impl Debug for RouterBuilder"],["impl Debug for CleanupDropGuard"],["impl Debug for DnsPkarrServer"],["impl<'a> Debug for DiscoveryContext<'a>"],["impl<'a> Debug for Accept<'a>"],["impl<P> Debug for AccessLimit<P>
where\n P: Debug + ProtocolHandler + Clone,
"]]],["iroh_base",[["impl Debug for KeyParsingError"],["impl Debug for ParseError"],["impl Debug for NodeAddr"],["impl Debug for PublicKey"],["impl Debug for RelayUrl"],["impl Debug for RelayUrlParseError"],["impl Debug for SecretKey"],["impl Debug for NodeTicket"]]],["iroh_bench",[["impl Debug for Commands"],["impl Debug for Opt"],["impl Debug for Stats"],["impl Debug for StreamStats"],["impl Debug for TransferResult"],["impl Debug for Opt"]]],["iroh_dns_server",[["impl Debug for BootstrapOption"],["impl Debug for CertMode"],["impl Debug for RateLimitConfig"],["impl Debug for Config"],["impl Debug for MainlineConfig"],["impl Debug for MetricsConfig"],["impl Debug for StoreConfig"],["impl Debug for DnsConfig"],["impl Debug for DnsHandler"],["impl Debug for Handle"],["impl Debug for HttpConfig"],["impl Debug for HttpsConfig"],["impl Debug for Metrics"],["impl Debug for ZoneStore"]]],["iroh_relay",[["impl Debug for ConnectError"],["impl Debug for DialError"],["impl Debug for RecvError"],["impl Debug for SendError"],["impl Debug for DnsError"],["impl Debug for DecodingError"],["impl Debug for EncodingError"],["impl Debug for LookupError"],["impl Debug for ParseError"],["impl Debug for FrameType"],["impl Debug for FrameTypeError"],["impl Debug for Error"],["impl Debug for ClientToRelayMsg"],["impl Debug for Error"],["impl Debug for RelayToClientMsg"],["impl Debug for Error"],["impl Debug for Access"],["impl Debug for AccessConfig"],["impl Debug for SpawnError"],["impl Debug for SupervisorError"],["impl Debug for Client"],["impl Debug for ClientBuilder"],["impl Debug for ClientSink"],["impl Debug for ClientStream"],["impl Debug for DnsResolver"],["impl Debug for TXT"],["impl Debug for TxtLookup"],["impl Debug for MaxLengthExceededError"],["impl Debug for NodeData"],["impl Debug for NodeInfo"],["impl Debug for UserData"],["impl Debug for Datagrams"],["impl Debug for QuicClient"],["impl Debug for ClientRateLimit"],["impl Debug for Limits"],["impl Debug for Metrics"],["impl Debug for QuicConfig"],["impl Debug for RelayMetrics"],["impl Debug for Server"],["impl Debug for PingTracker"],["impl Debug for RelayMap"],["impl Debug for RelayNode"],["impl Debug for RelayQuicConfig"],["impl<E: Debug + Debug + Display> Debug for StaggeredError<E>"],["impl<EC: Debug, EA: Debug> Debug for CertConfig<EC, EA>"],["impl<EC: Debug, EA: Debug> Debug for RelayConfig<EC, EA>
where\n Option<TlsConfig<EC, EA>>: Debug,
"],["impl<EC: Debug, EA: Debug> Debug for ServerConfig<EC, EA>
where\n Option<RelayConfig<EC, EA>>: Debug,
"],["impl<EC: Debug, EA: Debug> Debug for TlsConfig<EC, EA>
where\n CertConfig<EC, EA>: Debug,
"],["impl<Loader: Debug + Send + 'static> Debug for ReloadingResolver<Loader>"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Debug for DiscoveryError"],["impl Debug for IntoDiscoveryError"],["impl Debug for PkarrError"],["impl Debug for AddNodeAddrError"],["impl Debug for AlpnError"],["impl Debug for BindError"],["impl Debug for ConnectError"],["impl Debug for ConnectWithOptsError"],["impl Debug for ConnectionType"],["impl Debug for ControlMsg"],["impl Debug for DirectAddrType"],["impl Debug for GetMappingAddressError"],["impl Debug for PathSelection"],["impl Debug for RelayMode"],["impl Debug for Source"],["impl Debug for Probe"],["impl Debug for AcceptError"],["impl Debug for DnsDiscovery"],["impl Debug for DnsDiscoveryBuilder"],["impl Debug for MdnsDiscovery"],["impl Debug for MdnsDiscoveryBuilder"],["impl Debug for Builder"],["impl Debug for DhtDiscovery"],["impl Debug for PkarrPublisher"],["impl Debug for PkarrPublisherBuilder"],["impl Debug for PkarrRelayClient"],["impl Debug for PkarrResolver"],["impl Debug for PkarrResolverBuilder"],["impl Debug for StaticProvider"],["impl Debug for ConcurrentDiscovery"],["impl Debug for DiscoveryItem"],["impl Debug for Lagged"],["impl Debug for Builder"],["impl Debug for ConnectOptions"],["impl Debug for Connecting"],["impl Debug for Connection"],["impl Debug for DirectAddr"],["impl Debug for DirectAddrInfo"],["impl Debug for Endpoint"],["impl Debug for Incoming"],["impl Debug for IncomingFuture"],["impl Debug for RemoteInfo"],["impl Debug for RemoteNodeIdError"],["impl Debug for ZeroRttAccepted"],["impl Debug for EndpointMetrics"],["impl Debug for Metrics"],["impl Debug for Metrics"],["impl Debug for Options"],["impl Debug for QuicConfig"],["impl Debug for RelayLatencies"],["impl Debug for Report"],["impl Debug for Router"],["impl Debug for RouterBuilder"],["impl Debug for CleanupDropGuard"],["impl Debug for DnsPkarrServer"],["impl<'a> Debug for DiscoveryContext<'a>"],["impl<'a> Debug for Accept<'a>"],["impl<P> Debug for AccessLimit<P>
where\n P: Debug + ProtocolHandler + Clone,
"]]],["iroh_base",[["impl Debug for KeyParsingError"],["impl Debug for ParseError"],["impl Debug for NodeAddr"],["impl Debug for PublicKey"],["impl Debug for RelayUrl"],["impl Debug for RelayUrlParseError"],["impl Debug for SecretKey"],["impl Debug for NodeTicket"]]],["iroh_bench",[["impl Debug for Commands"],["impl Debug for Opt"],["impl Debug for Stats"],["impl Debug for StreamStats"],["impl Debug for TransferResult"],["impl Debug for Opt"]]],["iroh_dns_server",[["impl Debug for BootstrapOption"],["impl Debug for CertMode"],["impl Debug for RateLimitConfig"],["impl Debug for Config"],["impl Debug for MainlineConfig"],["impl Debug for MetricsConfig"],["impl Debug for StoreConfig"],["impl Debug for DnsConfig"],["impl Debug for DnsHandler"],["impl Debug for Handle"],["impl Debug for HttpConfig"],["impl Debug for HttpsConfig"],["impl Debug for Metrics"],["impl Debug for ZoneStore"]]],["iroh_relay",[["impl Debug for ConnectError"],["impl Debug for DialError"],["impl Debug for RecvError"],["impl Debug for SendError"],["impl Debug for DnsError"],["impl Debug for DecodingError"],["impl Debug for EncodingError"],["impl Debug for LookupError"],["impl Debug for ParseError"],["impl Debug for FrameType"],["impl Debug for FrameTypeError"],["impl Debug for Error"],["impl Debug for ClientToRelayMsg"],["impl Debug for Error"],["impl Debug for RelayToClientMsg"],["impl Debug for Error"],["impl Debug for Access"],["impl Debug for AccessConfig"],["impl Debug for SpawnError"],["impl Debug for SupervisorError"],["impl Debug for Client"],["impl Debug for ClientBuilder"],["impl Debug for ClientSink"],["impl Debug for ClientStream"],["impl Debug for DnsResolver"],["impl Debug for TXT"],["impl Debug for TxtLookup"],["impl Debug for MaxLengthExceededError"],["impl Debug for NodeData"],["impl Debug for NodeInfo"],["impl Debug for UserData"],["impl Debug for QuicClient"],["impl Debug for ClientRateLimit"],["impl Debug for Limits"],["impl Debug for Metrics"],["impl Debug for QuicConfig"],["impl Debug for RelayMetrics"],["impl Debug for Server"],["impl Debug for PingTracker"],["impl Debug for RelayMap"],["impl Debug for RelayNode"],["impl Debug for RelayQuicConfig"],["impl<E: Debug + Debug + Display> Debug for StaggeredError<E>"],["impl<EC: Debug, EA: Debug> Debug for CertConfig<EC, EA>"],["impl<EC: Debug, EA: Debug> Debug for RelayConfig<EC, EA>
where\n Option<TlsConfig<EC, EA>>: Debug,
"],["impl<EC: Debug, EA: Debug> Debug for ServerConfig<EC, EA>
where\n Option<RelayConfig<EC, EA>>: Debug,
"],["impl<EC: Debug, EA: Debug> Debug for TlsConfig<EC, EA>
where\n CertConfig<EC, EA>: Debug,
"],["impl<Loader: Debug + Send + 'static> Debug for ReloadingResolver<Loader>"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[16703,2135,1583,3987,16700]} \ No newline at end of file +//{"start":57,"fragment_lengths":[16703,2135,1583,3987,16413]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/marker/trait.Freeze.js b/pr/3331/docs/trait.impl/core/marker/trait.Freeze.js index 8685c0682c..9d932e25f7 100644 --- a/pr/3331/docs/trait.impl/core/marker/trait.Freeze.js +++ b/pr/3331/docs/trait.impl/core/marker/trait.Freeze.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl !Freeze for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !Freeze for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !Freeze for Incoming",1,["iroh::endpoint::Incoming"]],["impl !Freeze for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !Freeze for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl !Freeze for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Freeze for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Freeze for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Freeze for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Freeze for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Freeze for BindError",1,["iroh::endpoint::BindError"]],["impl Freeze for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Freeze for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Freeze for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Freeze for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Freeze for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Freeze for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Freeze for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Freeze for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Freeze for Source",1,["iroh::magicsock::node_map::Source"]],["impl Freeze for Probe",1,["iroh::net_report::probes::Probe"]],["impl Freeze for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Freeze for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Freeze for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Freeze for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Freeze for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Freeze for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Freeze for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Freeze for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Freeze for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Freeze for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Freeze for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Freeze for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Freeze for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Freeze for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Freeze for Lagged",1,["iroh::discovery::Lagged"]],["impl Freeze for Builder",1,["iroh::endpoint::Builder"]],["impl Freeze for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Freeze for Connecting",1,["iroh::endpoint::Connecting"]],["impl Freeze for Connection",1,["iroh::endpoint::Connection"]],["impl Freeze for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Freeze for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Freeze for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Freeze for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Freeze for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Freeze for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Freeze for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Freeze for Options",1,["iroh::net_report::options::imp::Options"]],["impl Freeze for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Freeze for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Freeze for Report",1,["iroh::net_report::report::Report"]],["impl Freeze for Router",1,["iroh::protocol::Router"]],["impl Freeze for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Freeze for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Freeze for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> !Freeze for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<'a> Freeze for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<P> Freeze for AccessLimit<P>
where\n P: Freeze,
",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Freeze for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Freeze for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Freeze for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Freeze for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Freeze for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Freeze for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Freeze for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Freeze for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Freeze for Commands",1,["iroh_bench::Commands"]],["impl Freeze for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Freeze for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Freeze for Opt",1,["iroh_bench::s2n::Opt"]],["impl Freeze for Stats",1,["iroh_bench::stats::Stats"]],["impl Freeze for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Freeze for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Freeze for ClientStats",1,["iroh_bench::ClientStats"]],["impl Freeze for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !Freeze for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Freeze for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Freeze for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Freeze for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Freeze for Config",1,["iroh_dns_server::config::Config"]],["impl Freeze for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Freeze for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Freeze for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Freeze for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Freeze for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Freeze for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Freeze for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Freeze for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Freeze for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Freeze for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Freeze for Server",1,["iroh_dns_server::server::Server"]],["impl Freeze for AppState",1,["iroh_dns_server::state::AppState"]],["impl Freeze for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl !Freeze for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !Freeze for Error",1,["iroh_relay::protos::handshake::Error"]],["impl !Freeze for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl !Freeze for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl !Freeze for Error",1,["iroh_relay::quic::Error"]],["impl !Freeze for Client",1,["iroh_relay::client::Client"]],["impl !Freeze for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !Freeze for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl !Freeze for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Freeze for DialError",1,["iroh_relay::client::DialError"]],["impl Freeze for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Freeze for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Freeze for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Freeze for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Freeze for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Freeze for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Freeze for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Freeze for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Freeze for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Freeze for Error",1,["iroh_relay::protos::relay::Error"]],["impl Freeze for Access",1,["iroh_relay::server::Access"]],["impl Freeze for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Freeze for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Freeze for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Freeze for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Freeze for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Freeze for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Freeze for TXT",1,["iroh_relay::dns::TXT"]],["impl Freeze for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Freeze for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Freeze for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Freeze for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Freeze for UserData",1,["iroh_relay::node_info::UserData"]],["impl Freeze for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Freeze for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Freeze for Limits",1,["iroh_relay::server::Limits"]],["impl Freeze for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Freeze for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Freeze for Server",1,["iroh_relay::server::Server"]],["impl Freeze for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Freeze for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Freeze for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Freeze for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Freeze for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Freeze for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Freeze for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Freeze for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Freeze for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Freeze for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl !Freeze for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !Freeze for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !Freeze for Incoming",1,["iroh::endpoint::Incoming"]],["impl !Freeze for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !Freeze for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl !Freeze for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Freeze for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Freeze for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Freeze for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Freeze for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Freeze for BindError",1,["iroh::endpoint::BindError"]],["impl Freeze for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Freeze for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Freeze for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Freeze for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Freeze for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Freeze for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Freeze for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Freeze for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Freeze for Source",1,["iroh::magicsock::node_map::Source"]],["impl Freeze for Probe",1,["iroh::net_report::probes::Probe"]],["impl Freeze for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Freeze for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Freeze for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Freeze for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Freeze for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Freeze for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Freeze for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Freeze for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Freeze for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Freeze for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Freeze for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Freeze for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Freeze for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Freeze for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Freeze for Lagged",1,["iroh::discovery::Lagged"]],["impl Freeze for Builder",1,["iroh::endpoint::Builder"]],["impl Freeze for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Freeze for Connecting",1,["iroh::endpoint::Connecting"]],["impl Freeze for Connection",1,["iroh::endpoint::Connection"]],["impl Freeze for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Freeze for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Freeze for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Freeze for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Freeze for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Freeze for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Freeze for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Freeze for Options",1,["iroh::net_report::options::imp::Options"]],["impl Freeze for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Freeze for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Freeze for Report",1,["iroh::net_report::report::Report"]],["impl Freeze for Router",1,["iroh::protocol::Router"]],["impl Freeze for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Freeze for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Freeze for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> !Freeze for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<'a> Freeze for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<P> Freeze for AccessLimit<P>
where\n P: Freeze,
",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Freeze for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Freeze for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Freeze for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Freeze for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Freeze for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Freeze for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Freeze for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Freeze for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Freeze for Commands",1,["iroh_bench::Commands"]],["impl Freeze for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Freeze for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Freeze for Opt",1,["iroh_bench::s2n::Opt"]],["impl Freeze for Stats",1,["iroh_bench::stats::Stats"]],["impl Freeze for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Freeze for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Freeze for ClientStats",1,["iroh_bench::ClientStats"]],["impl Freeze for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !Freeze for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Freeze for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Freeze for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Freeze for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Freeze for Config",1,["iroh_dns_server::config::Config"]],["impl Freeze for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Freeze for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Freeze for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Freeze for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Freeze for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Freeze for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Freeze for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Freeze for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Freeze for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Freeze for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Freeze for Server",1,["iroh_dns_server::server::Server"]],["impl Freeze for AppState",1,["iroh_dns_server::state::AppState"]],["impl Freeze for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl !Freeze for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !Freeze for Error",1,["iroh_relay::protos::handshake::Error"]],["impl !Freeze for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl !Freeze for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl !Freeze for Error",1,["iroh_relay::quic::Error"]],["impl !Freeze for Client",1,["iroh_relay::client::Client"]],["impl !Freeze for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !Freeze for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Freeze for DialError",1,["iroh_relay::client::DialError"]],["impl Freeze for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Freeze for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Freeze for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Freeze for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Freeze for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Freeze for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Freeze for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Freeze for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Freeze for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Freeze for Error",1,["iroh_relay::protos::relay::Error"]],["impl Freeze for Access",1,["iroh_relay::server::Access"]],["impl Freeze for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Freeze for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Freeze for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Freeze for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Freeze for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Freeze for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Freeze for TXT",1,["iroh_relay::dns::TXT"]],["impl Freeze for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Freeze for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Freeze for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Freeze for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Freeze for UserData",1,["iroh_relay::node_info::UserData"]],["impl Freeze for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Freeze for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Freeze for Limits",1,["iroh_relay::server::Limits"]],["impl Freeze for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Freeze for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Freeze for Server",1,["iroh_relay::server::Server"]],["impl Freeze for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Freeze for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Freeze for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Freeze for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Freeze for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Freeze for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Freeze for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Freeze for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Freeze for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Freeze for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[19351,2508,2769,6015,16125]} \ No newline at end of file +//{"start":57,"fragment_lengths":[19351,2508,2769,6015,15785]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/marker/trait.Send.js b/pr/3331/docs/trait.impl/core/marker/trait.Send.js index 9807275e34..de22cbd6ef 100644 --- a/pr/3331/docs/trait.impl/core/marker/trait.Send.js +++ b/pr/3331/docs/trait.impl/core/marker/trait.Send.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Send for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Send for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Send for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Send for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Send for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Send for BindError",1,["iroh::endpoint::BindError"]],["impl Send for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Send for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Send for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Send for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Send for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Send for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Send for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Send for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Send for Source",1,["iroh::magicsock::node_map::Source"]],["impl Send for Probe",1,["iroh::net_report::probes::Probe"]],["impl Send for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Send for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Send for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Send for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Send for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Send for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Send for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Send for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Send for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Send for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Send for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Send for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Send for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Send for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Send for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Send for Lagged",1,["iroh::discovery::Lagged"]],["impl Send for Builder",1,["iroh::endpoint::Builder"]],["impl Send for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Send for Connecting",1,["iroh::endpoint::Connecting"]],["impl Send for Connection",1,["iroh::endpoint::Connection"]],["impl Send for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Send for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Send for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Send for Incoming",1,["iroh::endpoint::Incoming"]],["impl Send for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl Send for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Send for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Send for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Send for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Send for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Send for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Send for Options",1,["iroh::net_report::options::imp::Options"]],["impl Send for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Send for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Send for Report",1,["iroh::net_report::report::Report"]],["impl Send for Router",1,["iroh::protocol::Router"]],["impl Send for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Send for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Send for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Send for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> Send for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> Send for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Send for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Send for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Send for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Send for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Send for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Send for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Send for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Send for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Send for Commands",1,["iroh_bench::Commands"]],["impl Send for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Send for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Send for Opt",1,["iroh_bench::s2n::Opt"]],["impl Send for Stats",1,["iroh_bench::stats::Stats"]],["impl Send for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Send for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Send for ClientStats",1,["iroh_bench::ClientStats"]],["impl Send for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Send for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Send for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Send for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Send for Config",1,["iroh_dns_server::config::Config"]],["impl Send for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Send for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Send for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Send for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Send for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Send for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Send for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Send for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Send for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Send for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Send for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Send for Server",1,["iroh_dns_server::server::Server"]],["impl Send for AppState",1,["iroh_dns_server::state::AppState"]],["impl Send for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Send for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Send for DialError",1,["iroh_relay::client::DialError"]],["impl Send for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Send for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Send for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Send for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Send for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Send for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Send for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Send for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Send for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Send for Error",1,["iroh_relay::protos::handshake::Error"]],["impl Send for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl Send for Error",1,["iroh_relay::protos::relay::Error"]],["impl Send for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl Send for Error",1,["iroh_relay::quic::Error"]],["impl Send for Access",1,["iroh_relay::server::Access"]],["impl Send for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Send for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Send for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Send for Client",1,["iroh_relay::client::Client"]],["impl Send for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Send for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Send for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Send for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Send for TXT",1,["iroh_relay::dns::TXT"]],["impl Send for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Send for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Send for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Send for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Send for UserData",1,["iroh_relay::node_info::UserData"]],["impl Send for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl Send for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Send for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Send for Limits",1,["iroh_relay::server::Limits"]],["impl Send for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Send for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Send for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Send for Server",1,["iroh_relay::server::Server"]],["impl Send for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Send for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Send for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Send for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Send for StaggeredError<E>
where\n E: Send,
",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Send for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Send for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Send for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Send for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Send for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Send for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Send for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Send for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Send for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Send for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Send for BindError",1,["iroh::endpoint::BindError"]],["impl Send for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Send for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Send for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Send for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Send for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Send for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Send for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Send for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Send for Source",1,["iroh::magicsock::node_map::Source"]],["impl Send for Probe",1,["iroh::net_report::probes::Probe"]],["impl Send for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Send for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Send for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Send for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Send for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Send for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Send for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Send for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Send for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Send for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Send for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Send for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Send for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Send for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Send for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Send for Lagged",1,["iroh::discovery::Lagged"]],["impl Send for Builder",1,["iroh::endpoint::Builder"]],["impl Send for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Send for Connecting",1,["iroh::endpoint::Connecting"]],["impl Send for Connection",1,["iroh::endpoint::Connection"]],["impl Send for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Send for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Send for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Send for Incoming",1,["iroh::endpoint::Incoming"]],["impl Send for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl Send for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Send for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Send for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Send for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Send for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Send for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Send for Options",1,["iroh::net_report::options::imp::Options"]],["impl Send for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Send for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Send for Report",1,["iroh::net_report::report::Report"]],["impl Send for Router",1,["iroh::protocol::Router"]],["impl Send for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Send for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Send for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Send for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> Send for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> Send for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Send for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Send for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Send for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Send for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Send for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Send for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Send for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Send for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Send for Commands",1,["iroh_bench::Commands"]],["impl Send for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Send for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Send for Opt",1,["iroh_bench::s2n::Opt"]],["impl Send for Stats",1,["iroh_bench::stats::Stats"]],["impl Send for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Send for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Send for ClientStats",1,["iroh_bench::ClientStats"]],["impl Send for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Send for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Send for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Send for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Send for Config",1,["iroh_dns_server::config::Config"]],["impl Send for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Send for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Send for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Send for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Send for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Send for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Send for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Send for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Send for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Send for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Send for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Send for Server",1,["iroh_dns_server::server::Server"]],["impl Send for AppState",1,["iroh_dns_server::state::AppState"]],["impl Send for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Send for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Send for DialError",1,["iroh_relay::client::DialError"]],["impl Send for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Send for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Send for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Send for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Send for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Send for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Send for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Send for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Send for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Send for Error",1,["iroh_relay::protos::handshake::Error"]],["impl Send for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl Send for Error",1,["iroh_relay::protos::relay::Error"]],["impl Send for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl Send for Error",1,["iroh_relay::quic::Error"]],["impl Send for Access",1,["iroh_relay::server::Access"]],["impl Send for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Send for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Send for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Send for Client",1,["iroh_relay::client::Client"]],["impl Send for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Send for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Send for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Send for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Send for TXT",1,["iroh_relay::dns::TXT"]],["impl Send for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Send for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Send for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Send for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Send for UserData",1,["iroh_relay::node_info::UserData"]],["impl Send for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Send for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Send for Limits",1,["iroh_relay::server::Limits"]],["impl Send for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Send for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Send for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Send for Server",1,["iroh_relay::server::Server"]],["impl Send for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Send for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Send for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Send for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Send for StaggeredError<E>
where\n E: Send,
",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Send for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Send for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Send for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Send for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Send for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[18815,2460,2715,5906,15997]} \ No newline at end of file +//{"start":57,"fragment_lengths":[18815,2460,2715,5906,15664]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/marker/trait.StructuralPartialEq.js b/pr/3331/docs/trait.impl/core/marker/trait.StructuralPartialEq.js index 3546bdaae6..9ee0a232e2 100644 --- a/pr/3331/docs/trait.impl/core/marker/trait.StructuralPartialEq.js +++ b/pr/3331/docs/trait.impl/core/marker/trait.StructuralPartialEq.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl StructuralPartialEq for ConnectionType"],["impl StructuralPartialEq for ControlMsg"],["impl StructuralPartialEq for DirectAddrType"],["impl StructuralPartialEq for PathSelection"],["impl StructuralPartialEq for RelayMode"],["impl StructuralPartialEq for Source"],["impl StructuralPartialEq for Probe"],["impl StructuralPartialEq for DirectAddr"],["impl StructuralPartialEq for DirectAddrInfo"],["impl StructuralPartialEq for RemoteInfo"],["impl StructuralPartialEq for RelayLatencies"],["impl StructuralPartialEq for Report"]]],["iroh_base",[["impl StructuralPartialEq for NodeAddr"],["impl StructuralPartialEq for PublicKey"],["impl StructuralPartialEq for RelayUrl"],["impl StructuralPartialEq for NodeTicket"]]],["iroh_dns_server",[["impl StructuralPartialEq for CertMode"]]],["iroh_relay",[["impl StructuralPartialEq for FrameType"],["impl StructuralPartialEq for ClientToRelayMsg"],["impl StructuralPartialEq for RelayToClientMsg"],["impl StructuralPartialEq for Access"],["impl StructuralPartialEq for NodeData"],["impl StructuralPartialEq for NodeInfo"],["impl StructuralPartialEq for UserData"],["impl StructuralPartialEq for Datagrams"],["impl StructuralPartialEq for RelayMap"],["impl StructuralPartialEq for RelayNode"],["impl StructuralPartialEq for RelayQuicConfig"]]]]); + var implementors = Object.fromEntries([["iroh",[["impl StructuralPartialEq for ConnectionType"],["impl StructuralPartialEq for ControlMsg"],["impl StructuralPartialEq for DirectAddrType"],["impl StructuralPartialEq for PathSelection"],["impl StructuralPartialEq for RelayMode"],["impl StructuralPartialEq for Source"],["impl StructuralPartialEq for Probe"],["impl StructuralPartialEq for DirectAddr"],["impl StructuralPartialEq for DirectAddrInfo"],["impl StructuralPartialEq for RemoteInfo"],["impl StructuralPartialEq for RelayLatencies"],["impl StructuralPartialEq for Report"]]],["iroh_base",[["impl StructuralPartialEq for NodeAddr"],["impl StructuralPartialEq for PublicKey"],["impl StructuralPartialEq for RelayUrl"],["impl StructuralPartialEq for NodeTicket"]]],["iroh_dns_server",[["impl StructuralPartialEq for CertMode"]]],["iroh_relay",[["impl StructuralPartialEq for FrameType"],["impl StructuralPartialEq for ClientToRelayMsg"],["impl StructuralPartialEq for RelayToClientMsg"],["impl StructuralPartialEq for Access"],["impl StructuralPartialEq for NodeData"],["impl StructuralPartialEq for NodeInfo"],["impl StructuralPartialEq for UserData"],["impl StructuralPartialEq for RelayMap"],["impl StructuralPartialEq for RelayNode"],["impl StructuralPartialEq for RelayQuicConfig"]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[3799,1248,341,3601]} \ No newline at end of file +//{"start":57,"fragment_lengths":[3799,1248,341,3266]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/marker/trait.Sync.js b/pr/3331/docs/trait.impl/core/marker/trait.Sync.js index e76c012b86..624c239dcd 100644 --- a/pr/3331/docs/trait.impl/core/marker/trait.Sync.js +++ b/pr/3331/docs/trait.impl/core/marker/trait.Sync.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Sync for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Sync for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Sync for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Sync for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Sync for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Sync for BindError",1,["iroh::endpoint::BindError"]],["impl Sync for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Sync for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Sync for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Sync for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Sync for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Sync for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Sync for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Sync for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Sync for Source",1,["iroh::magicsock::node_map::Source"]],["impl Sync for Probe",1,["iroh::net_report::probes::Probe"]],["impl Sync for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Sync for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Sync for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Sync for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Sync for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Sync for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Sync for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Sync for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Sync for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Sync for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Sync for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Sync for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Sync for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Sync for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Sync for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Sync for Lagged",1,["iroh::discovery::Lagged"]],["impl Sync for Builder",1,["iroh::endpoint::Builder"]],["impl Sync for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Sync for Connecting",1,["iroh::endpoint::Connecting"]],["impl Sync for Connection",1,["iroh::endpoint::Connection"]],["impl Sync for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Sync for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Sync for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Sync for Incoming",1,["iroh::endpoint::Incoming"]],["impl Sync for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl Sync for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Sync for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Sync for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Sync for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Sync for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Sync for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Sync for Options",1,["iroh::net_report::options::imp::Options"]],["impl Sync for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Sync for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Sync for Report",1,["iroh::net_report::report::Report"]],["impl Sync for Router",1,["iroh::protocol::Router"]],["impl Sync for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Sync for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Sync for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Sync for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> Sync for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> Sync for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Sync for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Sync for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Sync for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Sync for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Sync for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Sync for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Sync for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Sync for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Sync for Commands",1,["iroh_bench::Commands"]],["impl Sync for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Sync for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Sync for Opt",1,["iroh_bench::s2n::Opt"]],["impl Sync for Stats",1,["iroh_bench::stats::Stats"]],["impl Sync for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Sync for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Sync for ClientStats",1,["iroh_bench::ClientStats"]],["impl Sync for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Sync for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Sync for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Sync for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Sync for Config",1,["iroh_dns_server::config::Config"]],["impl Sync for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Sync for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Sync for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Sync for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Sync for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Sync for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Sync for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Sync for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Sync for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Sync for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Sync for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Sync for Server",1,["iroh_dns_server::server::Server"]],["impl Sync for AppState",1,["iroh_dns_server::state::AppState"]],["impl Sync for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Sync for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Sync for DialError",1,["iroh_relay::client::DialError"]],["impl Sync for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Sync for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Sync for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Sync for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Sync for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Sync for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Sync for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Sync for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Sync for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Sync for Error",1,["iroh_relay::protos::handshake::Error"]],["impl Sync for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl Sync for Error",1,["iroh_relay::protos::relay::Error"]],["impl Sync for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl Sync for Error",1,["iroh_relay::quic::Error"]],["impl Sync for Access",1,["iroh_relay::server::Access"]],["impl Sync for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Sync for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Sync for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Sync for Client",1,["iroh_relay::client::Client"]],["impl Sync for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Sync for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Sync for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Sync for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Sync for TXT",1,["iroh_relay::dns::TXT"]],["impl Sync for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Sync for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Sync for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Sync for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Sync for UserData",1,["iroh_relay::node_info::UserData"]],["impl Sync for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl Sync for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Sync for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Sync for Limits",1,["iroh_relay::server::Limits"]],["impl Sync for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Sync for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Sync for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Sync for Server",1,["iroh_relay::server::Server"]],["impl Sync for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Sync for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Sync for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Sync for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Sync for StaggeredError<E>
where\n E: Sync,
",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !Sync for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !Sync for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !Sync for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !Sync for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Sync for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Sync for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Sync for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Sync for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Sync for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Sync for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Sync for BindError",1,["iroh::endpoint::BindError"]],["impl Sync for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Sync for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Sync for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Sync for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Sync for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Sync for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Sync for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Sync for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Sync for Source",1,["iroh::magicsock::node_map::Source"]],["impl Sync for Probe",1,["iroh::net_report::probes::Probe"]],["impl Sync for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Sync for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Sync for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Sync for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Sync for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Sync for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Sync for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Sync for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Sync for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Sync for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Sync for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Sync for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Sync for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Sync for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Sync for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Sync for Lagged",1,["iroh::discovery::Lagged"]],["impl Sync for Builder",1,["iroh::endpoint::Builder"]],["impl Sync for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Sync for Connecting",1,["iroh::endpoint::Connecting"]],["impl Sync for Connection",1,["iroh::endpoint::Connection"]],["impl Sync for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Sync for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Sync for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Sync for Incoming",1,["iroh::endpoint::Incoming"]],["impl Sync for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl Sync for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Sync for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Sync for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Sync for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Sync for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Sync for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Sync for Options",1,["iroh::net_report::options::imp::Options"]],["impl Sync for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Sync for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Sync for Report",1,["iroh::net_report::report::Report"]],["impl Sync for Router",1,["iroh::protocol::Router"]],["impl Sync for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Sync for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Sync for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Sync for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> Sync for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> Sync for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Sync for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Sync for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Sync for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Sync for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Sync for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Sync for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Sync for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Sync for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Sync for Commands",1,["iroh_bench::Commands"]],["impl Sync for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Sync for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Sync for Opt",1,["iroh_bench::s2n::Opt"]],["impl Sync for Stats",1,["iroh_bench::stats::Stats"]],["impl Sync for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Sync for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Sync for ClientStats",1,["iroh_bench::ClientStats"]],["impl Sync for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Sync for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Sync for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Sync for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Sync for Config",1,["iroh_dns_server::config::Config"]],["impl Sync for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Sync for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Sync for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Sync for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Sync for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Sync for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Sync for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Sync for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Sync for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Sync for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Sync for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Sync for Server",1,["iroh_dns_server::server::Server"]],["impl Sync for AppState",1,["iroh_dns_server::state::AppState"]],["impl Sync for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Sync for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Sync for DialError",1,["iroh_relay::client::DialError"]],["impl Sync for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Sync for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Sync for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Sync for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Sync for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Sync for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Sync for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Sync for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Sync for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Sync for Error",1,["iroh_relay::protos::handshake::Error"]],["impl Sync for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl Sync for Error",1,["iroh_relay::protos::relay::Error"]],["impl Sync for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl Sync for Error",1,["iroh_relay::quic::Error"]],["impl Sync for Access",1,["iroh_relay::server::Access"]],["impl Sync for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Sync for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Sync for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Sync for Client",1,["iroh_relay::client::Client"]],["impl Sync for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Sync for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Sync for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Sync for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Sync for TXT",1,["iroh_relay::dns::TXT"]],["impl Sync for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Sync for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Sync for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Sync for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Sync for UserData",1,["iroh_relay::node_info::UserData"]],["impl Sync for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Sync for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Sync for Limits",1,["iroh_relay::server::Limits"]],["impl Sync for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Sync for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Sync for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Sync for Server",1,["iroh_relay::server::Server"]],["impl Sync for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Sync for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Sync for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Sync for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Sync for StaggeredError<E>
where\n E: Sync,
",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !Sync for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !Sync for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !Sync for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !Sync for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Sync for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[18815,2460,2715,5906,16021]} \ No newline at end of file +//{"start":57,"fragment_lengths":[18815,2460,2715,5906,15688]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/marker/trait.Unpin.js b/pr/3331/docs/trait.impl/core/marker/trait.Unpin.js index c851659b01..92fbd4ed5e 100644 --- a/pr/3331/docs/trait.impl/core/marker/trait.Unpin.js +++ b/pr/3331/docs/trait.impl/core/marker/trait.Unpin.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl Unpin for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Unpin for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Unpin for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Unpin for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Unpin for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Unpin for BindError",1,["iroh::endpoint::BindError"]],["impl Unpin for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Unpin for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Unpin for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Unpin for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Unpin for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Unpin for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Unpin for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Unpin for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Unpin for Source",1,["iroh::magicsock::node_map::Source"]],["impl Unpin for Probe",1,["iroh::net_report::probes::Probe"]],["impl Unpin for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Unpin for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Unpin for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Unpin for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Unpin for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Unpin for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Unpin for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Unpin for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Unpin for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Unpin for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Unpin for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Unpin for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Unpin for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Unpin for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Unpin for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Unpin for Lagged",1,["iroh::discovery::Lagged"]],["impl Unpin for Builder",1,["iroh::endpoint::Builder"]],["impl Unpin for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Unpin for Connection",1,["iroh::endpoint::Connection"]],["impl Unpin for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Unpin for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Unpin for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Unpin for Incoming",1,["iroh::endpoint::Incoming"]],["impl Unpin for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Unpin for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Unpin for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Unpin for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Unpin for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Unpin for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Unpin for Options",1,["iroh::net_report::options::imp::Options"]],["impl Unpin for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Unpin for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Unpin for Report",1,["iroh::net_report::report::Report"]],["impl Unpin for Router",1,["iroh::protocol::Router"]],["impl Unpin for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Unpin for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Unpin for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Unpin for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'pin> Unpin for Connecting
where\n PinnedFieldsOf<__Connecting<'pin>>: Unpin,
"],["impl<'pin> Unpin for IncomingFuture
where\n PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
"],["impl<'pin, 'a> Unpin for Accept<'a>
where\n PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
"],["impl<P> Unpin for AccessLimit<P>
where\n P: Unpin,
",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Unpin for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Unpin for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Unpin for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Unpin for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Unpin for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Unpin for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Unpin for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Unpin for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Unpin for Commands",1,["iroh_bench::Commands"]],["impl Unpin for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Unpin for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Unpin for Opt",1,["iroh_bench::s2n::Opt"]],["impl Unpin for Stats",1,["iroh_bench::stats::Stats"]],["impl Unpin for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Unpin for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Unpin for ClientStats",1,["iroh_bench::ClientStats"]],["impl Unpin for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Unpin for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Unpin for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Unpin for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Unpin for Config",1,["iroh_dns_server::config::Config"]],["impl Unpin for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Unpin for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Unpin for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Unpin for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Unpin for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Unpin for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Unpin for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Unpin for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Unpin for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Unpin for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Unpin for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Unpin for Server",1,["iroh_dns_server::server::Server"]],["impl Unpin for AppState",1,["iroh_dns_server::state::AppState"]],["impl Unpin for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Unpin for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Unpin for DialError",1,["iroh_relay::client::DialError"]],["impl Unpin for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Unpin for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Unpin for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Unpin for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Unpin for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Unpin for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Unpin for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Unpin for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Unpin for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Unpin for Error",1,["iroh_relay::protos::handshake::Error"]],["impl Unpin for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl Unpin for Error",1,["iroh_relay::protos::relay::Error"]],["impl Unpin for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl Unpin for Error",1,["iroh_relay::quic::Error"]],["impl Unpin for Access",1,["iroh_relay::server::Access"]],["impl Unpin for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Unpin for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Unpin for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Unpin for Client",1,["iroh_relay::client::Client"]],["impl Unpin for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Unpin for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Unpin for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Unpin for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Unpin for TXT",1,["iroh_relay::dns::TXT"]],["impl Unpin for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Unpin for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Unpin for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Unpin for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Unpin for UserData",1,["iroh_relay::node_info::UserData"]],["impl Unpin for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl Unpin for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Unpin for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Unpin for Limits",1,["iroh_relay::server::Limits"]],["impl Unpin for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Unpin for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Unpin for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Unpin for Server",1,["iroh_relay::server::Server"]],["impl Unpin for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Unpin for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Unpin for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Unpin for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Unpin for StaggeredError<E>
where\n E: Unpin,
",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Unpin for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Unpin for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Unpin for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Unpin for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Unpin for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl Unpin for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl Unpin for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl Unpin for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl Unpin for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl Unpin for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl Unpin for BindError",1,["iroh::endpoint::BindError"]],["impl Unpin for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl Unpin for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl Unpin for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl Unpin for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl Unpin for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl Unpin for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl Unpin for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl Unpin for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl Unpin for Source",1,["iroh::magicsock::node_map::Source"]],["impl Unpin for Probe",1,["iroh::net_report::probes::Probe"]],["impl Unpin for AcceptError",1,["iroh::protocol::AcceptError"]],["impl Unpin for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl Unpin for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl Unpin for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl Unpin for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl Unpin for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl Unpin for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl Unpin for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl Unpin for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl Unpin for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl Unpin for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl Unpin for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl Unpin for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl Unpin for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl Unpin for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl Unpin for Lagged",1,["iroh::discovery::Lagged"]],["impl Unpin for Builder",1,["iroh::endpoint::Builder"]],["impl Unpin for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl Unpin for Connection",1,["iroh::endpoint::Connection"]],["impl Unpin for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl Unpin for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl Unpin for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl Unpin for Incoming",1,["iroh::endpoint::Incoming"]],["impl Unpin for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl Unpin for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl Unpin for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl Unpin for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl Unpin for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl Unpin for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl Unpin for Options",1,["iroh::net_report::options::imp::Options"]],["impl Unpin for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl Unpin for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl Unpin for Report",1,["iroh::net_report::report::Report"]],["impl Unpin for Router",1,["iroh::protocol::Router"]],["impl Unpin for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl Unpin for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl Unpin for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl<'a> Unpin for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'pin> Unpin for Connecting
where\n PinnedFieldsOf<__Connecting<'pin>>: Unpin,
"],["impl<'pin> Unpin for IncomingFuture
where\n PinnedFieldsOf<__IncomingFuture<'pin>>: Unpin,
"],["impl<'pin, 'a> Unpin for Accept<'a>
where\n PinnedFieldsOf<__Accept<'pin, 'a>>: Unpin,
"],["impl<P> Unpin for AccessLimit<P>
where\n P: Unpin,
",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl Unpin for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl Unpin for ParseError",1,["iroh_base::ticket::ParseError"]],["impl Unpin for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl Unpin for PublicKey",1,["iroh_base::key::PublicKey"]],["impl Unpin for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl Unpin for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl Unpin for SecretKey",1,["iroh_base::key::SecretKey"]],["impl Unpin for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl Unpin for Commands",1,["iroh_bench::Commands"]],["impl Unpin for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl Unpin for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl Unpin for Opt",1,["iroh_bench::s2n::Opt"]],["impl Unpin for Stats",1,["iroh_bench::stats::Stats"]],["impl Unpin for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl Unpin for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl Unpin for ClientStats",1,["iroh_bench::ClientStats"]],["impl Unpin for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl Unpin for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl Unpin for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl Unpin for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl Unpin for Config",1,["iroh_dns_server::config::Config"]],["impl Unpin for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl Unpin for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl Unpin for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl Unpin for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl Unpin for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl Unpin for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl Unpin for Handle",1,["iroh_dns_server::dns::Handle"]],["impl Unpin for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl Unpin for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl Unpin for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl Unpin for Metrics",1,["iroh_dns_server::metrics::Metrics"]],["impl Unpin for Server",1,["iroh_dns_server::server::Server"]],["impl Unpin for AppState",1,["iroh_dns_server::state::AppState"]],["impl Unpin for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]]]],["iroh_relay",[["impl Unpin for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl Unpin for DialError",1,["iroh_relay::client::DialError"]],["impl Unpin for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl Unpin for SendError",1,["iroh_relay::client::conn::SendError"]],["impl Unpin for DnsError",1,["iroh_relay::dns::DnsError"]],["impl Unpin for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl Unpin for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl Unpin for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl Unpin for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl Unpin for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl Unpin for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl Unpin for Error",1,["iroh_relay::protos::handshake::Error"]],["impl Unpin for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl Unpin for Error",1,["iroh_relay::protos::relay::Error"]],["impl Unpin for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl Unpin for Error",1,["iroh_relay::quic::Error"]],["impl Unpin for Access",1,["iroh_relay::server::Access"]],["impl Unpin for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl Unpin for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl Unpin for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl Unpin for Client",1,["iroh_relay::client::Client"]],["impl Unpin for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl Unpin for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl Unpin for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl Unpin for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl Unpin for TXT",1,["iroh_relay::dns::TXT"]],["impl Unpin for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl Unpin for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl Unpin for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl Unpin for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl Unpin for UserData",1,["iroh_relay::node_info::UserData"]],["impl Unpin for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl Unpin for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl Unpin for Limits",1,["iroh_relay::server::Limits"]],["impl Unpin for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl Unpin for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl Unpin for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl Unpin for Server",1,["iroh_relay::server::Server"]],["impl Unpin for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl Unpin for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl Unpin for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl Unpin for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> Unpin for StaggeredError<E>
where\n E: Unpin,
",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA> Unpin for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA> Unpin for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA> Unpin for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA> Unpin for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> Unpin for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[19771,2484,2742,5960,16147]} \ No newline at end of file +//{"start":57,"fragment_lengths":[19771,2484,2742,5960,15811]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js b/pr/3331/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js index ef6ed0561f..cd43e477e7 100644 --- a/pr/3331/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js +++ b/pr/3331/docs/trait.impl/core/panic/unwind_safe/trait.RefUnwindSafe.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl !RefUnwindSafe for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl !RefUnwindSafe for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl !RefUnwindSafe for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl !RefUnwindSafe for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl !RefUnwindSafe for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !RefUnwindSafe for BindError",1,["iroh::endpoint::BindError"]],["impl !RefUnwindSafe for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl !RefUnwindSafe for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl !RefUnwindSafe for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl !RefUnwindSafe for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !RefUnwindSafe for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl !RefUnwindSafe for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl !RefUnwindSafe for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl !RefUnwindSafe for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl !RefUnwindSafe for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl !RefUnwindSafe for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl !RefUnwindSafe for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl !RefUnwindSafe for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl !RefUnwindSafe for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl !RefUnwindSafe for Builder",1,["iroh::endpoint::Builder"]],["impl !RefUnwindSafe for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl !RefUnwindSafe for Connecting",1,["iroh::endpoint::Connecting"]],["impl !RefUnwindSafe for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl !RefUnwindSafe for Incoming",1,["iroh::endpoint::Incoming"]],["impl !RefUnwindSafe for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !RefUnwindSafe for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl !RefUnwindSafe for Options",1,["iroh::net_report::options::imp::Options"]],["impl !RefUnwindSafe for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl !RefUnwindSafe for Router",1,["iroh::protocol::Router"]],["impl !RefUnwindSafe for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl !RefUnwindSafe for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl !RefUnwindSafe for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl RefUnwindSafe for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl RefUnwindSafe for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl RefUnwindSafe for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl RefUnwindSafe for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl RefUnwindSafe for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl RefUnwindSafe for Source",1,["iroh::magicsock::node_map::Source"]],["impl RefUnwindSafe for Probe",1,["iroh::net_report::probes::Probe"]],["impl RefUnwindSafe for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl RefUnwindSafe for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl RefUnwindSafe for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl RefUnwindSafe for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl RefUnwindSafe for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl RefUnwindSafe for Lagged",1,["iroh::discovery::Lagged"]],["impl RefUnwindSafe for Connection",1,["iroh::endpoint::Connection"]],["impl RefUnwindSafe for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl RefUnwindSafe for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl RefUnwindSafe for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl RefUnwindSafe for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl RefUnwindSafe for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl RefUnwindSafe for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl RefUnwindSafe for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl RefUnwindSafe for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl RefUnwindSafe for Report",1,["iroh::net_report::report::Report"]],["impl<'a> !RefUnwindSafe for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> !RefUnwindSafe for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> !RefUnwindSafe for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl !RefUnwindSafe for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl !RefUnwindSafe for ParseError",1,["iroh_base::ticket::ParseError"]],["impl RefUnwindSafe for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl RefUnwindSafe for PublicKey",1,["iroh_base::key::PublicKey"]],["impl RefUnwindSafe for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl RefUnwindSafe for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl RefUnwindSafe for SecretKey",1,["iroh_base::key::SecretKey"]],["impl RefUnwindSafe for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl !RefUnwindSafe for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl RefUnwindSafe for Commands",1,["iroh_bench::Commands"]],["impl RefUnwindSafe for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl RefUnwindSafe for Opt",1,["iroh_bench::s2n::Opt"]],["impl RefUnwindSafe for Stats",1,["iroh_bench::stats::Stats"]],["impl RefUnwindSafe for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl RefUnwindSafe for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl RefUnwindSafe for ClientStats",1,["iroh_bench::ClientStats"]],["impl RefUnwindSafe for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !RefUnwindSafe for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl !RefUnwindSafe for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl !RefUnwindSafe for Handle",1,["iroh_dns_server::dns::Handle"]],["impl !RefUnwindSafe for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl !RefUnwindSafe for Server",1,["iroh_dns_server::server::Server"]],["impl !RefUnwindSafe for AppState",1,["iroh_dns_server::state::AppState"]],["impl !RefUnwindSafe for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]],["impl RefUnwindSafe for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl RefUnwindSafe for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl RefUnwindSafe for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl RefUnwindSafe for Config",1,["iroh_dns_server::config::Config"]],["impl RefUnwindSafe for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl RefUnwindSafe for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl RefUnwindSafe for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl RefUnwindSafe for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl RefUnwindSafe for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl RefUnwindSafe for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl RefUnwindSafe for Metrics",1,["iroh_dns_server::metrics::Metrics"]]]],["iroh_relay",[["impl !RefUnwindSafe for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !RefUnwindSafe for DialError",1,["iroh_relay::client::DialError"]],["impl !RefUnwindSafe for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl !RefUnwindSafe for SendError",1,["iroh_relay::client::conn::SendError"]],["impl !RefUnwindSafe for DnsError",1,["iroh_relay::dns::DnsError"]],["impl !RefUnwindSafe for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl !RefUnwindSafe for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl !RefUnwindSafe for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl !RefUnwindSafe for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl !RefUnwindSafe for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::protos::handshake::Error"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::protos::relay::Error"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::quic::Error"]],["impl !RefUnwindSafe for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl !RefUnwindSafe for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl !RefUnwindSafe for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl !RefUnwindSafe for Client",1,["iroh_relay::client::Client"]],["impl !RefUnwindSafe for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl !RefUnwindSafe for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !RefUnwindSafe for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl !RefUnwindSafe for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl !RefUnwindSafe for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl !RefUnwindSafe for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl !RefUnwindSafe for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl RefUnwindSafe for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl RefUnwindSafe for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl RefUnwindSafe for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl RefUnwindSafe for Access",1,["iroh_relay::server::Access"]],["impl RefUnwindSafe for TXT",1,["iroh_relay::dns::TXT"]],["impl RefUnwindSafe for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl RefUnwindSafe for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl RefUnwindSafe for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl RefUnwindSafe for UserData",1,["iroh_relay::node_info::UserData"]],["impl RefUnwindSafe for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl RefUnwindSafe for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl RefUnwindSafe for Limits",1,["iroh_relay::server::Limits"]],["impl RefUnwindSafe for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl RefUnwindSafe for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl RefUnwindSafe for Server",1,["iroh_relay::server::Server"]],["impl RefUnwindSafe for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl RefUnwindSafe for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl RefUnwindSafe for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl RefUnwindSafe for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> !RefUnwindSafe for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !RefUnwindSafe for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> !RefUnwindSafe for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl !RefUnwindSafe for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl !RefUnwindSafe for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl !RefUnwindSafe for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl !RefUnwindSafe for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl !RefUnwindSafe for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !RefUnwindSafe for BindError",1,["iroh::endpoint::BindError"]],["impl !RefUnwindSafe for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl !RefUnwindSafe for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl !RefUnwindSafe for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl !RefUnwindSafe for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !RefUnwindSafe for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl !RefUnwindSafe for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl !RefUnwindSafe for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl !RefUnwindSafe for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl !RefUnwindSafe for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl !RefUnwindSafe for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl !RefUnwindSafe for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl !RefUnwindSafe for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl !RefUnwindSafe for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl !RefUnwindSafe for Builder",1,["iroh::endpoint::Builder"]],["impl !RefUnwindSafe for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl !RefUnwindSafe for Connecting",1,["iroh::endpoint::Connecting"]],["impl !RefUnwindSafe for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl !RefUnwindSafe for Incoming",1,["iroh::endpoint::Incoming"]],["impl !RefUnwindSafe for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !RefUnwindSafe for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl !RefUnwindSafe for Options",1,["iroh::net_report::options::imp::Options"]],["impl !RefUnwindSafe for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl !RefUnwindSafe for Router",1,["iroh::protocol::Router"]],["impl !RefUnwindSafe for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl !RefUnwindSafe for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl !RefUnwindSafe for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl RefUnwindSafe for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl RefUnwindSafe for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl RefUnwindSafe for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl RefUnwindSafe for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl RefUnwindSafe for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl RefUnwindSafe for Source",1,["iroh::magicsock::node_map::Source"]],["impl RefUnwindSafe for Probe",1,["iroh::net_report::probes::Probe"]],["impl RefUnwindSafe for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl RefUnwindSafe for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl RefUnwindSafe for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl RefUnwindSafe for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl RefUnwindSafe for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl RefUnwindSafe for Lagged",1,["iroh::discovery::Lagged"]],["impl RefUnwindSafe for Connection",1,["iroh::endpoint::Connection"]],["impl RefUnwindSafe for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl RefUnwindSafe for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl RefUnwindSafe for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl RefUnwindSafe for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl RefUnwindSafe for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl RefUnwindSafe for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl RefUnwindSafe for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl RefUnwindSafe for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl RefUnwindSafe for Report",1,["iroh::net_report::report::Report"]],["impl<'a> !RefUnwindSafe for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> !RefUnwindSafe for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> !RefUnwindSafe for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl !RefUnwindSafe for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl !RefUnwindSafe for ParseError",1,["iroh_base::ticket::ParseError"]],["impl RefUnwindSafe for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl RefUnwindSafe for PublicKey",1,["iroh_base::key::PublicKey"]],["impl RefUnwindSafe for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl RefUnwindSafe for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl RefUnwindSafe for SecretKey",1,["iroh_base::key::SecretKey"]],["impl RefUnwindSafe for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl !RefUnwindSafe for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl RefUnwindSafe for Commands",1,["iroh_bench::Commands"]],["impl RefUnwindSafe for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl RefUnwindSafe for Opt",1,["iroh_bench::s2n::Opt"]],["impl RefUnwindSafe for Stats",1,["iroh_bench::stats::Stats"]],["impl RefUnwindSafe for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl RefUnwindSafe for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl RefUnwindSafe for ClientStats",1,["iroh_bench::ClientStats"]],["impl RefUnwindSafe for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !RefUnwindSafe for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl !RefUnwindSafe for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl !RefUnwindSafe for Handle",1,["iroh_dns_server::dns::Handle"]],["impl !RefUnwindSafe for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl !RefUnwindSafe for Server",1,["iroh_dns_server::server::Server"]],["impl !RefUnwindSafe for AppState",1,["iroh_dns_server::state::AppState"]],["impl !RefUnwindSafe for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]],["impl RefUnwindSafe for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl RefUnwindSafe for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl RefUnwindSafe for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl RefUnwindSafe for Config",1,["iroh_dns_server::config::Config"]],["impl RefUnwindSafe for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl RefUnwindSafe for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl RefUnwindSafe for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl RefUnwindSafe for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl RefUnwindSafe for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl RefUnwindSafe for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl RefUnwindSafe for Metrics",1,["iroh_dns_server::metrics::Metrics"]]]],["iroh_relay",[["impl !RefUnwindSafe for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !RefUnwindSafe for DialError",1,["iroh_relay::client::DialError"]],["impl !RefUnwindSafe for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl !RefUnwindSafe for SendError",1,["iroh_relay::client::conn::SendError"]],["impl !RefUnwindSafe for DnsError",1,["iroh_relay::dns::DnsError"]],["impl !RefUnwindSafe for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl !RefUnwindSafe for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl !RefUnwindSafe for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl !RefUnwindSafe for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl !RefUnwindSafe for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::protos::handshake::Error"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::protos::relay::Error"]],["impl !RefUnwindSafe for Error",1,["iroh_relay::quic::Error"]],["impl !RefUnwindSafe for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl !RefUnwindSafe for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl !RefUnwindSafe for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl !RefUnwindSafe for Client",1,["iroh_relay::client::Client"]],["impl !RefUnwindSafe for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl !RefUnwindSafe for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !RefUnwindSafe for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl !RefUnwindSafe for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl !RefUnwindSafe for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl !RefUnwindSafe for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl !RefUnwindSafe for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl RefUnwindSafe for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl RefUnwindSafe for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl RefUnwindSafe for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl RefUnwindSafe for Access",1,["iroh_relay::server::Access"]],["impl RefUnwindSafe for TXT",1,["iroh_relay::dns::TXT"]],["impl RefUnwindSafe for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl RefUnwindSafe for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl RefUnwindSafe for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl RefUnwindSafe for UserData",1,["iroh_relay::node_info::UserData"]],["impl RefUnwindSafe for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl RefUnwindSafe for Limits",1,["iroh_relay::server::Limits"]],["impl RefUnwindSafe for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl RefUnwindSafe for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl RefUnwindSafe for Server",1,["iroh_relay::server::Server"]],["impl RefUnwindSafe for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl RefUnwindSafe for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl RefUnwindSafe for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl RefUnwindSafe for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> !RefUnwindSafe for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !RefUnwindSafe for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !RefUnwindSafe for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> !RefUnwindSafe for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[21750,2862,3166,6813,18322]} \ No newline at end of file +//{"start":57,"fragment_lengths":[21750,2862,3166,6813,17939]} \ No newline at end of file diff --git a/pr/3331/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js b/pr/3331/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js index a88ef3261d..0ed77fb0cf 100644 --- a/pr/3331/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js +++ b/pr/3331/docs/trait.impl/core/panic/unwind_safe/trait.UnwindSafe.js @@ -1,9 +1,9 @@ (function() { - var implementors = Object.fromEntries([["iroh",[["impl !UnwindSafe for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl !UnwindSafe for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl !UnwindSafe for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl !UnwindSafe for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl !UnwindSafe for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !UnwindSafe for BindError",1,["iroh::endpoint::BindError"]],["impl !UnwindSafe for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl !UnwindSafe for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl !UnwindSafe for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl !UnwindSafe for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !UnwindSafe for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl !UnwindSafe for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl !UnwindSafe for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl !UnwindSafe for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl !UnwindSafe for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl !UnwindSafe for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl !UnwindSafe for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl !UnwindSafe for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl !UnwindSafe for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl !UnwindSafe for Builder",1,["iroh::endpoint::Builder"]],["impl !UnwindSafe for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl !UnwindSafe for Connecting",1,["iroh::endpoint::Connecting"]],["impl !UnwindSafe for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl !UnwindSafe for Incoming",1,["iroh::endpoint::Incoming"]],["impl !UnwindSafe for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !UnwindSafe for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl !UnwindSafe for Options",1,["iroh::net_report::options::imp::Options"]],["impl !UnwindSafe for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl !UnwindSafe for Router",1,["iroh::protocol::Router"]],["impl !UnwindSafe for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl !UnwindSafe for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl !UnwindSafe for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl UnwindSafe for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl UnwindSafe for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl UnwindSafe for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl UnwindSafe for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl UnwindSafe for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl UnwindSafe for Source",1,["iroh::magicsock::node_map::Source"]],["impl UnwindSafe for Probe",1,["iroh::net_report::probes::Probe"]],["impl UnwindSafe for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl UnwindSafe for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl UnwindSafe for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl UnwindSafe for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl UnwindSafe for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl UnwindSafe for Lagged",1,["iroh::discovery::Lagged"]],["impl UnwindSafe for Connection",1,["iroh::endpoint::Connection"]],["impl UnwindSafe for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl UnwindSafe for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl UnwindSafe for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl UnwindSafe for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl UnwindSafe for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl UnwindSafe for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl UnwindSafe for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl UnwindSafe for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl UnwindSafe for Report",1,["iroh::net_report::report::Report"]],["impl<'a> !UnwindSafe for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> !UnwindSafe for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> !UnwindSafe for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl !UnwindSafe for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl !UnwindSafe for ParseError",1,["iroh_base::ticket::ParseError"]],["impl UnwindSafe for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl UnwindSafe for PublicKey",1,["iroh_base::key::PublicKey"]],["impl UnwindSafe for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl UnwindSafe for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl UnwindSafe for SecretKey",1,["iroh_base::key::SecretKey"]],["impl UnwindSafe for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl !UnwindSafe for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl UnwindSafe for Commands",1,["iroh_bench::Commands"]],["impl UnwindSafe for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl UnwindSafe for Opt",1,["iroh_bench::s2n::Opt"]],["impl UnwindSafe for Stats",1,["iroh_bench::stats::Stats"]],["impl UnwindSafe for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl UnwindSafe for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl UnwindSafe for ClientStats",1,["iroh_bench::ClientStats"]],["impl UnwindSafe for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !UnwindSafe for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl !UnwindSafe for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl !UnwindSafe for Handle",1,["iroh_dns_server::dns::Handle"]],["impl !UnwindSafe for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl !UnwindSafe for Server",1,["iroh_dns_server::server::Server"]],["impl !UnwindSafe for AppState",1,["iroh_dns_server::state::AppState"]],["impl !UnwindSafe for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]],["impl UnwindSafe for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl UnwindSafe for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl UnwindSafe for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl UnwindSafe for Config",1,["iroh_dns_server::config::Config"]],["impl UnwindSafe for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl UnwindSafe for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl UnwindSafe for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl UnwindSafe for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl UnwindSafe for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl UnwindSafe for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl UnwindSafe for Metrics",1,["iroh_dns_server::metrics::Metrics"]]]],["iroh_relay",[["impl !UnwindSafe for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !UnwindSafe for DialError",1,["iroh_relay::client::DialError"]],["impl !UnwindSafe for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl !UnwindSafe for SendError",1,["iroh_relay::client::conn::SendError"]],["impl !UnwindSafe for DnsError",1,["iroh_relay::dns::DnsError"]],["impl !UnwindSafe for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl !UnwindSafe for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl !UnwindSafe for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl !UnwindSafe for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl !UnwindSafe for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl !UnwindSafe for Error",1,["iroh_relay::protos::handshake::Error"]],["impl !UnwindSafe for Error",1,["iroh_relay::protos::relay::Error"]],["impl !UnwindSafe for Error",1,["iroh_relay::quic::Error"]],["impl !UnwindSafe for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl !UnwindSafe for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl !UnwindSafe for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl !UnwindSafe for Client",1,["iroh_relay::client::Client"]],["impl !UnwindSafe for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl !UnwindSafe for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !UnwindSafe for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl !UnwindSafe for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl !UnwindSafe for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl !UnwindSafe for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl !UnwindSafe for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl UnwindSafe for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl UnwindSafe for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl UnwindSafe for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl UnwindSafe for Access",1,["iroh_relay::server::Access"]],["impl UnwindSafe for TXT",1,["iroh_relay::dns::TXT"]],["impl UnwindSafe for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl UnwindSafe for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl UnwindSafe for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl UnwindSafe for UserData",1,["iroh_relay::node_info::UserData"]],["impl UnwindSafe for Datagrams",1,["iroh_relay::protos::relay::Datagrams"]],["impl UnwindSafe for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl UnwindSafe for Limits",1,["iroh_relay::server::Limits"]],["impl UnwindSafe for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl UnwindSafe for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl UnwindSafe for Server",1,["iroh_relay::server::Server"]],["impl UnwindSafe for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl UnwindSafe for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl UnwindSafe for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl UnwindSafe for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> !UnwindSafe for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !UnwindSafe for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !UnwindSafe for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !UnwindSafe for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !UnwindSafe for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> !UnwindSafe for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); + var implementors = Object.fromEntries([["iroh",[["impl !UnwindSafe for DiscoveryError",1,["iroh::discovery::DiscoveryError"]],["impl !UnwindSafe for IntoDiscoveryError",1,["iroh::discovery::IntoDiscoveryError"]],["impl !UnwindSafe for PkarrError",1,["iroh::discovery::pkarr::PkarrError"]],["impl !UnwindSafe for AddNodeAddrError",1,["iroh::magicsock::AddNodeAddrError"]],["impl !UnwindSafe for AlpnError",1,["iroh::endpoint::AlpnError"]],["impl !UnwindSafe for BindError",1,["iroh::endpoint::BindError"]],["impl !UnwindSafe for ConnectError",1,["iroh::endpoint::ConnectError"]],["impl !UnwindSafe for ConnectWithOptsError",1,["iroh::endpoint::ConnectWithOptsError"]],["impl !UnwindSafe for GetMappingAddressError",1,["iroh::endpoint::GetMappingAddressError"]],["impl !UnwindSafe for AcceptError",1,["iroh::protocol::AcceptError"]],["impl !UnwindSafe for DnsDiscovery",1,["iroh::discovery::dns::DnsDiscovery"]],["impl !UnwindSafe for DnsDiscoveryBuilder",1,["iroh::discovery::dns::DnsDiscoveryBuilder"]],["impl !UnwindSafe for Builder",1,["iroh::discovery::pkarr::dht::Builder"]],["impl !UnwindSafe for DhtDiscovery",1,["iroh::discovery::pkarr::dht::DhtDiscovery"]],["impl !UnwindSafe for PkarrPublisherBuilder",1,["iroh::discovery::pkarr::PkarrPublisherBuilder"]],["impl !UnwindSafe for PkarrRelayClient",1,["iroh::discovery::pkarr::PkarrRelayClient"]],["impl !UnwindSafe for PkarrResolver",1,["iroh::discovery::pkarr::PkarrResolver"]],["impl !UnwindSafe for PkarrResolverBuilder",1,["iroh::discovery::pkarr::PkarrResolverBuilder"]],["impl !UnwindSafe for ConcurrentDiscovery",1,["iroh::discovery::ConcurrentDiscovery"]],["impl !UnwindSafe for Builder",1,["iroh::endpoint::Builder"]],["impl !UnwindSafe for ConnectOptions",1,["iroh::endpoint::ConnectOptions"]],["impl !UnwindSafe for Connecting",1,["iroh::endpoint::Connecting"]],["impl !UnwindSafe for Endpoint",1,["iroh::endpoint::Endpoint"]],["impl !UnwindSafe for Incoming",1,["iroh::endpoint::Incoming"]],["impl !UnwindSafe for IncomingFuture",1,["iroh::endpoint::IncomingFuture"]],["impl !UnwindSafe for ZeroRttAccepted",1,["iroh::endpoint::ZeroRttAccepted"]],["impl !UnwindSafe for Options",1,["iroh::net_report::options::imp::Options"]],["impl !UnwindSafe for QuicConfig",1,["iroh::net_report::reportgen::QuicConfig"]],["impl !UnwindSafe for Router",1,["iroh::protocol::Router"]],["impl !UnwindSafe for RouterBuilder",1,["iroh::protocol::RouterBuilder"]],["impl !UnwindSafe for CleanupDropGuard",1,["iroh::test_utils::CleanupDropGuard"]],["impl !UnwindSafe for DnsPkarrServer",1,["iroh::test_utils::dns_and_pkarr_servers::DnsPkarrServer"]],["impl UnwindSafe for ConnectionType",1,["iroh::magicsock::node_map::node_state::ConnectionType"]],["impl UnwindSafe for ControlMsg",1,["iroh::magicsock::node_map::node_state::ControlMsg"]],["impl UnwindSafe for DirectAddrType",1,["iroh::magicsock::DirectAddrType"]],["impl UnwindSafe for PathSelection",1,["iroh::endpoint::PathSelection"]],["impl UnwindSafe for RelayMode",1,["iroh::endpoint::RelayMode"]],["impl UnwindSafe for Source",1,["iroh::magicsock::node_map::Source"]],["impl UnwindSafe for Probe",1,["iroh::net_report::probes::Probe"]],["impl UnwindSafe for MdnsDiscovery",1,["iroh::discovery::mdns::MdnsDiscovery"]],["impl UnwindSafe for MdnsDiscoveryBuilder",1,["iroh::discovery::mdns::MdnsDiscoveryBuilder"]],["impl UnwindSafe for PkarrPublisher",1,["iroh::discovery::pkarr::PkarrPublisher"]],["impl UnwindSafe for StaticProvider",1,["iroh::discovery::static_provider::StaticProvider"]],["impl UnwindSafe for DiscoveryItem",1,["iroh::discovery::DiscoveryItem"]],["impl UnwindSafe for Lagged",1,["iroh::discovery::Lagged"]],["impl UnwindSafe for Connection",1,["iroh::endpoint::Connection"]],["impl UnwindSafe for DirectAddr",1,["iroh::magicsock::DirectAddr"]],["impl UnwindSafe for DirectAddrInfo",1,["iroh::magicsock::node_map::node_state::DirectAddrInfo"]],["impl UnwindSafe for RemoteInfo",1,["iroh::magicsock::node_map::node_state::RemoteInfo"]],["impl UnwindSafe for RemoteNodeIdError",1,["iroh::endpoint::RemoteNodeIdError"]],["impl UnwindSafe for EndpointMetrics",1,["iroh::metrics::EndpointMetrics"]],["impl UnwindSafe for Metrics",1,["iroh::magicsock::metrics::Metrics"]],["impl UnwindSafe for Metrics",1,["iroh::net_report::metrics::Metrics"]],["impl UnwindSafe for RelayLatencies",1,["iroh::net_report::report::RelayLatencies"]],["impl UnwindSafe for Report",1,["iroh::net_report::report::Report"]],["impl<'a> !UnwindSafe for DiscoveryContext<'a>",1,["iroh::discovery::DiscoveryContext"]],["impl<'a> !UnwindSafe for Accept<'a>",1,["iroh::endpoint::Accept"]],["impl<P> !UnwindSafe for AccessLimit<P>",1,["iroh::protocol::AccessLimit"]]]],["iroh_base",[["impl !UnwindSafe for KeyParsingError",1,["iroh_base::key::KeyParsingError"]],["impl !UnwindSafe for ParseError",1,["iroh_base::ticket::ParseError"]],["impl UnwindSafe for NodeAddr",1,["iroh_base::node_addr::NodeAddr"]],["impl UnwindSafe for PublicKey",1,["iroh_base::key::PublicKey"]],["impl UnwindSafe for RelayUrl",1,["iroh_base::relay_url::RelayUrl"]],["impl UnwindSafe for RelayUrlParseError",1,["iroh_base::relay_url::RelayUrlParseError"]],["impl UnwindSafe for SecretKey",1,["iroh_base::key::SecretKey"]],["impl UnwindSafe for NodeTicket",1,["iroh_base::ticket::node::NodeTicket"]]]],["iroh_bench",[["impl !UnwindSafe for EndpointSelector",1,["iroh_bench::EndpointSelector"]],["impl UnwindSafe for Commands",1,["iroh_bench::Commands"]],["impl UnwindSafe for ConnectionSelector",1,["iroh_bench::ConnectionSelector"]],["impl UnwindSafe for Opt",1,["iroh_bench::s2n::Opt"]],["impl UnwindSafe for Stats",1,["iroh_bench::stats::Stats"]],["impl UnwindSafe for StreamStats",1,["iroh_bench::stats::StreamStats"]],["impl UnwindSafe for TransferResult",1,["iroh_bench::stats::TransferResult"]],["impl UnwindSafe for ClientStats",1,["iroh_bench::ClientStats"]],["impl UnwindSafe for Opt",1,["iroh_bench::Opt"]]]],["iroh_dns_server",[["impl !UnwindSafe for DnsHandler",1,["iroh_dns_server::dns::DnsHandler"]],["impl !UnwindSafe for DnsServer",1,["iroh_dns_server::dns::DnsServer"]],["impl !UnwindSafe for Handle",1,["iroh_dns_server::dns::Handle"]],["impl !UnwindSafe for HttpServer",1,["iroh_dns_server::http::HttpServer"]],["impl !UnwindSafe for Server",1,["iroh_dns_server::server::Server"]],["impl !UnwindSafe for AppState",1,["iroh_dns_server::state::AppState"]],["impl !UnwindSafe for ZoneStore",1,["iroh_dns_server::store::ZoneStore"]],["impl UnwindSafe for BootstrapOption",1,["iroh_dns_server::config::BootstrapOption"]],["impl UnwindSafe for CertMode",1,["iroh_dns_server::http::tls::CertMode"]],["impl UnwindSafe for RateLimitConfig",1,["iroh_dns_server::http::rate_limiting::RateLimitConfig"]],["impl UnwindSafe for Config",1,["iroh_dns_server::config::Config"]],["impl UnwindSafe for MainlineConfig",1,["iroh_dns_server::config::MainlineConfig"]],["impl UnwindSafe for MetricsConfig",1,["iroh_dns_server::config::MetricsConfig"]],["impl UnwindSafe for StoreConfig",1,["iroh_dns_server::config::StoreConfig"]],["impl UnwindSafe for DnsConfig",1,["iroh_dns_server::dns::DnsConfig"]],["impl UnwindSafe for HttpConfig",1,["iroh_dns_server::http::HttpConfig"]],["impl UnwindSafe for HttpsConfig",1,["iroh_dns_server::http::HttpsConfig"]],["impl UnwindSafe for Metrics",1,["iroh_dns_server::metrics::Metrics"]]]],["iroh_relay",[["impl !UnwindSafe for ConnectError",1,["iroh_relay::client::ConnectError"]],["impl !UnwindSafe for DialError",1,["iroh_relay::client::DialError"]],["impl !UnwindSafe for RecvError",1,["iroh_relay::client::conn::RecvError"]],["impl !UnwindSafe for SendError",1,["iroh_relay::client::conn::SendError"]],["impl !UnwindSafe for DnsError",1,["iroh_relay::dns::DnsError"]],["impl !UnwindSafe for DecodingError",1,["iroh_relay::node_info::DecodingError"]],["impl !UnwindSafe for EncodingError",1,["iroh_relay::node_info::EncodingError"]],["impl !UnwindSafe for LookupError",1,["iroh_relay::node_info::LookupError"]],["impl !UnwindSafe for ParseError",1,["iroh_relay::node_info::ParseError"]],["impl !UnwindSafe for FrameTypeError",1,["iroh_relay::protos::common::FrameTypeError"]],["impl !UnwindSafe for Error",1,["iroh_relay::protos::handshake::Error"]],["impl !UnwindSafe for Error",1,["iroh_relay::protos::relay::Error"]],["impl !UnwindSafe for Error",1,["iroh_relay::quic::Error"]],["impl !UnwindSafe for AccessConfig",1,["iroh_relay::server::AccessConfig"]],["impl !UnwindSafe for SpawnError",1,["iroh_relay::server::SpawnError"]],["impl !UnwindSafe for SupervisorError",1,["iroh_relay::server::SupervisorError"]],["impl !UnwindSafe for Client",1,["iroh_relay::client::Client"]],["impl !UnwindSafe for ClientBuilder",1,["iroh_relay::client::ClientBuilder"]],["impl !UnwindSafe for ClientSink",1,["iroh_relay::client::ClientSink"]],["impl !UnwindSafe for ClientStream",1,["iroh_relay::client::ClientStream"]],["impl !UnwindSafe for DnsResolver",1,["iroh_relay::dns::DnsResolver"]],["impl !UnwindSafe for MaxLengthExceededError",1,["iroh_relay::node_info::MaxLengthExceededError"]],["impl !UnwindSafe for QuicClient",1,["iroh_relay::quic::QuicClient"]],["impl !UnwindSafe for QuicConfig",1,["iroh_relay::server::QuicConfig"]],["impl UnwindSafe for FrameType",1,["iroh_relay::protos::common::FrameType"]],["impl UnwindSafe for ClientToRelayMsg",1,["iroh_relay::protos::relay::ClientToRelayMsg"]],["impl UnwindSafe for RelayToClientMsg",1,["iroh_relay::protos::relay::RelayToClientMsg"]],["impl UnwindSafe for Access",1,["iroh_relay::server::Access"]],["impl UnwindSafe for TXT",1,["iroh_relay::dns::TXT"]],["impl UnwindSafe for TxtLookup",1,["iroh_relay::dns::TxtLookup"]],["impl UnwindSafe for NodeData",1,["iroh_relay::node_info::NodeData"]],["impl UnwindSafe for NodeInfo",1,["iroh_relay::node_info::NodeInfo"]],["impl UnwindSafe for UserData",1,["iroh_relay::node_info::UserData"]],["impl UnwindSafe for ClientRateLimit",1,["iroh_relay::server::ClientRateLimit"]],["impl UnwindSafe for Limits",1,["iroh_relay::server::Limits"]],["impl UnwindSafe for Metrics",1,["iroh_relay::server::metrics::Metrics"]],["impl UnwindSafe for RelayMetrics",1,["iroh_relay::server::metrics::RelayMetrics"]],["impl UnwindSafe for Server",1,["iroh_relay::server::Server"]],["impl UnwindSafe for PingTracker",1,["iroh_relay::ping_tracker::PingTracker"]],["impl UnwindSafe for RelayMap",1,["iroh_relay::relay_map::RelayMap"]],["impl UnwindSafe for RelayNode",1,["iroh_relay::relay_map::RelayNode"]],["impl UnwindSafe for RelayQuicConfig",1,["iroh_relay::relay_map::RelayQuicConfig"]],["impl<E> !UnwindSafe for StaggeredError<E>",1,["iroh_relay::dns::StaggeredError"]],["impl<EC, EA = EC> !UnwindSafe for CertConfig<EC, EA>",1,["iroh_relay::server::CertConfig"]],["impl<EC, EA = EC> !UnwindSafe for RelayConfig<EC, EA>",1,["iroh_relay::server::RelayConfig"]],["impl<EC, EA = EC> !UnwindSafe for ServerConfig<EC, EA>",1,["iroh_relay::server::ServerConfig"]],["impl<EC, EA = EC> !UnwindSafe for TlsConfig<EC, EA>",1,["iroh_relay::server::TlsConfig"]],["impl<Loader> !UnwindSafe for ReloadingResolver<Loader>",1,["iroh_relay::server::resolver::ReloadingResolver"]]]]]); if (window.register_implementors) { window.register_implementors(implementors); } else { window.pending_implementors = implementors; } })() -//{"start":57,"fragment_lengths":[21228,2790,3085,6651,17881]} \ No newline at end of file +//{"start":57,"fragment_lengths":[21228,2790,3085,6651,17507]} \ No newline at end of file