Documentation ¶
Overview ¶
Package tailscale contains Tailscale client code.
Index ¶
- Variables
- func BugReport(ctx context.Context, note string) (string, error)
- func CheckIPForwarding(ctx context.Context) error
- func DeleteWaitingFile(ctx context.Context, baseName string) error
- func DoLocalRequest(req *http.Request) (*http.Response, error)
- func EditPrefs(ctx context.Context, mp *ipn.MaskedPrefs) (*ipn.Prefs, error)
- func FileTargets(ctx context.Context) ([]apitype.FileTarget, error)
- func GetPrefs(ctx context.Context) (*ipn.Prefs, error)
- func GetWaitingFile(ctx context.Context, baseName string) (rc io.ReadCloser, size int64, err error)
- func Goroutines(ctx context.Context) ([]byte, error)
- func Logout(ctx context.Context) error
- func SetDNS(ctx context.Context, name, value string) error
- func Status(ctx context.Context) (*ipnstate.Status, error)
- func StatusWithoutPeers(ctx context.Context) (*ipnstate.Status, error)
- func WaitingFiles(ctx context.Context) ([]apitype.WaitingFile, error)
- func WhoIs(ctx context.Context, remoteAddr string) (*apitype.WhoIsResponse, error)
Constants ¶
This section is empty.
Variables ¶
var TailscaledSocket = paths.DefaultTailscaledSocket()
TailscaledSocket is the tailscaled Unix socket.
Functions ¶
func BugReport ¶ added in v1.8.0
BugReport logs and returns a log marker that can be shared by the user with support.
func CheckIPForwarding ¶ added in v1.8.0
func DeleteWaitingFile ¶ added in v1.8.0
func DoLocalRequest ¶
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 FileTargets ¶ added in v1.8.0
func FileTargets(ctx context.Context) ([]apitype.FileTarget, error)
func GetWaitingFile ¶ added in v1.8.0
func Goroutines ¶
Goroutines returns a dump of the Tailscale daemon's current goroutines.
func SetDNS ¶ added in v1.10.0
SetDNS adds a DNS TXT record for the given domain name, containing the provided TXT value. The intended use case is answering LetsEncrypt/ACME dns-01 challenges.
The control plane will only permit SetDNS requests with very specific names and values. The name should be "_acme-challenge." + your node's MagicDNS name. It's expected that clients cache the certs from LetsEncrypt (or whichever CA is providing them) and only request new ones as needed; the control plane rate limits SetDNS requests.
This is a low-level interface; it's expected that most Tailscale users use a higher level interface to getting/using TLS certificates.
func StatusWithoutPeers ¶ added in v1.8.0
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)
Types ¶
This section is empty.