tailscale

package
v0.7.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// Command is the command to call for the Tailscale CLI binary. It
	// defaults to "tailscale".
	Command string
}

Client is a client for Tailscale's services. Some functionality is handled via the Go API, and some is handled via execution of the Tailscale CLI binary.

func (*Client) AdvertiseExitNode added in v0.5.0

func (c *Client) AdvertiseExitNode(ctx context.Context, enable bool) error

AdvertiseExitNode enables and disables exit node advertisement for the current node.

func (*Client) AdvertiseRoutes added in v0.7.3

func (c *Client) AdvertiseRoutes(ctx context.Context, routes []netip.Prefix) error

func (*Client) AllowLANAccess added in v0.5.0

func (c *Client) AllowLANAccess(ctx context.Context, allow bool) error

AllowLANAccess enabled and disables the ability for the current node to get access to the regular LAN that it is connected to while an exit node is in use.

func (*Client) ExitNode added in v0.4.0

func (c *Client) ExitNode(ctx context.Context, peer *ipnstate.PeerStatus) error

ExitNode uses the specified peer as an exit node, or unsets an existing exit node if peer is nil.

func (*Client) NetCheck added in v0.7.0

func (c *Client) NetCheck(ctx context.Context, full bool) (*netcheck.Report, *tailcfg.DERPMap, error)

func (*Client) Prefs added in v0.5.0

func (c *Client) Prefs(ctx context.Context) (*ipn.Prefs, error)

Prefs returns the options of the local node.

func (*Client) Start

func (c *Client) Start(ctx context.Context) error

Start connects the local peer to the Tailscale network.

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*ipnstate.Status, error)

Status returns the status of the connection to the Tailscale network. If the network is not currently connected, it returns nil, nil.

func (*Client) Stop

func (c *Client) Stop(ctx context.Context) error

Stop disconnects the local peer from the Tailscale network.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL