Documentation
¶
Overview ¶
Package tailscale is a small client for the local Tailscale daemon's LocalAPI. It speaks HTTP/1.1 directly over the daemon's socket, named pipe, or authenticated localhost port, so Planck does not depend on tailscale.com.
Index ¶
Constants ¶
const ( // TunnelMTU is the MTU Tailscale gives its TUN device; media packets on a // tailnet path must fit inside it. TunnelMTU = 1280 DirectMaxBitrateKbps = 100_000 RelayMaxBitrateKbps = 20_000 )
Variables ¶
var ( // ErrNotRunning means no Tailscale daemon answered, or it is not in the // Running state (stopped, logged out, or waiting for auth). ErrNotRunning = errors.New("tailscale: not running") // ErrPeerNotFound means the address does not belong to a known tailnet node. ErrPeerNotFound = errors.New("tailscale: peer not found") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client talks to the local Tailscale daemon. The zero value is not usable; call New or NewUnix.
func New ¶
func New() *Client
New returns a client for the platform's standard daemon location. The location is resolved on every call, so a daemon restart on a new port is picked up.
type Node ¶
type Node struct {
ID string
HostName string
DNSName string
OS string
UserID int64
UserLogin string
TailscaleIPs []netip.Addr
Online bool
// CurAddr is the peer's current direct UDP endpoint; empty when traffic
// goes through a relay or no handshake has happened yet.
CurAddr string
// Relay is the peer's home DERP region code (for example "den").
Relay string
Direct bool
}
Node is one tailnet device as seen from this machine.