tailscale

package
v1.8.3 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: BSD-3-Clause Imports: 17 Imported by: 160

Documentation

Overview

Package tailscale contains Tailscale client code.

Index

Constants

This section is empty.

Variables

View Source
var TailscaledSocket = paths.DefaultTailscaledSocket()

TailscaledSocket is the tailscaled Unix socket.

Functions

func BugReport added in v1.8.0

func BugReport(ctx context.Context, note string) (string, error)

BugReport logs and returns a log marker that can be shared by the user with support.

func CheckIPForwarding added in v1.8.0

func CheckIPForwarding(ctx context.Context) error

func DeleteWaitingFile added in v1.8.0

func DeleteWaitingFile(ctx context.Context, baseName string) error

func DoLocalRequest

func DoLocalRequest(req *http.Request) (*http.Response, error)

DoLocalRequest makes an HTTP request to the local machine's Tailscale daemon.

URLs are of the form http://local-tailscaled.sock/localapi/v0/whois?ip=1.2.3.4.

The hostname must be "local-tailscaled.sock", even though it doesn't actually do any DNS lookup. The actual means of connecting to and authenticating to the local Tailscale daemon vary by platform.

DoLocalRequest may mutate the request to add Authorization headers.

func EditPrefs added in v1.8.0

func EditPrefs(ctx context.Context, mp *ipn.MaskedPrefs) (*ipn.Prefs, error)

func FileTargets added in v1.8.0

func FileTargets(ctx context.Context) ([]apitype.FileTarget, error)

func GetPrefs added in v1.8.0

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

func GetWaitingFile added in v1.8.0

func GetWaitingFile(ctx context.Context, baseName string) (rc io.ReadCloser, size int64, err error)

func Goroutines

func Goroutines(ctx context.Context) ([]byte, error)

Goroutines returns a dump of the Tailscale daemon's current goroutines.

func Logout added in v1.8.0

func Logout(ctx context.Context) error

func Status added in v1.8.0

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

Status returns the Tailscale daemon's status.

func StatusWithoutPeers added in v1.8.0

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

StatusWithPeers returns the Tailscale daemon's status, without the peer info.

func WaitingFiles added in v1.8.0

func WaitingFiles(ctx context.Context) ([]apitype.WaitingFile, error)

func WhoIs

func WhoIs(ctx context.Context, remoteAddr string) (*apitype.WhoIsResponse, error)

WhoIs returns the owner of the remoteAddr, which must be an IP or IP:port.

Types

This section is empty.

Directories

Path Synopsis
Package apitype contains types for the Tailscale local API.
Package apitype contains types for the Tailscale local API.

Jump to

Keyboard shortcuts

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