Tailscale class

Singleton embedded Tailscale node for the current Dart process. Wraps Tailscale's tsnet userspace library — the Dart app itself becomes a node on the tailnet, no OS-level VPN required.

This package runs one node per process. Configure it once with init, then access the singleton through instance.

Shape

Implemented types

Properties

diag Diag
latefinal
exitNode ExitNode
latefinal
funnel Funnel
latefinal
hashCode int
The hash code for this object.
no setterinherited
http Http
latefinal
onError Stream<TailscaleRuntimeError>
Background runtime errors pushed from the embedded node.
no setteroverride
onNodeChanges Stream<List<TailscaleNode>>
Emits the full node list on any change (node joined, left, went on/off-line, tags or DNS name changed).
no setteroverride
onStateChange Stream<NodeState>
Emits the new NodeState whenever the node's lifecycle state changes.
no setteroverride
prefs Prefs
latefinal
profiles Profiles
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serve Serve
latefinal
taildrop Taildrop
final
tcp Tcp
latefinal
tls Tls
latefinal
udp Udp
latefinal

Methods

down() Future<void>
Brings the embedded node down while preserving persisted credentials.
override
logout() Future<void>
Logs out and clears persisted credentials.
override
nodeByIp(String ip) Future<TailscaleNode?>
Returns the first known node with ip in its Tailscale IP list.
override
nodes() Future<List<TailscaleNode>>
Returns the current node inventory — every node on the tailnet this node is aware of, whether online right now or not.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
status() Future<TailscaleStatus>
Returns the current node status — lifecycle state, assigned tailnet IPs, health warnings, and MagicDNS suffix. Node inventory is separate; call nodes when you need it.
override
toString() String
A string representation of this object.
inherited
up({String hostname = '', String? authKey, bool ephemeral = false, Uri? controlUrl, Duration timeout = const Duration(seconds: 30)}) Future<TailscaleStatus>
Brings the embedded Tailscale node up and connects to the control plane — Tailscale's coordination service at controlplane.tailscale.com, or a self-hosted Headscale if you set controlUrl. Registers the node on first launch, reconnects from persisted credentials on subsequent launches.
override
whois(String ip) Future<TailscaleNodeIdentity?>
Resolves a tailnet IP to the node's identity — stable node ID, owner login, hostname, and ACL tags — by querying the local LocalAPI.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance Tailscale
final

Static Methods

init({required String stateDir, TailscaleLogLevel logLevel = TailscaleLogLevel.silent}) → void
Configures the Tailscale library. Call this once at app startup, alongside other library initializers.