Skip to main content

Hostinfo

Struct Hostinfo 

Source
pub struct Hostinfo {
Show 41 fields pub ipn_version: String, pub frontend_log_id: String, pub backend_log_id: String, pub os: String, pub os_version: String, pub container: Option<bool>, pub env: String, pub distro: String, pub distro_version: String, pub distro_code_name: String, pub app: String, pub desktop: Option<bool>, pub package: String, pub device_model: String, pub push_device_token: String, pub hostname: String, pub shields_up: bool, pub sharee_node: bool, pub no_logs_no_support: bool, pub wire_ingress: bool, pub ingress_enabled: bool, pub allows_update: bool, pub machine: String, pub go_arch: String, pub go_arch_var: String, pub go_version: String, pub routable_ips: Vec<String>, pub request_tags: Vec<String>, pub wol_macs: Vec<String>, pub services: Vec<Service>, pub net_info: Option<NetInfo>, pub ssh_host_keys: Vec<String>, pub cloud: String, pub userspace: Option<bool>, pub userspace_router: Option<bool>, pub app_connector: Option<bool>, pub services_hash: String, pub exit_node_id: String, pub location: Option<Location>, pub t_p_m: Option<TPMInfo>, pub state_encrypted: Option<bool>,
}
Expand description

Hostinfo contains a summary of a Tailscale host.

Because it contains pointers (slices), this type should not be used as a value type.

Fields§

§ipn_version: String

version of this code (in version.Long format)

§frontend_log_id: String

logtail ID of frontend instance

§backend_log_id: String

logtail ID of backend instance

§os: String

operating system the client runs on (a version.OS value)

§os_version: String
OSVersion is the version of the OS, if available.
 
For Android, it's like "10", "11", "12", etc. For iOS and macOS it's like
"15.6.1" or "12.4.0". For Windows it's like "10.0.19044.1889". For
FreeBSD it's like "12.3-STABLE".
 
For Linux, prior to Tailscale 1.32, we jammed a bunch of fields into this
string on Linux, like "Debian 10.4; kernel=xxx; container; env=kn" and so
on. As of Tailscale 1.32, this is simply the kernel version on Linux, like
"5.10.0-17-amd64".
§container: Option<bool>

best-effort whether the client is running in a container

§env: String

a hostinfo.EnvType in string form

§distro: String
"debian", "ubuntu", "nixos", ...
§distro_version: String
"20.04", ...
§distro_code_name: String
"jammy", "bullseye", ...
§app: String

App is used to disambiguate Tailscale clients that run using tsnet.

§desktop: Option<bool>

if a desktop was detected on Linux

§package: String

Tailscale package to disambiguate (“choco”, “appstore”, etc; “” for unknown)

§device_model: String

mobile phone model (“Pixel 3a”, “iPhone12,3”)

§push_device_token: String

macOS/iOS APNs device token for notifications (and Android in the future)

§hostname: String

name of the host the client runs on

§shields_up: bool

indicates whether the host is blocking incoming connections

§sharee_node: bool

indicates this node exists in netmap because it’s owned by a shared-to user

§no_logs_no_support: bool

indicates that the user has opted out of sending logs and support

§wire_ingress: bool

WireIngress indicates that the node would like to be wired up server-side (DNS, etc) to be able to use Tailscale Funnel, even if it’s not currently enabled. For example, the user might only use it for intermittent foreground CLI serve sessions, for which they’d like it to work right away, even if it’s disabled most of the time. As an optimization, this is only sent if IngressEnabled is false, as IngressEnabled implies that this option is true.

§ingress_enabled: bool

if the node has any funnel endpoint enabled

§allows_update: bool

indicates that the node has opted-in to admin-console-drive remote updates

§machine: String

the current host’s machine type (uname -m)

§go_arch: String

GOARCH value (of the built binary)

§go_arch_var: String

GOARM, GOAMD64, etc (of the built binary)

§go_version: String

Go version binary was built with

§routable_ips: Vec<String>

set of IP ranges this client can route

§request_tags: Vec<String>

set of ACL tags this node wants to claim

§wol_macs: Vec<String>

MAC address(es) to send Wake-on-LAN packets to wake this node (lowercase hex w/ colons)

§services: Vec<Service>

services advertised by this machine

§net_info: Option<NetInfo>§ssh_host_keys: Vec<String>

if advertised

§cloud: String§userspace: Option<bool>

if the client is running in userspace (netstack) mode

§userspace_router: Option<bool>

if the client’s subnet router is running in userspace (netstack) mode

§app_connector: Option<bool>

if the client is running the app-connector service

§services_hash: String

opaque hash of the most recent list of tailnet services, change in hash indicates config should be fetched via c2n

§exit_node_id: String

the client’s selected exit node, empty when unselected.

§location: Option<Location>

Location represents geographical location data about a Tailscale host. Location is optional and only set if explicitly declared by a node.

§t_p_m: Option<TPMInfo>

TPM device metadata, if available

§state_encrypted: Option<bool>
StateEncrypted reports whether the node state is stored encrypted on
disk. The actual mechanism is platform-specific:
  * Apple nodes use the Keychain
  * Linux and Windows nodes use the TPM
  * Android apps use EncryptedSharedPreferences

Trait Implementations§

Source§

impl Clone for Hostinfo

Source§

fn clone(&self) -> Hostinfo

Returns a duplicate 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 Hostinfo

Source§

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

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

impl Default for Hostinfo

Source§

fn default() -> Hostinfo

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Hostinfo

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Hostinfo

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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
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, dest: *mut u8)

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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.

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.
Source§

impl<T> WithSubscriber for T

Source§

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
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

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

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,