tailscale library

Classes

ClientVersion
An advisory upstream client-version update (result of Diag.checkUpdate).
DERPMap
Current DERP relay map — the set of regions and nodes Tailscale will route through when a direct node-to-node path isn't available. Mirrors tailcfg.DERPMap. See tailscale.com/kb/1232/derp-servers.
DERPNode
DERPRegion
Diag
Observability and diagnostics. All read-only; nothing here affects connectivity.
ExitNode
Exit-node routing: route this node's internet-bound traffic through another tailnet node, VPN-style. The exit node becomes the last hop before the public internet, so outbound connections appear to originate from its IP.
Funnel
Public-internet publication for an existing local HTTP service.
Http
HTTP-specific conveniences routed through the embedded tailnet node.
NodeStateSnapshot
Point-in-time census of the native runtime's internal registries.
PingResult
Result of a Diag.ping.
Prefs
Low-level escape hatch for preferences that don't have a dedicated namespace — subnet routes, Shields Up, tags, etc.
PrefsUpdate
A multi-field atomic update to TailscalePrefs. Only fields set on this object are modified; unset fields are left alone.
Serve
Tailnet publication for an existing local HTTP service.
Tailscale
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.
TailscaleClient
Testable app-facing contract for an embedded Tailscale node.
TailscaleConnection
One full-duplex byte stream over the tailnet.
TailscaleConnectionOutput
Write half of a TailscaleConnection.
TailscaleDatagram
One UDP datagram received over the tailnet.
TailscaleDatagramBinding
UDP datagram binding over the tailnet.
TailscaleEndpoint
A tailnet endpoint attached to a transport object.
TailscaleHttpRequest
One inbound HTTP request accepted from the tailnet.
TailscaleHttpResponse
Writable response half for a TailscaleHttpRequest.
TailscaleHttpServer
A live tailnet HTTP server.
TailscaleListener
Tailnet TCP listener.
TailscaleNode
A node this node can see on the tailnet, including offline nodes.
TailscaleNodeIdentity
Identity of a tailnet node — the result of Tailscale.whois.
TailscalePrefs
Node preferences. Mirrors a subset of ipn.Prefs on the Go side.
TailscalePublishedService
A Serve or Funnel publication that forwards inbound traffic to a local loopback HTTP service.
TailscaleRuntimeError
Asynchronous background error pushed from the embedded runtime.
TailscaleStatus
A snapshot of the local node's current state.
Tcp
Raw TCP primitives between tailnet nodes.
Tls
TLS-terminated listener for this node, with a cert auto-provisioned by Tailscale for this tailnet.
Udp
UDP datagram sockets over the tailnet.

Enums

DebugTerminatePoint
Test-only crash-injection points inside the supervised worker's lifecycle dispatch, armed through the Tailscale.debugTerminateWorkerForTesting wrapper. Each value names exactly one termination site.
NodeState
The node's position in the connection lifecycle. Mirrors Go's ipn.State.
PingPath
How confidently Diag.ping could classify the route to the node.
PingType
Path type for Diag.ping. Matches ipnstate.PingType.
TailscaleErrorCode
Structured category for operation failures.
TailscaleLogLevel
Native log verbosity for the embedded Tailscale runtime — controls what the Go side writes to stderr. Dart-side logging (e.g. TailscaleRuntimeError) and upstream diagnostic uploads are unaffected.
TailscaleRuntimeErrorCode
High-level category for asynchronous runtime errors pushed from Go.

Constants

tailscaleMaxDatagramPayloadBytes → const int
Maximum public UDP payload accepted by the v1 package-native transport.

Typedefs

DiagNodeStateFn = Future<NodeStateSnapshot> Function()
HttpBindFn = Future<({int bindingId, TailscaleEndpoint tailnet})> Function(int port)
HttpCloseBindingFn = Future<void> Function(int bindingId)
UdpCloseFn = Future<void> Function(int bindingId)
Tears down the Go-side UDP bridge for the given opaque binding id (from the bind response). A datagram socketpair peer-close does not wake the Go bridge's reader, so the binding must signal Go explicitly on close, or the port + goroutines + threads leak.

Exceptions / Errors

TailscaleConfigurationException
Thrown when Tailscale.init conflicts with the process-wide state root or logging configuration already frozen by an earlier successful call.
TailscaleDiagException
Thrown when a diag.* call fails.
TailscaleException
Stable library-level exception base for embedded Tailscale operations.
TailscaleExitNodeException
Thrown when an exitNode.* call fails.
TailscaleForgetLocalIdentityException
Thrown when explicit local identity destruction cannot be completed.
TailscaleFunnelException
Thrown when a funnel.* call fails — most notably missing Funnel policy, unsupported public ports, or tailnet HTTPS preconditions.
TailscaleHttpException
Thrown when an http.* call fails — notably http.bind() failing to forward tailnet traffic, or http.client accessed before up().
TailscaleLogoutException
Thrown when logout() cannot confirm remote revocation or local cleanup.
TailscaleOperationException
Base class for operation-specific failures such as up() or listen().
TailscalePrefsException
Thrown when a prefs.* call fails.
TailscaleServeException
Thrown when a serve.* call fails — most notably a conflicting Serve config write or unsupported tailnet publication.
TailscaleStatusException
Thrown when status() fails to decode or fetch native status.
TailscaleTcpException
Thrown when a tcp.* call fails — tailnet dial refused, no route to node, fd handoff failure, etc.
TailscaleTlsException
Thrown when a tls.* call fails — certificate-domain discovery, TLS listener setup, or tailnet HTTPS precondition failures.
TailscaleUdpException
Thrown when a udp.* call fails — tailnet bind failure, invalid endpoint, oversize datagram, fd handoff failure, etc.
TailscaleUpException
Thrown when up() fails before the node reaches a stable state.
TailscaleUsageException
Thrown when the API is used in an invalid lifecycle state.