node

package
v0.9.13 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package node runs one Tailscale node: the body of the hidden subcommand the daemon starts for each service on the tailnet (see internal/tsnet).

It lives apart from the router so that the daemon process never links a tsnet.Server into its own goroutines; a panic in here ends this process and nothing else.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, cfg Config, ready, logs io.Writer) error

Run brings the node up, prints outposttsnet.ReadyLine to ready once it is serving, and proxies tailnet traffic to the service until ctx ends. Log lines, including the one-time login URL, go to logs.

Types

type Config

type Config struct {
	Service  string
	Hostname string
	Dir      string
	AuthKey  string
	Port     int
	Verbose  bool
	// Upstream, when set, is the login gateway's URL. The node then serves
	// HTTPS and sends everything there rather than to the service, so the
	// tailnet address is behind the same login as the portal.
	Upstream           string
	UpstreamServerName string
	// TCP is the service's tcp forwards, served on this node.
	TCP []manifest.TCPForward
	// AccessSecret lets the node ask the gateway about each forwarded
	// connection. Required for forwards when Upstream is set.
	AccessSecret string
	// Funnel also answers the public internet, through Tailscale Funnel, on
	// a listener of its own that sends everything to PublicUpstream: the
	// gateway's public listener, which serves only public paths. Needs
	// Upstream.
	Funnel         bool
	PublicUpstream string
}

Config is one node.

Jump to

Keyboard shortcuts

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