TailscalePrefs class
Node preferences. Mirrors a subset of ipn.Prefs on the Go side.
Fields cover the long tail of tsnet configuration that doesn't warrant
its own top-level namespace. Use Prefs.get to read; use the named
setters on Prefs (setAdvertisedRoutes(...), setShieldsUp(true),
etc.) for common single-field changes, or Prefs.updateMasked for
atomic multi-field edits.
- Annotations
Constructors
-
TailscalePrefs({required List<
String> advertisedRoutes, required bool acceptRoutes, required bool shieldsUp, required List<String> advertisedTags, required bool wantRunning, required bool autoUpdate, required String hostname, bool autoExitNode = false, String? exitNodeId}) -
const
-
TailscalePrefs.fromJson(Map<
String, dynamic> json) -
Parses the JSON shape returned by the native LocalAPI wrapper.
factory
Properties
- acceptRoutes → bool
-
Accept subnet routes advertised by other nodes on the tailnet.
final
-
advertisedRoutes
→ List<
String> -
CIDRs this node advertises as a subnet router. Requires operator
approval in the admin panel before other nodes will pick them up.
See tailscale.com/kb/1019/subnets.
final
-
advertisedTags
→ List<
String> -
ACL tags to advertise when
registering the node. Tags let authz decisions reference this
node by role (e.g.
tag:server) rather than by owner.final - autoExitNode → bool
-
Whether automatic exit-node selection is enabled.
final
- autoUpdate → bool
-
Auto-update the underlying tsnet when a newer version is released.
final
- exitNodeId → String?
-
Stable node ID currently in use as an exit node, or null if none.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- hostname → String
-
The tailnet-visible hostname for this node.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shieldsUp → bool
-
When true, reject all inbound connections to this node — useful
for locked-down laptops / servers that should only initiate.
See tailscale.com/kb/1072/client-preferences#block-incoming-connections.
final
- wantRunning → bool
-
Whether the engine should be connected (i.e. not manually paused).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override