pub struct MapRequest<'a> {Show 18 fields
pub version: CapabilityVersion,
pub compress: &'a str,
pub keep_alive: bool,
pub node_key: NodePublicKey,
pub disco_key: DiscoPublicKey,
pub hardware_attestation_key: Option<Vec<u8>>,
pub hardware_attestation_key_signature: Option<Vec<u8>>,
pub hardware_attestation_key_signature_timestamp: Option<DateTime<Utc>>,
pub stream: bool,
pub host_info: Option<HostInfo<'a>>,
pub map_session_handle: &'a str,
pub map_session_seq: i64,
pub endpoints: Vec<Endpoint>,
pub tka_head: &'a str,
pub read_only: Option<bool>,
pub omit_peers: bool,
pub debug_flags: Vec<&'a str>,
pub connection_handle_for_test: &'a str,
}Expand description
Sent by a Tailscale node to the control server to either update the control plane about its current state, or to start a long-poll of network map updates. Includes a copy of the node’s current set of WireGuard endpoints and general host information.
The request is JSON-encoded and sent to the control server via an HTTP POST to
https://<control-server>/machine/map.
Fields§
§version: CapabilityVersionThe capability version of this Tailscale node. Incremented whenever the client code (in any client, Go/Rust/etc) changes enough that we want to signal to the control server that we’re capable of something different.
See the CapabilityVersion enum for info the changes introduced with each version.
compress: &'a strEither “zstd” to receive MapResponses compressed with zstd, or “” to receive
MapResponses with no compression.
keep_alive: boolWhether the control server should periodically send application-level keep-alives back to this Tailscale node.
node_key: NodePublicKeyThe public key of this Tailscale node.
disco_key: DiscoPublicKeyThe public key this Tailscale node will use with the Disco protocol to establish direct connections with peer nodes in the Tailnet.
hardware_attestation_key: Option<Vec<u8>>If populated, the public key of the node’s hardware-backed identity attestation key.
hardware_attestation_key_signature: Option<Vec<u8>>If populated, the signature of “$UNIX_TIMESTAMP|$NODE_PUBLIC_KEY” as signed by the hardware attestation key.
hardware_attestation_key_signature_timestamp: Option<DateTime<Utc>>If populated, the time at which the MapRequest::hardware_attestation_key_signature was
created.
stream: boolWhether or not this Tailscale node wants to receive multiple MapResponses over the same
HTTP connection, referred to as “long-polling” or a “map poll”.
If false, the control server will send a single MapResponse and then close the
connection. If true and MapRequest::version >= 68, the server will treat this as a
read-only request and ignore MapRequest::host_info and any other fields that might be
set.
host_info: Option<HostInfo<'a>>Current information about this Tailscale node’s host. Although it is always included in a
MapRequest, a control server may choose to ignore it when MapRequest::stream is
true and MapRequest::version >= 68.
map_session_handle: &'a strIf non-empty, indicates a request to reattach to a previous map session after a previous map session was interrupted for whatever reason. Its value is an opaque string.
When set, the Tailscale node must also send MapRequest::map_session_seq to specify the
last processed message in that prior session. The control server may choose to ignore the
request for any reason and start a new map session. This is only applicable when
MapRequest::stream is true.
map_session_seq: i64The sequence number in the map session (identified by MapRequest::map_session_handle
that was most recently processed by this Tailscale node. It is only applicable when
MapRequest::map_session_handle is specified. If the control server chooses to honor the
MapRequest::map_session_handle request, only sequence numbers greater than this value
will be returned.
endpoints: Vec<Endpoint>The client’s magicsock UDP ip:port endpoints (IPv4 or IPv6).
These can be ignored if stream is true and version >= 68.
tka_head: &'a strDescribes the hash of the latest AUM applied to the local Tailnet Key Authority, if one is operating.
read_only: Option<bool>do not use; must always be omitted/false
Deprecated. In the past, was set by Tailscale nodes when they wanted to fetch the full
MapResponse from the control server without updating their MapRequest::endpoints.
The intended use was for clients to discover the DERP map at start-up before their first
real endpoint update.
This value must always be omitted or set to false as of MapRequest::version >= 68.
omit_peers: boolWhether the Tailscale node is okay with the MapResponse::peers list being omitted in the
MapResponse. If true, the behavior of the control server varies based on the
MapRequest::stream and MapRequest::read_only flags:
- If
MapRequest::omit_peersistrue,MapRequest::streamisfalse, andMapRequest::read_onlyisfalse: the control server will let Tailscale nodes update their endpoints without breaking existing long-polling connections. In this case, the server can omit the entire response; the Tailscale node only needs to check the HTTP response status code. - If
MapRequest::omit_peersistrue,MapRequest::streamisfalse, andMapRequest::read_onlyistrue: the control server includes all fields in theMapResponse, as if the Tailscale node is fetching data from the control server for the first time.
debug_flags: Vec<&'a str>A list of strings specifying debugging and development features to enable in handling this
MapRequest. The values are deliberately unspecified, as they get added and removed all
the time during development, and offer no compatibility promise. To roll out semantic
changes, bump the CapabilityVersion instead.
Current valid values are:
"warn-ip-forwarding-off": node is trying to be a subnet router, but their IP forwarding is broken."warn-router-unhealthy": node’s subnet router implementation is having problems.
connection_handle_for_test: &'a strIf non-empty, an opaque string sent by the Tailscale node that identifies this specific connection to the control server. The server may choose to use this handle to identify the connection for debugging or testing purposes. It has no semantic meaning.
Trait Implementations§
Source§impl<'a> Clone for MapRequest<'a>
impl<'a> Clone for MapRequest<'a>
Source§fn clone(&self) -> MapRequest<'a>
fn clone(&self) -> MapRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more