ExitNode class abstract

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.

Exit-node capability is opt-in on both sides: the serving node must advertise it and be approved by an admin on the control plane; any node on the tailnet can then opt into routing through it. Applies only to traffic leaving the tailnet — node-to-node tailnet traffic is unaffected.

See Tailscale's docs for the full feature (eligibility, approval, split DNS behavior, LAN access): tailscale.com/kb/1103/exit-nodes.

Reached via Tailscale.exitNode.

Constructors

ExitNode()

Properties

hashCode int
The hash code for this object.
no setterinherited
onCurrentChange Stream<TailscaleNode?>
Emits whenever the exit-node selection changes (including external changes from another device signed into the same account).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() Future<void>
Stops routing through an exit node.
current() Future<TailscaleNode?>
The node currently being used as this node's exit, or null if none.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
suggest() Future<TailscaleNode?>
The control plane's recommended exit node for this tailnet (latency-based). Returns null if no eligible node is available.
toString() String
A string representation of this object.
inherited
use(TailscaleNode node) Future<void>
Routes all outbound traffic through node.
useAuto() Future<void>
Enables AutoExitNode mode — the control plane picks (and re-picks, on changes) the lowest-latency eligible exit node.
useById(String stableNodeId) Future<void>
Escape hatch for pinning an exit node by stable node ID — useful when the caller has persisted an ID across sessions and doesn't have the full TailscaleNode handy.

Operators

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